Commit e8bd0ac6fc1647da38bfb251e2d908d404e8cff1

Authored by Birendra
2 parents 99e8a16e 53b7f1aa

Merge branch 'AIABugFixes' into AIA_Develop

Showing 72 changed files with 2822 additions and 1027 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
... ... @@ -21,6 +21,7 @@
21 21 <IISExpressWindowsAuthentication />
22 22 <IISExpressUseClassicPipelineMode />
23 23 <WebGreaseLibPath>..\packages\WebGrease.1.5.2\lib</WebGreaseLibPath>
  24 + <UseGlobalApplicationHostFile />
24 25 </PropertyGroup>
25 26 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
26 27 <DebugSymbols>true</DebugSymbols>
... ... @@ -320,6 +321,9 @@
320 321 <Compile Include="Entity\GetCancelledLicenses_Result.cs">
321 322 <DependentUpon>AIADBEntity.tt</DependentUpon>
322 323 </Compile>
  324 + <Compile Include="Entity\GetCoursesToLicense_Result.cs">
  325 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  326 + </Compile>
323 327 <Compile Include="Entity\GetCustomerSummary_Result.cs">
324 328 <DependentUpon>AIADBEntity.tt</DependentUpon>
325 329 </Compile>
... ... @@ -729,7 +733,7 @@
729 733 <VisualStudio>
730 734 <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
731 735 <WebProjectProperties>
732   - <UseIIS>True</UseIIS>
  736 + <UseIIS>False</UseIIS>
733 737 <AutoAssignPort>True</AutoAssignPort>
734 738 <DevelopmentServerPort>65397</DevelopmentServerPort>
735 739 <DevelopmentServerVPath>/</DevelopmentServerVPath>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
... ... @@ -365,9 +365,11 @@ namespace AIAHTML5.ADMIN.API.Controllers
365 365 public HttpResponseMessage UpdateLicenseModulesStatus(JObject jsonData)
366 366 {
367 367 bool Status = false;
368   - Tuple<int, string> LicenseModuleStatus = new Tuple<int, string>(
  368 + Tuple<int, string,bool, string> LicenseModuleStatus = new Tuple<int, string,bool, string>(
369 369 jsonData["licenseId"].Value<int>(),
370   - jsonData["moduleStatusText"].Value<string>());
  370 + jsonData["moduleStatusText"].Value<string>(),
  371 + jsonData["isAodOn"].Value<bool>(),
  372 + jsonData["CourseListText"].Value<string>());
371 373 try
372 374 {
373 375 Status = LicenseModel.UpdateLicenseModulesStatus(dbContext, LicenseModuleStatus);
... ... @@ -387,6 +389,23 @@ namespace AIAHTML5.ADMIN.API.Controllers
387 389 }
388 390 }
389 391  
  392 + [Route("GetLicenseAodCourse")]
  393 + [HttpGet]
  394 + public HttpResponseMessage GetLicenseAodCourse(int LicenseId)
  395 + {
  396 + List<GetCoursesToLicense_Result> courseList;
  397 + try
  398 + {
  399 + courseList = LicenseModel.GetLicenseAodCourse(dbContext, LicenseId);
  400 + return Request.CreateResponse(HttpStatusCode.OK, courseList);
  401 + }
  402 + catch (Exception ex)
  403 + {
  404 + // Log exception code goes here
  405 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  406 + }
  407 + }
  408 +
390 409  
391 410 [Route("CheckAccountNumber")]
392 411 [HttpGet]
... ... @@ -423,4 +442,5 @@ namespace AIAHTML5.ADMIN.API.Controllers
423 442 }
424 443  
425 444 }
  445 +
426 446 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
... ... @@ -121,9 +121,10 @@ namespace AIAHTML5.ADMIN.API.Controllers
121 121 string tagName = jsonData["tagName"].Value<string>();
122 122 long SessionId = jsonData["SessionId"].Value<long>();
123 123 bool isSiteUser = jsonData["isSiteUser"].Value<bool>();
  124 + bool isAdmin = jsonData["isAdmin"].Value<bool>();
124 125 try
125 126 {
126   - Status = UserModel.ManageUserLoginStatus(dbContext, userId, tagName, SessionId, isSiteUser);
  127 + Status = UserModel.ManageUserLoginStatus(dbContext, userId, tagName, SessionId, isSiteUser, isAdmin);
127 128  
128 129 return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
129 130 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... ... @@ -3553,7 +3553,7 @@ namespace AIAHTML5.ADMIN.API.Entity
3553 3553 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModestySettings", licenseEditionIdParameter, siteIdParameter, isModestyParameter, isSiteUserParameter, status);
3554 3554 }
3555 3555  
3556   - public virtual int usp_UpdateLicenseModuleStatus(Nullable<int> licenseId, string moduleStatusText, ObjectParameter status)
  3556 + public virtual int usp_UpdateLicenseModuleStatus(Nullable<int> licenseId, string moduleStatusText, Nullable<bool> isAodOn, string courseListText, ObjectParameter status)
3557 3557 {
3558 3558 var licenseIdParameter = licenseId.HasValue ?
3559 3559 new ObjectParameter("LicenseId", licenseId) :
... ... @@ -3563,7 +3563,15 @@ namespace AIAHTML5.ADMIN.API.Entity
3563 3563 new ObjectParameter("ModuleStatusText", moduleStatusText) :
3564 3564 new ObjectParameter("ModuleStatusText", typeof(string));
3565 3565  
3566   - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModuleStatus", licenseIdParameter, moduleStatusTextParameter, status);
  3566 + var isAodOnParameter = isAodOn.HasValue ?
  3567 + new ObjectParameter("isAodOn", isAodOn) :
  3568 + new ObjectParameter("isAodOn", typeof(bool));
  3569 +
  3570 + var courseListTextParameter = courseListText != null ?
  3571 + new ObjectParameter("CourseListText", courseListText) :
  3572 + new ObjectParameter("CourseListText", typeof(string));
  3573 +
  3574 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModuleStatus", licenseIdParameter, moduleStatusTextParameter, isAodOnParameter, courseListTextParameter, status);
3567 3575 }
3568 3576  
3569 3577 public virtual int usp_UpdateLicenseUserGroupUsers(Nullable<int> userGroupId, string userIds, ObjectParameter status)
... ... @@ -5003,7 +5011,7 @@ namespace AIAHTML5.ADMIN.API.Entity
5003 5011 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter, status);
5004 5012 }
5005 5013  
5006   - public virtual ObjectResult<Nullable<bool>> usp_ManageUserLoginStatus(Nullable<int> userId, string tag, Nullable<long> sessionId, Nullable<bool> isSiteUser)
  5014 + public virtual ObjectResult<Nullable<bool>> usp_ManageUserLoginStatus(Nullable<int> userId, string tag, Nullable<long> sessionId, Nullable<bool> isSiteUser, Nullable<bool> isAdmin)
5007 5015 {
5008 5016 var userIdParameter = userId.HasValue ?
5009 5017 new ObjectParameter("userId", userId) :
... ... @@ -5021,7 +5029,20 @@ namespace AIAHTML5.ADMIN.API.Entity
5021 5029 new ObjectParameter("isSiteUser", isSiteUser) :
5022 5030 new ObjectParameter("isSiteUser", typeof(bool));
5023 5031  
5024   - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<bool>>("usp_ManageUserLoginStatus", userIdParameter, tagParameter, sessionIdParameter, isSiteUserParameter);
  5032 + var isAdminParameter = isAdmin.HasValue ?
  5033 + new ObjectParameter("isAdmin", isAdmin) :
  5034 + new ObjectParameter("isAdmin", typeof(bool));
  5035 +
  5036 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<bool>>("usp_ManageUserLoginStatus", userIdParameter, tagParameter, sessionIdParameter, isSiteUserParameter, isAdminParameter);
  5037 + }
  5038 +
  5039 + public virtual ObjectResult<GetCoursesToLicense_Result> GetCoursesToLicense(Nullable<int> licenseId)
  5040 + {
  5041 + var licenseIdParameter = licenseId.HasValue ?
  5042 + new ObjectParameter("licenseId", licenseId) :
  5043 + new ObjectParameter("licenseId", typeof(int));
  5044 +
  5045 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetCoursesToLicense_Result>("GetCoursesToLicense", licenseIdParameter);
5025 5046 }
5026 5047 }
5027 5048 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... ... @@ -339,6 +339,9 @@
339 339 <Function Name="GetContentList" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
340 340 <Parameter Name="iContentTypeId" Type="int" Mode="In" />
341 341 </Function>
  342 + <Function Name="GetCoursesToLicense" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  343 + <Parameter Name="licenseId" Type="int" Mode="In" />
  344 + </Function>
342 345 <Function Name="GetCustomerSummary" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
343 346 <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" />
344 347 <Parameter Name="sLicenseeFullName" Type="varchar" Mode="In" />
... ... @@ -1413,6 +1416,7 @@
1413 1416 <Parameter Name="tag" Type="varchar" Mode="In" />
1414 1417 <Parameter Name="sessionId" Type="bigint" Mode="In" />
1415 1418 <Parameter Name="isSiteUser" Type="bit" Mode="In" />
  1419 + <Parameter Name="isAdmin" Type="bit" Mode="In" />
1416 1420 </Function>
1417 1421 <Function Name="usp_SaveLabExerciseAttempts" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
1418 1422 <Parameter Name="UserId" Type="int" Mode="In" />
... ... @@ -1503,6 +1507,8 @@
1503 1507 <Function Name="usp_UpdateLicenseModuleStatus" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
1504 1508 <Parameter Name="LicenseId" Type="int" Mode="In" />
1505 1509 <Parameter Name="ModuleStatusText" Type="varchar" Mode="In" />
  1510 + <Parameter Name="isAodOn" Type="bit" Mode="In" />
  1511 + <Parameter Name="CourseListText" Type="varchar" Mode="In" />
1506 1512 <Parameter Name="Status" Type="bit" Mode="InOut" />
1507 1513 </Function>
1508 1514 <Function Name="usp_UpdateLicenseUserGroupUsers" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
... ... @@ -1912,7 +1918,7 @@
1912 1918 <Parameter Name="iEditionId" Mode="In" Type="Byte" />
1913 1919 </FunctionImport>
1914 1920 <FunctionImport Name="GetLicenseBySiteId" ReturnType="Collection(AIADatabaseV5Model.GetLicenseBySiteId_Result)">
1915   - <Parameter Name="sSiteId" Mode="In" Type="Int32" />
  1921 + <Parameter Name="sSiteId" Mode="In" Type="Int32" />
1916 1922 <Parameter Name="sEditionId" Mode="In" Type="Int32" />
1917 1923 </FunctionImport>
1918 1924 <FunctionImport Name="GetLicenseDetailByUserId" ReturnType="Collection(AIADatabaseV5Model.GetLicenseDetailByUserId_Result)">
... ... @@ -2582,6 +2588,8 @@
2582 2588 <FunctionImport Name="usp_UpdateLicenseModuleStatus">
2583 2589 <Parameter Name="LicenseId" Mode="In" Type="Int32" />
2584 2590 <Parameter Name="ModuleStatusText" Mode="In" Type="String" />
  2591 + <Parameter Name="isAodOn" Mode="In" Type="Boolean" />
  2592 + <Parameter Name="CourseListText" Mode="In" Type="String" />
2585 2593 <Parameter Name="Status" Mode="InOut" Type="Boolean" />
2586 2594 </FunctionImport>
2587 2595 <FunctionImport Name="usp_UpdateLicenseUserGroupUsers">
... ... @@ -3013,6 +3021,10 @@
3013 3021 <Parameter Name="tag" Mode="In" Type="String" />
3014 3022 <Parameter Name="sessionId" Mode="In" Type="Int64" />
3015 3023 <Parameter Name="isSiteUser" Mode="In" Type="Boolean" />
  3024 + <Parameter Name="isAdmin" Mode="In" Type="Boolean" />
  3025 + </FunctionImport>
  3026 + <FunctionImport Name="GetCoursesToLicense" ReturnType="Collection(AIADatabaseV5Model.GetCoursesToLicense_Result)">
  3027 + <Parameter Name="licenseId" Mode="In" Type="Int32" />
3016 3028 </FunctionImport>
3017 3029 </EntityContainer>
3018 3030 <ComplexType Name="DA_GetBaseLayer_Result">
... ... @@ -4343,6 +4355,11 @@
4343 4355 <Property Type="Byte" Name="Id" Nullable="true" />
4344 4356 <Property Type="String" Name="Title" Nullable="true" MaxLength="50" />
4345 4357 </ComplexType>
  4358 + <ComplexType Name="GetCoursesToLicense_Result">
  4359 + <Property Type="String" Name="CourseId" Nullable="false" MaxLength="20" />
  4360 + <Property Type="String" Name="CourseName" Nullable="false" MaxLength="150" />
  4361 + <Property Type="Boolean" Name="Status" Nullable="false" />
  4362 + </ComplexType>
4346 4363 </Schema>
4347 4364 </edmx:ConceptualModels>
4348 4365 <!-- C-S mapping content -->
... ... @@ -6328,6 +6345,15 @@
6328 6345 <FunctionImportMapping FunctionImportName="usp_UpdateUserProfile" FunctionName="AIADatabaseV5Model.Store.usp_UpdateUserProfile" />
6329 6346 <FunctionImportMapping FunctionImportName="usp_InsertAIAUser" FunctionName="AIADatabaseV5Model.Store.usp_InsertAIAUser" />
6330 6347 <FunctionImportMapping FunctionImportName="usp_ManageUserLoginStatus" FunctionName="AIADatabaseV5Model.Store.usp_ManageUserLoginStatus" />
  6348 + <FunctionImportMapping FunctionImportName="GetCoursesToLicense" FunctionName="AIADatabaseV5Model.Store.GetCoursesToLicense">
  6349 + <ResultMapping>
  6350 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.GetCoursesToLicense_Result">
  6351 + <ScalarProperty Name="CourseId" ColumnName="CourseId" />
  6352 + <ScalarProperty Name="CourseName" ColumnName="CourseName" />
  6353 + <ScalarProperty Name="Status" ColumnName="Status" />
  6354 + </ComplexTypeMapping>
  6355 + </ResultMapping>
  6356 + </FunctionImportMapping>
6331 6357 </EntityContainerMapping>
6332 6358 </Mapping>
6333 6359 </edmx:Mappings>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetCoursesToLicense_Result.cs 0 โ†’ 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated from a template.
  4 +//
  5 +// Manual changes to this file may cause unexpected behavior in your application.
  6 +// Manual changes to this file will be overwritten if the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace AIAHTML5.ADMIN.API.Entity
  11 +{
  12 + using System;
  13 +
  14 + public partial class GetCoursesToLicense_Result
  15 + {
  16 + public string CourseId { get; set; }
  17 + public string CourseName { get; set; }
  18 + public bool Status { get; set; }
  19 + }
  20 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
... ... @@ -433,12 +433,12 @@ namespace AIAHTML5.ADMIN.API.Models
433 433 return LicenseModulesStatusList;
434 434 }
435 435  
436   - public static bool UpdateLicenseModulesStatus(AIADatabaseV5Entities dbContext, Tuple<int, string> LicenseModuleStatus)
  436 + public static bool UpdateLicenseModulesStatus(AIADatabaseV5Entities dbContext, Tuple<int, string,bool,string> LicenseModuleStatus)
437 437 {
438 438 var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
439 439 try
440 440 {
441   - dbContext.usp_UpdateLicenseModuleStatus(LicenseModuleStatus.Item1, LicenseModuleStatus.Item2, spStatus);
  441 + dbContext.usp_UpdateLicenseModuleStatus(LicenseModuleStatus.Item1, LicenseModuleStatus.Item2, LicenseModuleStatus.Item3, LicenseModuleStatus.Item4, spStatus);
442 442 return (bool)spStatus.Value;
443 443 }
444 444 catch (Exception ex)
... ... @@ -447,6 +447,17 @@ namespace AIAHTML5.ADMIN.API.Models
447 447 }
448 448 }
449 449  
  450 + public static List<GetCoursesToLicense_Result> GetLicenseAodCourse(AIADatabaseV5Entities dbContext, int LicenseId)
  451 + {
  452 + List<GetCoursesToLicense_Result> result = new List<GetCoursesToLicense_Result>();
  453 + try
  454 + {
  455 + result = dbContext.GetCoursesToLicense(LicenseId).ToList();
  456 + }
  457 + catch (Exception ex) { }
  458 + return result;
  459 + }
  460 +
450 461 public static bool CheckAccountNumber(AIADatabaseV5Entities dbContext, string AccountNo)
451 462 {
452 463 var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
... ...
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, bool isSiteUser)
  68 + public static bool ManageUserLoginStatus(AIADatabaseV5Entities dbContext, int userId, string tagName, long SessionId, bool isSiteUser,bool isAdmin)
69 69 {
70 70 bool loginStatus = false;
71 71 try
72 72 {
73   - loginStatus = Convert.ToBoolean(dbContext.usp_ManageUserLoginStatus(userId, tagName, SessionId, isSiteUser).FirstOrDefault());
  73 + loginStatus = Convert.ToBoolean(dbContext.usp_ManageUserLoginStatus(userId, tagName, SessionId, isSiteUser, isAdmin).FirstOrDefault());
74 74  
75 75 return loginStatus;
76 76 }
... ...
400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs
... ... @@ -46,6 +46,7 @@ namespace AIAHTML5.API.Constants
46 46 public const string LAB_EXERCISE_SAVE_SUCCESS = "Your lab exercise attempt is saved.";
47 47 public const string LAB_EXERCISE_SAVE_FAILURE = "We are unable to save your lab exercise attempt, please try again.";
48 48 public const string SAVED_LAB_EXERCISE_NOT_FOUND = "Saved Lab Exercise not found.";
  49 + public const string NO_COURSE_FOUND = "NO COURSE FOUND";
49 50 public const string VALIDATED_CLIENT = "Valid Client.";
50 51 public const string INVALID_CLIENT = "InValid Client.";
51 52 public const string MSG_NOT_AUTHORIZE_SITE_USER = "User is not authorized.";
... ...
400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs
... ... @@ -44,5 +44,6 @@ namespace AIAHTML5.API.Constants
44 44 public const string GET_USER_LOGIN_STATUS = "usp_ManageUserLoginStatus";
45 45 public const string GET_AOD_AUTHENTICATION_STATUS = "usp_AodAuthenticationStatus";
46 46 public const string INSERT_SITE_LOGIN_LOG = "usp_InsertSiteLoginLog";
  47 + public const string GET_AOD_COURSE_ITEMS = "GetSelectedCoursesToLicense";
47 48 }
48 49 }
49 50 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs
... ... @@ -535,8 +535,9 @@ namespace AIAHTML5.API.Controllers
535 535 string tagName = jsonData["tagName"].Value<string>();
536 536 long SessionId = jsonData["SessionId"].Value<long>();
537 537 bool isSiteUser = jsonData["isSiteUser"].Value<bool>();
  538 + bool isAdmin = jsonData["isAdmin"].Value<bool>();
538 539  
539   - loginStatus = AIAHTML5.API.Models.Users.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser);
  540 + loginStatus = AIAHTML5.API.Models.Users.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser, isAdmin);
540 541  
541 542 return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(loginStatus) };
542 543 }
... ... @@ -591,6 +592,28 @@ namespace AIAHTML5.API.Controllers
591 592 }
592 593 }
593 594  
  595 + [HttpGet]
  596 + [Route("api/GetAodCoursesList")]
  597 + public HttpResponseMessage GetAodCoursesList([FromUri] int LicenseId)
  598 + {
  599 + try
  600 + {
  601 + DBModel db = new DBModel();
  602 + List<AodCourse> courselist = db.GetSelectedCourseList(LicenseId);
  603 +
  604 + if (courselist.Count>0)
  605 + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(JsonConvert.SerializeObject(courselist)) };
  606 + else
  607 + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.NO_COURSE_FOUND) };
  608 +
  609 + }
  610 + catch (Exception e)
  611 + {
  612 + return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.ERROR_IN_FECTHING_DETAILS) };
  613 +
  614 + }
  615 +
  616 + }
594 617 // PUT api/authenticate/5
595 618 public void Put(int id, [FromBody]string value)
596 619 {
... ...
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... ... @@ -350,7 +350,7 @@ namespace AIAHTML5.API.Models
350 350 return objUser;
351 351 }
352 352  
353   - internal static string GetUserLoginStatus(int userId,string tagName, long SessionId, bool isSiteUser)
  353 + internal static string GetUserLoginStatus(int userId,string tagName, long SessionId, bool isSiteUser,bool isAdmin)
354 354 {
355 355 string status=string.Empty;
356 356 DBModel objModel = new DBModel();
... ... @@ -367,6 +367,7 @@ namespace AIAHTML5.API.Models
367 367 cmd.Parameters.AddWithValue("@tag", tagName);
368 368 cmd.Parameters.AddWithValue("@sessionId", SessionId);
369 369 cmd.Parameters.AddWithValue("@isSiteUser", isSiteUser);
  370 + cmd.Parameters.AddWithValue("@isAdmin", isAdmin);
370 371 adapter = new SqlDataAdapter(cmd);
371 372 adapter.Fill(ds);
372 373  
... ... @@ -425,6 +426,47 @@ namespace AIAHTML5.API.Models
425 426 return status;
426 427 }
427 428  
  429 + internal List<AodCourse> GetSelectedCourseList(int licenseId)
  430 + {
  431 + AodCourse course = null;
  432 + List<AodCourse> courselist = new List<AodCourse>();
  433 +
  434 + SqlConnection conn = new SqlConnection(dbConnectionString);
  435 + SqlCommand cmd = new SqlCommand();
  436 + SqlDataAdapter adapter;
  437 +
  438 + DataSet ds = new DataSet();
  439 +
  440 + cmd.Connection = conn;
  441 + cmd.CommandText = DBConstants.GET_AOD_COURSE_ITEMS;
  442 + cmd.CommandType = CommandType.StoredProcedure;
  443 +
  444 + cmd.Parameters.AddWithValue("@licenseId", licenseId);
  445 +
  446 + adapter = new SqlDataAdapter(cmd);
  447 + adapter.Fill(ds);
  448 +
  449 + if (ds != null && ds.Tables.Count > 0)
  450 + {
  451 + DataTable dt = ds.Tables[0];
  452 +
  453 + if (dt.Rows.Count > 0)
  454 + {
  455 + foreach (DataRow dr in dt.Rows)
  456 + {
  457 + course = new AodCourse();
  458 +
  459 + course.CourseId= dr["CourseId"].ToString();
  460 + course.CourseName = dr["CourseName"].ToString();
  461 + course.BodySystem = dr["BodySystem"].ToString();
  462 + courselist.Add(course);
  463 + }
  464 + }
  465 + }
  466 +
  467 + return courselist;
  468 + }
  469 +
428 470 internal User GetSelectedSettings(int userId,bool isSiteUser)
429 471 {
430 472 logger.Debug(" Inside GetSelectedSettings for userId = " + userId);
... ...
400-SOURCECODE/AIAHTML5.API/Models/User.cs
... ... @@ -128,6 +128,13 @@ namespace AIAHTML5.API.Models
128 128 public int ExptImageLimit { get; set; }
129 129 }
130 130  
  131 + public class AodCourse
  132 + {
  133 + public string CourseId { get; set; }
  134 + public string CourseName { get; set; }
  135 + public string BodySystem { get; set; }
  136 + }
  137 +
131 138 public class LicenseUserInsertImageDetail
132 139 {
133 140 public int LicenseId { get; set; }
... ...
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
... ... @@ -340,10 +340,10 @@ namespace AIAHTML5.API.Models
340 340 return objUser;
341 341 }
342 342  
343   - internal static string GetUserLoginStatus(int userId, string tagName, long SessionId, bool isSiteUser)
  343 + internal static string GetUserLoginStatus(int userId, string tagName, long SessionId, bool isSiteUser,bool isAdmin)
344 344 {
345 345 string status = null;
346   - status = DBModel.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser);
  346 + status = DBModel.GetUserLoginStatus(userId, tagName, SessionId, isSiteUser, isAdmin);
347 347  
348 348 return status;
349 349 }
... ...
400-SOURCECODE/AIAHTML5.API/Web.config
... ... @@ -39,8 +39,8 @@
39 39 <add key="PING_INTERVAL" value="10" />
40 40  
41 41 <add key="ANIMATION_HOSTING_SERVER" value="~/../content/data/AnimationMp4/" />
42   - <!-- set to 10mb upload file size for single file at a time -->
43   - <add key="UploadMaxFileSize" value="10485760" />
  42 + <!-- set to 50mb upload file size in byte for single file at a time -->
  43 + <add key="UploadMaxFileSize" value="52428800" />
44 44  
45 45 <add key="SenderEmailAddress" value="support@interactiveanatomy.com" />
46 46 <!--<add key="SenderEmailAddress" value="support@interactiveanatomy.com" />-->
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
... ... @@ -68,15 +68,15 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
68 68 }
69 69 }
70 70  
71   - $rootScope.Get3DWindowId = function () {
72   - // handle for single window
73   - if ($rootScope.TheeDWindowData.length > 0) {
74   - for (var x = 0 ; x < $rootScope.TheeDWindowData.length; x++) {
  71 + // access from home controller
  72 + $rootScope.Set3DwindowData=function(windowviewid,keyname,data) {
  73 + for(var x=0 ;x < $rootScope.TheeDWindowData.length;x++){
75 74  
76   - return $rootScope.TheeDWindowData[x].multiwinid;
  75 + if($rootScope.TheeDWindowData[x].multiwinid==windowviewid)
  76 + {
  77 + $rootScope.TheeDWindowData[x][keyname]=data;
77 78 }
78 79 }
79   - else return 0;
80 80 }
81 81  
82 82 $scope.DisableUI = function () {
... ... @@ -228,7 +228,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
228 228 "mType": 'THREE_D_ANATOMY',
229 229 "windowTitle": $event.currentTarget.textContent,
230 230 "size": { height: 600, width: 900 },
231   - "position": { x: 300, y: 110 }
  231 + "position": { x: 1, y: 30 }
232 232 };
233 233  
234 234 window.parent.AIAModuleOpenResourceInfo(ThreeDopenData);
... ... @@ -272,9 +272,10 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
272 272 }
273 273  
274 274 $rootScope.Open3DModelBodyMain = function () {
275   - $scope.DisableUI();
276 275 if ($rootScope.isCallFromOtherModule) {
277 276 $scope.ThreeDModuleData = ModuleService.getModuleData("THREE_D_ANATOMY");
  277 + if($scope.ThreeDModuleData.length<1) return;
  278 + $scope.DisableUI();
278 279 $scope.readyToLoad = true;
279 280 $rootScope.ThreeDWindowLoadComplete = false;
280 281 $scope.wincount = 1;
... ... @@ -312,6 +313,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
312 313  
313 314 }
314 315 else {
  316 + $scope.DisableUI();
315 317 $scope.Open3DModelBody(null);
316 318 }
317 319 }
... ... @@ -409,21 +411,23 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
409 411 $scope.jsPanelHeight = 560;
410 412  
411 413 $scope.jsPanelLeft = $scope.ThreeDOpenInOtherModules.position.x;
412   - if ($scope.ThreeDOpenInOtherModules.position.x < 20)
413   - $scope.jsPanelLeft = 20;
  414 + if ($scope.ThreeDOpenInOtherModules.position.x <= 1)
  415 + $scope.jsPanelLeft = 0;
414 416 $scope.jsPanelTop = $scope.ThreeDOpenInOtherModules.position.y;
415   -
  417 + if ($scope.ThreeDOpenInOtherModules.position.y < 30)
  418 + $scope.jsPanelTop = 30;
  419 +
416 420 if($location.url()!= "/curriculum-builder-detail") {
417   - $scope.jsPanelLeft = 1;
418   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
  421 + $scope.jsPanelLeft = 1;
  422 + $scope.jsPanelTop = 85;
419 423 }
420 424  
421 425 }
422 426 else {
423 427 $scope.jsPanelWidth = $(window).outerWidth() - 20;
424   - $scope.jsPanelHeight = $(window).outerHeight() - 90;
  428 + $scope.jsPanelHeight = $(window).outerHeight() - 140;
425 429 $scope.jsPanelLeft = 1;
426   - $scope.jsPanelTop = 70;
  430 + $scope.jsPanelTop = 55;
427 431 }
428 432  
429 433  
... ... @@ -435,7 +439,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
435 439 theme: 'success',
436 440 currentController: '3dAController',
437 441 parentSlug: $scope.Get3DwindowStoreData(windowviewid, 'parentSlugName'),
438   - content: '<div style="height: 100%;overflow: scroll;" >' +
  442 + content: '<div id="thContentDiv_'+windowviewid+'" style="height: 100%;width: 100%;overflow: scroll;" >' +
439 443 '<object data="' + Selected3DImagePath + '" width="100%" height="100%" type="image/svg+xml" id="threedImage_' + windowviewid + '" onload="AnimationOnLoad(event)"></object>' +
440 444 '</div><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {var threeDivWidth = $("#ThreeDView").css("width");$("#ThreeDView").css({"left":"0px","width":"100%","min-idth": threeDivWidth}); var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#ThreeDImagePanel_' + windowviewid + '").css("width", "100%"); }});</script>',
441 445 title: tittle,
... ... @@ -449,6 +453,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
449 453 height: $scope.jsPanelHeight
450 454 },
451 455 onminimized:function (panel) {
  456 + var pnlName=panel[0].id;
  457 + var len = (pnlName).split("_").length;
  458 + var windowviewid = (pnlName).split("_")[len - 1];
452 459 var isAutoCalled = $scope.Get3DwindowStoreData(windowviewid, 'minmaxAutoEvent');
453 460 if(!isAutoCalled)
454 461 {
... ... @@ -458,6 +465,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
458 465 $scope.Set3DwindowStoreData(windowviewid, 'maximised',false);
459 466 },
460 467 onmaximized:function (panel) {
  468 + var pnlName=panel[0].id;
  469 + var len = (pnlName).split("_").length;
  470 + var windowviewid = (pnlName).split("_")[len - 1];
461 471 var isAutoCalled = $scope.Get3DwindowStoreData(windowviewid, 'minmaxAutoEvent');
462 472 if(!isAutoCalled)
463 473 {
... ... @@ -465,8 +475,23 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
465 475 }
466 476 $scope.Set3DwindowStoreData(windowviewid, 'maximised',true);
467 477 $scope.Set3DwindowStoreData(windowviewid, 'minimised',false);
  478 + var canvasDIvHeight = $('#ThreeDImagePanel_' + windowviewid+ " .jsPanel-content").height();
  479 + $('#thContentDiv_'+ windowviewid ).css("height",canvasDIvHeight);
  480 + var $ua = navigator.userAgent;
  481 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  482 + var aodheight = screen.height;
  483 + if(aodheight>=1024)
  484 + {
  485 + $("#ThreeDImagePanel_"+windowviewid).css('height',canvasDIvHeight+30-150);
  486 + $('#ThreeDImagePanel_' + windowviewid+ " .jsPanel-content").css('height',canvasDIvHeight-150);
  487 + $('#thContentDiv_'+windowviewid).css('height',canvasDIvHeight-150);
  488 + }
  489 + }
468 490 },
469 491 onnormalized:function (panel) {
  492 + var pnlName=panel[0].id;
  493 + var len = (pnlName).split("_").length;
  494 + var windowviewid = (pnlName).split("_")[len - 1];
470 495 var isAutoCalled = $scope.Get3DwindowStoreData(windowviewid, 'minmaxAutoEvent');
471 496 if(!isAutoCalled)
472 497 {
... ... @@ -474,24 +499,35 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
474 499 }
475 500 $scope.Set3DwindowStoreData(windowviewid, 'minimised',false);
476 501 $scope.Set3DwindowStoreData(windowviewid, 'maximised',false);
  502 + var canvasDIvHeight = $('#ThreeDImagePanel_' + windowviewid+ " .jsPanel-content").height();
  503 + $('#thContentDiv_'+ windowviewid ).css("height",canvasDIvHeight);
  504 + $rootScope.resetMenuOptionOnClick(pnlName);
477 505 },
478 506 resizable: {
479 507 stop: function (event, ui) {
480   - var len = (event.currentTarget.id).split("_").length;
481   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  508 + var pnlName=event.currentTarget.id;
  509 + var len = (pnlName).split("_").length;
  510 + var windowviewid = (pnlName).split("_")[len - 1];
482 511 $scope.Set3DwindowStoreData(windowviewid, 'width', ui.size.width);
483 512 $scope.Set3DwindowStoreData(windowviewid, 'height', ui.size.height);
  513 + $scope.Set3DwindowStoreData(windowviewid, 'y', ui.position.top);
  514 + $scope.Set3DwindowStoreData(windowviewid, 'x', ui.position.left);
484 515 $rootScope.UnsaveCurriculum = true;
  516 + var canvasDIvHeight = $('#ThreeDImagePanel_' + windowviewid+ " .jsPanel-content").height();
  517 + $('#thContentDiv_'+ windowviewid ).css("height",canvasDIvHeight);
  518 + $rootScope.resetMenuOptionOnClick(pnlName);
485 519 }
486 520  
487 521 },
488 522 draggable: {
489 523 stop: function( event, ui ) {
490   - var len = (event.currentTarget.id).split("_").length;
491   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  524 + var pnlName=event.currentTarget.id;
  525 + var len = (pnlName).split("_").length;
  526 + var windowviewid = (pnlName).split("_")[len - 1];
492 527 $scope.Set3DwindowStoreData(windowviewid, 'y', ui.position.top);
493 528 $scope.Set3DwindowStoreData(windowviewid, 'x', ui.position.left);
494 529 $rootScope.UnsaveCurriculum = true;
  530 + $rootScope.resetMenuOptionOnClick(pnlName);
495 531 }
496 532 },
497 533  
... ... @@ -508,6 +544,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
508 544 else {
509 545 $scope.jsPanel3D.normalize();
510 546 }
  547 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanel3D);
511 548 // set false after initial call of min,max or normal
512 549 $scope.Set3DwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
513 550 $scope.Set3DwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -524,14 +561,8 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
524 561 "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId,
525 562 "slug": $scope.Get3DwindowStoreData(windowviewid, 'currentSlug')
526 563 });
527   -
528   -
529   - }
530   -
531   - if (!$rootScope.isCallFromOtherModule) {
532   - $('#ThreeDView').css("height", $(window).outerHeight()-10);
533   -
534   - $('#ThreeDView').css("width", $(window).outerWidth()-20);
  564 + var canvasDIvHeight = $('#ThreeDImagePanel_' + windowviewid+ " .jsPanel-content").height();
  565 + $('#thContentDiv_'+ windowviewid ).css("height",canvasDIvHeight);
535 566  
536 567 }
537 568 //Calling methode for save Js Panel Activity for SaveCB
... ... @@ -548,6 +579,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location
548 579  
549 580 $rootScope.ThreeDWindowLoadComplete = true;
550 581 }
  582 +
551 583 $scope.JsPanelMouseEnter(windowviewid);
552 584  
553 585 }
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... ... @@ -548,7 +548,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
548 548 }
549 549 else
550 550 {
551   - $('#grid-view').css({"height":"690","overflow":"scroll"});
  551 + $('#grid-view').css({"height":"670","overflow":"scroll"});
552 552 $('#ListViewDiv').css({"height":"450","overflow":"scroll"});
553 553 }
554 554 }
... ... @@ -689,7 +689,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
689 689 localStorage.setItem("SearchText", currentSearchtext);
690 690 if (currentSearchtext == "undefined" || (currentSearchtext == null || currentSearchtext == "")) {
691 691 if ($scope.query.SearchText == "undefined" || ($scope.query.SearchText == null || $scope.query.SearchText == "")) {
692   - $rootScope.errorMessage = AIAConstants.PLEASE_ENTER_SEARCH_TEXT;
  692 + $('#errorMessage').text(AIAConstants.PLEASE_ENTER_SEARCH_TEXT);
693 693 $("#messageModal").modal('show');
694 694 $scope.EnableUI();
695 695 return false;
... ... @@ -972,7 +972,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
972 972 "mType": 'ADAM_IMAGES',
973 973 "windowTitle": $rootScope.ViewTitle,
974 974 "size": { height: 600, width: 900 },
975   - "position": { x: 300, y: 110 }
  975 + "position": { x: 1, y: 30 }
976 976 };
977 977  
978 978 window.parent.AIAModuleOpenResourceInfo(AIDopenData);
... ... @@ -1017,9 +1017,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1017 1017 }
1018 1018  
1019 1019 $rootScope.OpenAdamImageViewMain = function () {
1020   - $scope.DisableUI();
  1020 +
1021 1021 if ($rootScope.isCallFromOtherModule) {
1022 1022 $scope.AIModuleData = ModuleService.getModuleData("ADAM_IMAGES");
  1023 + if($scope.AIModuleData.length<1) return;
  1024 + $scope.DisableUI();
1023 1025 $scope.readyToLoad = true;
1024 1026 $rootScope.AIWindowLoadComplete = false;
1025 1027 $scope.wincount = 1;
... ... @@ -1042,6 +1044,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1042 1044 if ($scope.wincount == winlen && $rootScope.AIWindowLoadComplete == true) {
1043 1045 $scope.stopInterval();
1044 1046 $scope.$emit("LoadModuleComplete", "ADAM_IMAGES");
  1047 +
1045 1048 }
1046 1049  
1047 1050  
... ... @@ -1057,6 +1060,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1057 1060  
1058 1061 }
1059 1062 else {
  1063 + $scope.DisableUI();
1060 1064 $scope.OpenAdamImageView(null);
1061 1065 }
1062 1066 }
... ... @@ -1158,20 +1162,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1158 1162 $scope.jsPanelHeight = 540;
1159 1163  
1160 1164 $scope.jsPanelLeft = $scope.aiOpenInOtherModules.position.x;
1161   - if ($scope.aiOpenInOtherModules.position.x < 20)
1162   - $scope.jsPanelLeft = 20;
  1165 + if ($scope.aiOpenInOtherModules.position.x <= 1)
  1166 + $scope.jsPanelLeft =0;
1163 1167 $scope.jsPanelTop = $scope.aiOpenInOtherModules.position.y;
  1168 + if ($scope.aiOpenInOtherModules.position.y < 30)
  1169 + $scope.jsPanelTop = 30;
1164 1170  
1165 1171 if($location.url()!= "/curriculum-builder-detail") {
1166   - $scope.jsPanelLeft = 1;
1167   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
  1172 + $scope.jsPanelLeft = 1;
  1173 + $scope.jsPanelTop = 85;
1168 1174 }
1169 1175 }
1170 1176 else {
1171 1177 $scope.jsPanelWidth = $(window).innerWidth() - 30;
1172 1178 $scope.jsPanelHeight =$(window).innerHeight() - 150;
1173   - $scope.jsPanelLeft = 15;
1174   - $scope.jsPanelTop = 70;
  1179 + $scope.jsPanelLeft = 1;
  1180 + $scope.jsPanelTop = 55;
1175 1181  
1176 1182 }
1177 1183  
... ... @@ -1201,6 +1207,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1201 1207 height: $scope.jsPanelHeight
1202 1208 },
1203 1209 onminimized:function (panel) {
  1210 + var pnlName=panel[0].id;
  1211 + var len = (pnlName).split("_").length;
  1212 + var windowviewid = (pnlName).split("_")[len - 1];
1204 1213 var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent');
1205 1214 if(!isAutoCalled)
1206 1215 {
... ... @@ -1210,6 +1219,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1210 1219 $scope.SetAIwindowStoreData(windowviewid, 'maximised',false);
1211 1220 },
1212 1221 onmaximized:function (panel) {
  1222 + var pnlName=panel[0].id;
  1223 + var len = (pnlName).split("_").length;
  1224 + var windowviewid = (pnlName).split("_")[len - 1];
1213 1225 var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent');
1214 1226 if(!isAutoCalled)
1215 1227 {
... ... @@ -1219,9 +1231,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1219 1231 $scope.SetAIwindowStoreData(windowviewid, 'minimised',false);
1220 1232 var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height();
1221 1233 $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5);
  1234 + $rootScope.resetMenuOptionOnClick(pnlName);
1222 1235  
1223 1236 },
1224 1237 onnormalized:function (panel) {
  1238 + var pnlName=panel[0].id;
  1239 + var len = (pnlName).split("_").length;
  1240 + var windowviewid = (pnlName).split("_")[len - 1];
1225 1241 var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent');
1226 1242 if(!isAutoCalled)
1227 1243 {
... ... @@ -1231,26 +1247,33 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1231 1247 $scope.SetAIwindowStoreData(windowviewid, 'maximised',false);
1232 1248 var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height();
1233 1249 $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5);
  1250 + $rootScope.resetMenuOptionOnClick(pnlName);
1234 1251 },
1235 1252 resizable: {
1236 1253 stop: function (event, ui) {
1237   - var len = (event.currentTarget.id).split("_").length;
1238   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1254 + var pnlName=event.currentTarget.id;
  1255 + var len = (pnlName).split("_").length;
  1256 + var windowviewid = (pnlName).split("_")[len - 1];
1239 1257 $scope.SetAIwindowStoreData(windowviewid, 'width', ui.size.width);
1240 1258 $scope.SetAIwindowStoreData(windowviewid, 'height', ui.size.height);
  1259 + $scope.SetAIwindowStoreData(windowviewid, 'y', ui.position.top);
  1260 + $scope.SetAIwindowStoreData(windowviewid, 'x', ui.position.left);
1241 1261 $rootScope.UnsaveCurriculum = true;
1242 1262 var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height();
1243 1263 $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5);
  1264 + $rootScope.resetMenuOptionOnClick(pnlName);
1244 1265 }
1245 1266  
1246 1267 },
1247 1268 draggable: {
1248 1269 stop: function( event, ui ) {
1249   - var len = (event.currentTarget.id).split("_").length;
1250   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1270 + var pnlName=event.currentTarget.id;
  1271 + var len = (pnlName).split("_").length;
  1272 + var windowviewid = (pnlName).split("_")[len - 1];
1251 1273 $scope.SetAIwindowStoreData(windowviewid, 'y', ui.position.top);
1252 1274 $scope.SetAIwindowStoreData(windowviewid, 'x', ui.position.left);
1253 1275 $rootScope.UnsaveCurriculum = true;
  1276 + $rootScope.resetMenuOptionOnClick(pnlName);
1254 1277 }
1255 1278 },
1256 1279  
... ... @@ -1267,6 +1290,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1267 1290 else {
1268 1291 $scope.jsPanelAI.normalize();
1269 1292 }
  1293 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelAI);
  1294 +
1270 1295 // set false after initial call of min,max or normal
1271 1296 $scope.SetAIwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
1272 1297 $scope.SetAIwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -1278,27 +1303,24 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1278 1303  
1279 1304 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
1280 1305 var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height();
1281   - // console.log($rootScope.OpenAdamImages);
1282   - if (!$rootScope.isCallFromOtherModule) {
1283   - $('#AIView').css("height", $(window).innerHeight()-100);
1284   - $('#AIView').css("width",$(window).innerWidth()-100);
1285   - }
1286 1306  
1287 1307 $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5);
1288 1308  
1289 1309  
1290 1310 var canvas = document.getElementById("canvasAI_" + windowviewid);
1291 1311 var canvasPaint = document.getElementById("canvasPaintAI_" + windowviewid);
1292   -
1293   - canvas.height = canvasDIvHeight-30;
1294   - canvasPaint.height = canvasDIvHeight-30;
  1312 +
1295 1313 var $ua = navigator.userAgent;
1296 1314 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
1297 1315 canvas.width = screen.width-20;
1298 1316 canvasPaint.width = screen.width-20;
  1317 + canvas.height = screen.height-130;
  1318 + canvasPaint.height = screen.height-130;
1299 1319 }
1300 1320 else
1301   - {
  1321 + {
  1322 + canvas.height = screen.height-280;
  1323 + canvasPaint.height = screen.height-280;
1302 1324 canvas.width = screen.width-40;
1303 1325 canvasPaint.width = screen.width-40;
1304 1326 }
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
1 1 ๏ปฟ'use strict';
2 2  
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) {
  3 +AIA.controller("AODController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout","DataService", "ModuleService", "$interval", "AuthenticationService", "AIAConstants",
  4 +function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout,DataService, ModuleService, $interval,AuthenticationService, AIAConstants) {
5 5 $scope.ObjectAttribute=function(windowviewid)
6 6 {
7 7 var windata={
8 8 'multiwinid': windowviewid,
9 9 'AODAnimationData': [],
10 10 'moduleName': '',
11   - 'aodUrl':'',
  11 + 'aodUrl':'AodHome/CoursePlayerAIA',
12 12 'courseId':'',
13   - 'uid':'2',//categoty id. courseid cheched in category id
  13 + 'uid':'2',//categoty id. courseid checked in category id
14 14 'requestType':'SCORMPackage',
15 15 'currentViewTitle': '',
16 16 'parentSlugName': '',
17   - 'currentSlug': '',
18   - 'imageId': ''
  17 + 'currentSlug': '',
19 18 };
20 19 return windata;
21 20 }
... ... @@ -109,22 +108,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
109 108  
110 109 if (index != -1) {
111 110 // remove module which one is loaded
112   - var reffid=$rootScope.AODWindowData[index].imageId;
113 111 $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 112 if ($('#' + panelid).html() != undefined) {
123 113  
124 114 $('#' + panelid).remove();
125 115  
126 116 }
127   - // $rootScope.resetjsPanelTop(panelid);
128 117 }
129 118 }
130 119 }
... ... @@ -166,62 +155,45 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
166 155 if ($rootScope.refreshcheck == null) {
167 156 $location.path('/');
168 157 }
169   - // code that will be executed ...
170   - // every time this view is loaded
171   -
172   -
  158 +
173 159 $rootScope.currentActiveModuleTitle = "ADAM ON DEMAND";
174 160  
175 161 $scope.SetAODwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "ADAM ON DEMAND");
176 162  
177 163 $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   - };
  164 +
  165 + };
204 166  
205 167 $scope.LoadAODJsonData = function (windowviewid) {
206 168  
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();
  169 + //LicenseId would be zero for admin and gernal admin
  170 + //get this from DB
  171 + AuthenticationService.GetAodCoursesList($rootScope.userData.LicenseId)
  172 + .then(
  173 + function (aodResult) {
  174 + if(aodResult.length>0 && aodResult != AIAConstants.NO_COURSE_FOUND)
  175 + {
215 176  
216   - $scope.SetAODwindowStoreData(windowviewid, 'AODAnimationData', AODAnimationData);
  177 + var AODAnimationData = new jinqJs()
  178 + .from(aodResult)
  179 + .orderBy([{ field: 'BodySystem', sort: 'asc' }])
  180 + .select();
217 181  
218   - },
219   - function (error) {
220   - $scope.EnableUI();
221   -
222   - }
223   - );
  182 + $scope.SetAODwindowStoreData(windowviewid, 'AODAnimationData', AODAnimationData);
  183 +
  184 + $scope.loadAODList(windowviewid);
  185 + }
  186 + else
  187 + {
  188 + $('#errorMessage').text(AIAConstants.NO_COURSE_FOUND_MESSAGE);
  189 + $("#messageModal").modal('show');
  190 + $scope.EnableUI();
224 191  
  192 + }
  193 + },
  194 + function (error) {
  195 + $scope.EnableUI();
  196 + })
225 197  
226 198 };
227 199  
... ... @@ -232,13 +204,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
232 204 $('#grid-view').empty();
233 205  
234 206 angular.forEach(selectedAODListViewData, function (value, key) {
235   - var imagePath = "~/../content/images/aod/thumbnails/" + value._ThumbnailImage;
  207 + var imagePath = "~/../content/images/aod/thumbnails/" + value.CourseId+'.jpg';
236 208  
237 209  
238   - var $el = $('<div id="' + value._ImageId + '" class="col-sm-3 col-lg-2" title = "'+ value._Title + '" data-ng-click="openView($event)">'
  210 + var $el = $('<div id="' + value.CourseId + '" class="col-sm-3 col-lg-2" title = "'+ value.CourseName + '" data-ng-click="openView($event)">'
239 211 + '<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');
  212 + + '<img id="' + value.CourseName + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + imagePath + '" alt="" title="" >'
  213 + + '<div class="caption" style="padding:0px;height:80px"><p style="height:15px"><em>'+'ID: '+ value.CourseId + '</em></p><p style="white-space:pre-wrap;height:60px">' + value.CourseName + '</p></div></a></div></div>').appendTo('#grid-view');
242 214  
243 215 $compile($el)($scope);
244 216  
... ... @@ -300,10 +272,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
300 272 var selectedTileData = [];
301 273 selectedTileData = new jinqJs()
302 274 .from(selectedAODListViewData)
303   - .where('_ImageId = ' + $event.currentTarget.id)
  275 + .where('CourseId = ' + $event.currentTarget.id)
304 276 .select();
305 277  
306   - $rootScope.ViewTitle = selectedTileData[0]._Title;
  278 + $rootScope.ViewTitle = selectedTileData[0].CourseName;
307 279 }
308 280 else {
309 281 $rootScope.ViewTitle = $event.currentTarget.textContent;
... ... @@ -313,35 +285,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
313 285 localStorage.setItem("currentBodyViewId", $event.currentTarget.id);
314 286  
315 287 $scope.SetAODwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle);
316   - $scope.SetAODwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id);
317   -
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   - }
  288 + $scope.SetAODwindowStoreData(windowviewid, 'courseId', $event.currentTarget.id);
341 289  
342   - );
  290 + var AODGridViewScrollPosition = $($window).scrollTop();
  291 + localStorage.setItem('AODGridViewScroll', AODGridViewScrollPosition);
  292 + $location.url('/AOD-view-detail');
343 293  
344   -
345 294 }
346 295  
347 296  
... ... @@ -361,11 +310,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
361 310 var uid = $scope.GetAODwindowStoreData(windowviewid, 'uid');
362 311 var requestType = $scope.GetAODwindowStoreData(windowviewid, 'requestType');
363 312 var aodSiteUrl = aodlink+"?SessionId=" + $rootScope.userData.SessionId + "&Courseid=" + courseid + "&type="+requestType +"&uID=" + uid+ ",_self";
  313 + //var aodSiteUrl = aodlink+"?SessionId=1625199179202" + "&Courseid=" + courseid + "&type="+requestType +"&uID=" + uid+ ",_self";
364 314  
365 315 $scope.jsPanelWidth = $(window).outerWidth() - 20;
366 316 $scope.jsPanelHeight = $(window).outerHeight() - 140;
367 317 $scope.jsPanelLeft = 1;
368   - $scope.jsPanelTop = 70;
  318 + $scope.jsPanelTop = 55;
369 319  
370 320 if (aodlink.length > 0 ) {
371 321 $scope.jsPanelVideo = $.jsPanel({
... ... @@ -374,8 +324,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
374 324 theme: 'success',
375 325 currentController: 'AODController',
376 326 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>'+
  327 + content: '<div id="aodContentDiv_'+windowviewid+'" style="height: 100%; width: 100%; overflow: scroll;" >' +
  328 + '<iframe name="aodFrame" src="" style="width: 100%;height:100%" id="aodvideo_' + windowviewid + '" onload="MyAODvideoOnLoad(event)" allow="autoplay" allowfullscreen></iframe>'+
379 329 '</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 330 title: tittle,
381 331 position: {
... ... @@ -388,13 +338,39 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
388 338 height: $scope.jsPanelHeight
389 339 },
390 340 controls: { buttons: 'closeonly' },
  341 + onmaximized:function (panel) {
  342 + var pnlName=panel[0].id;
  343 + var len = (pnlName).split("_").length;
  344 + var windowviewid = (pnlName).split("_")[len - 1];
  345 + var canvasDIvHeight = $('#aodImagePanel_' + windowviewid+ " .jsPanel-content").height();
  346 + $('#aodContentDiv_'+ windowviewid ).css("height",canvasDIvHeight);
  347 + var $ua = navigator.userAgent;
  348 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  349 + var aodheight = screen.height;
  350 + if(aodheight>=1024)
  351 + {
  352 + $("#aodImagePanel_"+windowviewid).css('height',canvasDIvHeight+30-100);
  353 + $('#aodImagePanel_' + windowviewid+ " .jsPanel-content").css('height',canvasDIvHeight-100);
  354 + $('#aodContentDiv_'+windowviewid).css('height',canvasDIvHeight-100);
  355 + }
  356 + }
  357 + },
391 358 resizable: {
392 359 start:function(event, ui)
393 360 {
394   - var len = (event.currentTarget.id).split("_").length;
395   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  361 + var pnlName=event.currentTarget.id;
  362 + var len = (pnlName).split("_").length;
  363 + var windowviewid = (pnlName).split("_")[len - 1];
396 364 $('#aodvideo_'+windowviewid).css("display",'block');
397   -
  365 + },
  366 + stop:function(event, ui)
  367 + {
  368 + var pnlName=event.currentTarget.id;
  369 + var len = (pnlName).split("_").length;
  370 + var windowviewid = (pnlName).split("_")[len - 1];
  371 +
  372 + var canvasDIvHeight = $('#aodImagePanel_' + windowviewid+ " .jsPanel-content").height();
  373 + $('#aodContentDiv_'+ windowviewid ).css("height",canvasDIvHeight);
398 374 }
399 375 },
400 376  
... ... @@ -402,15 +378,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
402 378  
403 379  
404 380 $scope.jsPanelVideo.maximize();
  381 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelVideo);
405 382 $scope.SetAODwindowStoreData(windowviewid, 'currentSlug', 'AOD-view-detail');
406 383 $('html, body').animate({ scrollTop: 0 });
407 384  
408 385 $('#aodvideo_' + windowviewid).attr('src', aodSiteUrl);
409   - }
410   - $('#AODView').css("height", $(window).outerHeight() - 20);
411   -
412   - $('#AODView').css("width", $(window).outerWidth() - 30);
413 386  
  387 + }
  388 +
414 389 //Calling methode for save Js Panel Activity for SaveCB
415 390 $scope.PanelActivity();
416 391  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -114,15 +114,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
114 114 }
115 115 }
116 116  
117   - $rootScope.GetCAWindowId = function () {
118   - // handle for single window
119   - if ($rootScope.CAWindowData.length > 0) {
120   - for (var x = 0 ; x < $rootScope.CAWindowData.length; x++) {
  117 + // access from home controller
  118 + $rootScope.SetCAwindowData=function(windowviewid,keyname,data) {
  119 + for(var x=0 ;x < $rootScope.CAWindowData.length;x++){
121 120  
122   - return $rootScope.CAWindowData[x].multiwinid;
  121 + if($rootScope.CAWindowData[x].multiwinid==windowviewid)
  122 + {
  123 + $rootScope.CAWindowData[x][keyname]=data;
123 124 }
124 125 }
125   - else return 0;
126 126 }
127 127  
128 128 $scope.DisableUI = function () {
... ... @@ -695,8 +695,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
695 695 }
696 696 else
697 697 {
698   - $('#grid-view').css({"height":"720","overflow":"scroll"});
699   - $('#ListViewDiv').css({"height":"480","overflow":"scroll"});
  698 + $('#grid-view').css({"height":"696","overflow":"scroll"});
  699 + $('#ListViewDiv').css({"height":"460","overflow":"scroll"});
700 700 }
701 701 }
702 702 $scope.scroll = function () {
... ... @@ -732,7 +732,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
732 732 "textVisible": true,
733 733 "windowTitle": $rootScope.ViewTitle,
734 734 "size": { height: 600, width: 900 },
735   - "position": { x: 300, y: 110 }
  735 + "position": { x: 1, y: 30 }
736 736 };
737 737  
738 738 window.parent.AIAModuleOpenResourceInfo(CADopenData);
... ... @@ -783,9 +783,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
783 783 }
784 784  
785 785 $rootScope.openCABodyViewMain = function () {
786   - $scope.DisableUI();
  786 +
787 787 if ($rootScope.isCallFromOtherModule) {
788 788 $scope.CAModuleData = ModuleService.getModuleData("CLINICAL_ANIMATIONS");
  789 + if($scope.CAModuleData.length<1) return;
  790 + $scope.DisableUI();
789 791 $scope.readyToLoad = true;
790 792 $rootScope.CAWindowLoadComplete = false;
791 793 $scope.wincount = 1;
... ... @@ -823,6 +825,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
823 825  
824 826 }
825 827 else {
  828 + $scope.DisableUI();
826 829 $scope.openBodyView(null);
827 830 }
828 831 }
... ... @@ -960,15 +963,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
960 963 if ($scope.caOpenInOtherModules.size.height < 510)
961 964 $scope.jsPanelHeight = 510;
962 965  
963   - $scope.jsPanelLeft = $scope.caOpenInOtherModules.position.x;
964   - if ($scope.caOpenInOtherModules.position.x < 20)
965   - $scope.jsPanelLeft = 20;
966   - $scope.jsPanelTop = $scope.caOpenInOtherModules.position.y;
967   -
968   - if($location.url()!= "/curriculum-builder-detail") {
969   - $scope.jsPanelLeft = 1;
970   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
971   - }
  966 + $scope.jsPanelLeft = $scope.caOpenInOtherModules.position.x;
  967 + if ($scope.caOpenInOtherModules.position.x <= 1)
  968 + $scope.jsPanelLeft = 0;
  969 + $scope.jsPanelTop = $scope.caOpenInOtherModules.position.y;
  970 + if ($scope.caOpenInOtherModules.position.y < 30)
  971 + $scope.jsPanelTop = 30;
  972 +
  973 + if($location.url()!= "/curriculum-builder-detail") {
  974 + $scope.jsPanelLeft = 1;
  975 + $scope.jsPanelTop = 85;
  976 + }
972 977 }
973 978  
974 979 }
... ... @@ -976,7 +981,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
976 981 $scope.jsPanelWidth = $(window).outerWidth()-30;
977 982 $scope.jsPanelHeight = $(window).outerHeight() - 105;
978 983 $scope.jsPanelLeft = 1;
979   - $scope.jsPanelTop = 70;
  984 + $scope.jsPanelTop = 55;
980 985 }
981 986  
982 987  
... ... @@ -988,7 +993,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
988 993 currentController: 'CAController',
989 994 parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'),
990 995 content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCA(event); });});</script>' +
991   - '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="70%" height="400"' +
  996 + '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="100%" height="400"' +
992 997 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="videoOnLoad(event)"' +
993 998 ' poster="' + poster + '"' +
994 999 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' +
... ... @@ -1016,6 +1021,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1016 1021 height: $scope.jsPanelHeight
1017 1022 },
1018 1023 onminimized:function (panel) {
  1024 + var pnlName=panel[0].id;
  1025 + var len = (pnlName).split("_").length;
  1026 + var windowviewid = (pnlName).split("_")[len - 1];
1019 1027 var isAutoCalled = $scope.GetCAwindowStoreData(windowviewid, 'minmaxAutoEvent');
1020 1028 if(!isAutoCalled)
1021 1029 {
... ... @@ -1025,6 +1033,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1025 1033 $scope.SetCAwindowStoreData(windowviewid, 'maximised',false);
1026 1034 },
1027 1035 onmaximized:function (panel) {
  1036 + var pnlName=panel[0].id;
  1037 + var len = (pnlName).split("_").length;
  1038 + var windowviewid = (pnlName).split("_")[len - 1];
1028 1039 var isAutoCalled = $scope.GetCAwindowStoreData(windowviewid, 'minmaxAutoEvent');
1029 1040 if(!isAutoCalled)
1030 1041 {
... ... @@ -1032,10 +1043,28 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1032 1043 }
1033 1044 $scope.SetCAwindowStoreData(windowviewid, 'maximised',true);
1034 1045 $scope.SetCAwindowStoreData(windowviewid, 'minimised',false);
1035   - var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
  1046 + var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
1036 1047 $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 );
  1048 + $rootScope.resetMenuOptionOnClick(pnlName);
  1049 + var $ua = navigator.userAgent;
  1050 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  1051 + var aodheight = screen.height;
  1052 + if(aodheight>=1024)
  1053 + {
  1054 + $("#caImagePanel_"+windowviewid).css('height',canvasDIvHeight+30-150);
  1055 + $('#caImagePanel_' + windowviewid+ " .jsPanel-content").css('height',canvasDIvHeight-150);
  1056 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-150-120 );
  1057 + }
  1058 + else if(aodheight<1024)
  1059 + {
  1060 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 );
  1061 + }
  1062 + }
1037 1063 },
1038 1064 onnormalized:function (panel) {
  1065 + var pnlName=panel[0].id;
  1066 + var len = (pnlName).split("_").length;
  1067 + var windowviewid = (pnlName).split("_")[len - 1];
1039 1068 var isAutoCalled = $scope.GetCAwindowStoreData(windowviewid, 'minmaxAutoEvent');
1040 1069 if(!isAutoCalled)
1041 1070 {
... ... @@ -1045,26 +1074,33 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1045 1074 $scope.SetCAwindowStoreData(windowviewid, 'maximised',false);
1046 1075 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
1047 1076 $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 );
  1077 + $rootScope.resetMenuOptionOnClick(pnlName);
1048 1078 },
1049 1079 resizable: {
1050 1080 stop: function (event, ui) {
1051   - var len = (event.currentTarget.id).split("_").length;
1052   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1081 + var pnlName=event.currentTarget.id;
  1082 + var len = (pnlName).split("_").length;
  1083 + var windowviewid = (pnlName).split("_")[len - 1];
1053 1084 $scope.SetCAwindowStoreData(windowviewid, 'width', ui.size.width);
1054 1085 $scope.SetCAwindowStoreData(windowviewid, 'height', ui.size.height);
  1086 + $scope.SetCAwindowStoreData(windowviewid, 'y', ui.position.top);
  1087 + $scope.SetCAwindowStoreData(windowviewid, 'x', ui.position.left);
1055 1088 $rootScope.UnsaveCurriculum = true;
1056 1089 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
1057 1090 $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 );
  1091 + $rootScope.resetMenuOptionOnClick(pnlName);
1058 1092 }
1059 1093  
1060 1094 },
1061 1095 draggable: {
1062 1096 stop: function( event, ui ) {
1063   - var len = (event.currentTarget.id).split("_").length;
1064   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1097 + var pnlName=event.currentTarget.id;
  1098 + var len = (pnlName).split("_").length;
  1099 + var windowviewid = (pnlName).split("_")[len - 1];
1065 1100 $scope.SetCAwindowStoreData(windowviewid, 'y', ui.position.top);
1066 1101 $scope.SetCAwindowStoreData(windowviewid, 'x', ui.position.left);
1067 1102 $rootScope.UnsaveCurriculum = true;
  1103 + $rootScope.resetMenuOptionOnClick(pnlName);
1068 1104 }
1069 1105 },
1070 1106  
... ... @@ -1082,6 +1118,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1082 1118 else {
1083 1119 $scope.jsPanelCA.normalize();
1084 1120 }
  1121 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelCA);
1085 1122 // set false after initial call of min,max or normal
1086 1123 $scope.SetCAwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
1087 1124 $scope.SetCAwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -1123,11 +1160,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1123 1160  
1124 1161 }
1125 1162  
1126   - if (!$rootScope.isCallFromOtherModule) {
1127   - $('#CAView').css("height", $(window).outerHeight() - 20);
1128   - $('#CAView').css("width", $(window).outerWidth() - 30);
1129   -
1130   - }
1131 1163 //Calling methode for save Js Panel Activity for SaveCB
1132 1164 $scope.PanelActivity();
1133 1165 }
... ... @@ -1140,6 +1172,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1140 1172 //$scope.JsPanelclick(windowviewid);
1141 1173 $rootScope.CAWindowLoadComplete = true;
1142 1174 }
  1175 +
1143 1176 $scope.JsPanelclick(windowviewid);
1144 1177  
1145 1178 var isTextVisible = $scope.GetCAwindowStoreData(windowviewid, 'isTextVisible');
... ... @@ -1154,7 +1187,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1154 1187 $("#sid_" + windowviewid).css("visibility", "hidden");
1155 1188  
1156 1189 }
1157   -
  1190 +
1158 1191 }
1159 1192  
1160 1193 $scope.JsPanelclick = function (windowviewid) {
... ... @@ -1171,6 +1204,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1171 1204 var pnlName = event.currentTarget.id;
1172 1205 $rootScope.resetMenuOptionOnClick(pnlName);
1173 1206 });
  1207 +
1174 1208 }
1175 1209  
1176 1210 $scope.loadCAPlayer = function (summary, link, vidNumber) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... ... @@ -715,7 +715,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
715 715 }
716 716 else
717 717 {
718   - $('#grid-view').css({"height":"720","overflow":"scroll"});
  718 + $('#grid-view').css({"height":"696","overflow":"scroll"});
719 719 $('#ListViewDiv').css({"height":"480","overflow":"scroll"});
720 720 }
721 721 }
... ... @@ -753,8 +753,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
753 753 "mType": 'CLINICAL_ILLUSTRATIONS',
754 754 "textVisible": true,
755 755 "windowTitle": $rootScope.ViewTitle,
756   - "size": { height: 500, width: 900 },
757   - "position": { x: 300, y: 110 }
  756 + "size": { height: 600, width: 900 },
  757 + "position": { x: 1, y: 30 }
758 758 };
759 759  
760 760 window.parent.AIAModuleOpenResourceInfo(CIDopenData);
... ... @@ -796,9 +796,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
796 796 }
797 797  
798 798 $rootScope.openCIBodyViewMain = function () {
799   - $scope.DisableUI();
800 799 if ($rootScope.isCallFromOtherModule) {
801 800 $scope.CIModuleData = ModuleService.getModuleData("CLINICAL_ILLUSTRATIONS");
  801 + if($scope.CIModuleData.length<1) return;
  802 + $scope.DisableUI();
802 803 $scope.readyToLoad = true;
803 804 $rootScope.CIWindowLoadComplete = false;
804 805 $scope.wincount = 1;
... ... @@ -836,6 +837,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
836 837  
837 838 }
838 839 else {
  840 + $scope.DisableUI();
839 841 $scope.openBodyView(null);
840 842 }
841 843 }
... ... @@ -944,22 +946,24 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
944 946 if ($scope.ciOpenInOtherModules.size.height < 540)
945 947 $scope.jsPanelHeight = 540;
946 948  
947   - $scope.jsPanelLeft = $scope.ciOpenInOtherModules.position.x;
948   - if ($scope.ciOpenInOtherModules.position.x < 20)
949   - $scope.jsPanelLeft = 20;
950   - $scope.jsPanelTop = $scope.ciOpenInOtherModules.position.y;
951   -
952   - if($location.url()!= "/curriculum-builder-detail") {
953   - $scope.jsPanelLeft = 1;
954   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
955   - }
  949 + $scope.jsPanelLeft = $scope.ciOpenInOtherModules.position.x;
  950 + if ($scope.ciOpenInOtherModules.position.x <= 1)
  951 + $scope.jsPanelLeft = 0;
  952 + $scope.jsPanelTop = $scope.ciOpenInOtherModules.position.y;
  953 + if ($scope.ciOpenInOtherModules.position.y < 30)
  954 + $scope.jsPanelTop = 30;
  955 +
  956 + if($location.url()!= "/curriculum-builder-detail") {
  957 + $scope.jsPanelLeft = 1;
  958 + $scope.jsPanelTop = 85;
  959 + }
956 960  
957 961 }
958 962 else {
959 963 $scope.jsPanelWidth = $(window).outerWidth() - 30;
960 964 $scope.jsPanelHeight = $(window).outerHeight() - 150;
961   - $scope.jsPanelLeft = 15;
962   - $scope.jsPanelTop = 70;
  965 + $scope.jsPanelLeft = 1;
  966 + $scope.jsPanelTop = 55;
963 967 }
964 968  
965 969 $scope.jsPanelCI = $.jsPanel({
... ... @@ -974,7 +978,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
974 978 '<div class="img-thumbnail" style="overflow: scroll;width:100%;position:relative" id="canvasDivCI_' + windowviewid + '"> <canvas id="canvasPaintCI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2270" height="700" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasCI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2270" height="700" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' +
975 979 //'<div class="col-sm-12 img-thumbnail" align="center">' +
976 980 '<img id="ciimage_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden">' +
977   - '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;bottom:0px;margin-bottom:0px;padding:5px;width:99%">' +
  981 + '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;margin-bottom:0px;padding:5px;width:99%">' +
978 982 '<div id="sid_' + windowviewid + '" align="left" style="height:100px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' +
979 983 '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { $(".jsPanel-content").css({ "width": "100%"});$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCI(event);});});</script></div>' +
980 984 '</div>'+
... ... @@ -990,6 +994,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
990 994 height: $scope.jsPanelHeight
991 995 },
992 996 onminimized:function (panel) {
  997 + var pnlName=panel[0].id;
  998 + var len = (pnlName).split("_").length;
  999 + var windowviewid = (pnlName).split("_")[len - 1];
993 1000 var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent');
994 1001 if(!isAutoCalled)
995 1002 {
... ... @@ -999,6 +1006,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
999 1006 $scope.SetCIwindowStoreData(windowviewid, 'maximised',false);
1000 1007 },
1001 1008 onmaximized:function (panel) {
  1009 + var pnlName=panel[0].id;
  1010 + var len = (pnlName).split("_").length;
  1011 + var windowviewid = (pnlName).split("_")[len - 1];
1002 1012 var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent');
1003 1013 if(!isAutoCalled)
1004 1014 {
... ... @@ -1008,8 +1018,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1008 1018 $scope.SetCIwindowStoreData(windowviewid, 'minimised',false);
1009 1019 var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height();
1010 1020 $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight);
  1021 + $rootScope.resetMenuOptionOnClick(pnlName);
  1022 +
1011 1023 },
1012 1024 onnormalized:function (panel) {
  1025 + var pnlName=panel[0].id;
  1026 + var len = (pnlName).split("_").length;
  1027 + var windowviewid = (pnlName).split("_")[len - 1];
1013 1028 var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent');
1014 1029 if(!isAutoCalled)
1015 1030 {
... ... @@ -1019,13 +1034,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1019 1034 $scope.SetCIwindowStoreData(windowviewid, 'maximised',false);
1020 1035 var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height();
1021 1036 $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight);
  1037 + $rootScope.resetMenuOptionOnClick(pnlName);
1022 1038 },
1023 1039 resizable: {
1024 1040 stop: function (event, ui) {
1025   - var len = (event.currentTarget.id).split("_").length;
1026   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1041 + var pnlName=event.currentTarget.id;
  1042 + var len = (pnlName).split("_").length;
  1043 + var windowviewid = (pnlName).split("_")[len - 1];
1027 1044 $scope.SetCIwindowStoreData(windowviewid, 'width', ui.size.width);
1028 1045 $scope.SetCIwindowStoreData(windowviewid, 'height', ui.size.height);
  1046 + $scope.SetCIwindowStoreData(windowviewid, 'y', ui.position.top);
  1047 + $scope.SetCIwindowStoreData(windowviewid, 'x', ui.position.left);
1029 1048 $rootScope.UnsaveCurriculum = true;
1030 1049 var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height();
1031 1050 //annotation lost after resize paint canvas
... ... @@ -1038,6 +1057,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1038 1057 // canvasPaint.width = canvasDIvWidth;
1039 1058  
1040 1059 $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight);
  1060 + $rootScope.resetMenuOptionOnClick(pnlName);
1041 1061  
1042 1062  
1043 1063 }
... ... @@ -1045,11 +1065,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1045 1065 },
1046 1066 draggable: {
1047 1067 stop: function( event, ui ) {
1048   - var len = (event.currentTarget.id).split("_").length;
1049   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1068 + var pnlName=event.currentTarget.id;
  1069 + var len = (pnlName).split("_").length;
  1070 + var windowviewid = (pnlName).split("_")[len - 1];
1050 1071 $scope.SetCIwindowStoreData(windowviewid, 'y', ui.position.top);
1051 1072 $scope.SetCIwindowStoreData(windowviewid, 'x', ui.position.left);
1052 1073 $rootScope.UnsaveCurriculum = true;
  1074 + $rootScope.resetMenuOptionOnClick(pnlName);
1053 1075 }
1054 1076 },
1055 1077  
... ... @@ -1066,6 +1088,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1066 1088 else {
1067 1089 $scope.jsPanelCI.normalize();
1068 1090 }
  1091 +
  1092 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelCI);
1069 1093 // set false after initial call of min,max or normal
1070 1094 $scope.SetCIwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
1071 1095 $scope.SetCIwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -1075,36 +1099,45 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1075 1099  
1076 1100  
1077 1101 $scope.SetCIwindowStoreData(windowviewid, 'currentSlug', 'clinical-illustrations-detail');
  1102 + var $ua = navigator.userAgent;
  1103 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  1104 + $('#summary_' + windowviewid).css("top", screen.height-270);
  1105 + }
  1106 + else
  1107 + {
  1108 + $('#summary_' + windowviewid).css("top", screen.height-420);
  1109 + }
1078 1110 $timeout(function () {
1079 1111 var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height();
1080 1112  
1081 1113 $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight);
1082 1114  
1083   - if (!$rootScope.isCallFromOtherModule) {
1084   - $('#CIView').css("height", $(window).outerHeight() - 65);
1085   - $('#CIView').css("width", $(window).outerWidth() - 15);
1086   -
  1115 + if (!$rootScope.isCallFromOtherModule) {
  1116 + $('#CIView').css("height", $(window).innerHeight()-100);
  1117 + $('#CIView').css("width",$(window).innerWidth()-100);
  1118 + }
  1119 +
1087 1120 var canvas = document.getElementById("canvasCI_" + windowviewid);
1088 1121 var canvasPaint = document.getElementById("canvasPaintCI_" + windowviewid);
1089   - canvas.height = canvasDIvHeight-30;
1090   - canvasPaint.height = canvasDIvHeight-30;
1091   -
  1122 +
1092 1123 var $ua = navigator.userAgent;
1093 1124 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
1094 1125 canvas.width = screen.width-20;
1095 1126 canvasPaint.width = screen.width-20;
  1127 + canvas.height = screen.height-270;
  1128 + canvasPaint.height = screen.height-270;
1096 1129 }
1097 1130 else
1098 1131 {
1099 1132 canvas.width = screen.width-40;
1100 1133 canvasPaint.width = screen.width-40;
  1134 + canvas.height = screen.height-400;
  1135 + canvasPaint.height = screen.height-400;
1101 1136 }
1102 1137 if(screen.height<400)
1103 1138 {
1104 1139 $('#summary_' + windowviewid).css("bottom", "-220px");
1105 1140 }
1106   -
1107   - }
1108 1141  
1109 1142 var openedImage = document.getElementById('ciimage_' + windowviewid );
1110 1143 openedImage.src = selectedCIImage;
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... ... @@ -32,13 +32,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
32 32  
33 33 var $ua = navigator.userAgent;
34 34 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
35   - $("#treecontent").css('height',screen.height-140);
36   - $("#cbdivarea").css('height',screen.height-70);
  35 + $("#treecontent").css('height',screen.height-130);
  36 + $("#cbdivarea").css('height',screen.height-60);
37 37 }
38 38 else
39 39 {
40   - $("#treecontent").css('height',screen.height-280);
41   - $("#cbdivarea").css('height',screen.height-210);
  40 + $("#treecontent").css('height',screen.height-270);
  41 + $("#cbdivarea").css('height',screen.height-200);
42 42 }
43 43  
44 44 $('#sidebar-wrapper').unbind('click');
... ... @@ -288,7 +288,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
288 288 }
289 289  
290 290 $rootScope.OpenExistingCurriculum = function (event) {
291   -
292 291 var fileupload = document.getElementById("openCBJsonFile");
293 292 $timeout(function () {
294 293 $(fileupload).trigger('click');
... ... @@ -299,21 +298,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
299 298 var extension='';
300 299 var fileId, file, objFileRead;
301 300 if (typeof window.FileReader !== 'function') {
302   - $rootScope.errorMessage = "The file API isn't supported on this browser yet.";
  301 + $('#errorMessage').text(AIAConstants.File_API_Not_Supported);
303 302 $("#messageModal").modal('show');
304 303 return;
305 304 }
306 305 fileId = document.getElementById('openCBJsonFile');
307 306 if (!fileId) {
308   - $rootScope.errorMessage = "File couldn't find the element.";
  307 + $('#errorMessage').text(AIAConstants.File_No_Content_Found);
309 308 $("#messageModal").modal('show');
310 309 }
311 310 else if (!fileId.files) {
312   - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs.";
  311 + $('#errorMessage').text(AIAConstants.Browser_Not_Supported);
313 312 $("#messageModal").modal('show');
314 313 }
315 314 else if (!fileId.files[0]) {
316   - $rootScope.errorMessage = "Please select a file before clicking 'Load'.";
  315 + $('#errorMessage').text(AIAConstants.Select_File);
317 316 $("#messageModal").modal('show');
318 317 }
319 318 else
... ... @@ -327,7 +326,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
327 326 }
328 327 else
329 328 {
330   - $rootScope.errorMessage = AIAConstants.CB_FILE_FORMAT_ISSUE;
  329 + $('#errorMessage').text(AIAConstants.CB_FILE_FORMAT_ISSUE);
331 330 $("#messageModal").modal('show');
332 331 }
333 332  
... ... @@ -454,21 +453,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
454 453 var myfileName='';
455 454 var fileId, file, objFileRead;
456 455 if (typeof window.FileReader !== 'function') {
457   - $rootScope.errorMessage = "The file API isn't supported on this browser yet.";
  456 + $('#errorMessage').text(AIAConstants.File_API_Not_Supported);
458 457 $("#messageModal").modal('show');
459 458 return;
460 459 }
461 460 fileId = document.getElementById('xmltojsonfile');
462 461 if (!fileId) {
463   - $rootScope.errorMessage = "File couldn't find the element.";
  462 + $('#errorMessage').text(AIAConstants.File_No_Content_Found);
464 463 $("#messageModal").modal('show');
465 464 }
466 465 else if (!fileId.files) {
467   - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs.";
  466 + $('#errorMessage').text(AIAConstants.Browser_Not_Supported);
468 467 $("#messageModal").modal('show');
469 468 }
470 469 else if (!fileId.files[0]) {
471   - $rootScope.errorMessage = "Please select a file before clicking 'Load'.";
  470 + $('#errorMessage').text(AIAConstants.Select_File);
472 471 $("#messageModal").modal('show');
473 472 }
474 473 else
... ... @@ -485,7 +484,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
485 484 }
486 485 else
487 486 {
488   - $rootScope.errorMessage = AIAConstants.CB_FILE_FORMAT_ISSUE;"";
  487 + $('#errorMessage').text(AIAConstants.CB_FILE_FORMAT_ISSUE);
489 488 $("#messageModal").modal('show');
490 489 }
491 490  
... ... @@ -525,19 +524,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
525 524  
526 525 $scope.convertDownLoad = function (curriculumobject,myfileName) {
527 526 var blob = new Blob([angular.toJson(curriculumobject, true)], { type: 'text/json' });
528   -
529   - // document.execCommand("SaveAs", true, myfileName);
530   -
531   - // var event = document.createEvent('MouseEvents'),
532   - // saveElement = document.createElement('a');
533   - // saveElement.download = myfileName;
534   - // saveElement.href = window.URL.createObjectURL(blob);
535   - // saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':');
536   - // event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
537   - // saveElement.dispatchEvent(event);
538   -
539 527 //save file saver handle for all browser
540   - saveAs(blob, filename);
  528 + saveAs(blob, myfileName);
541 529  
542 530 }
543 531 $scope.checkCompatibility = function (curriculumobject) {
... ... @@ -734,9 +722,10 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
734 722 title: $rootScope.cbTreeFirstLabel,
735 723  
736 724 position: {
737   - top: 10,
738   - left: 10,
  725 + top: 0,
  726 + left:0,
739 727 },
  728 + draggable: "disabled",
740 729 controls: { buttons: 'closeonly' },
741 730 size: { width: 820, height: 450 },
742 731  
... ... @@ -748,7 +737,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
748 737 $("#CBTextArea_ifr").css("display", "block");
749 738 });
750 739  
751   - $('#CBTinyMCEPanel').draggable({ containment: '#cbdivarea', scroll: false });
  740 + // $('#CBTinyMCEPanel').draggable({ containment: '#cbdivarea', scroll: false });
752 741  
753 742 }, 200);
754 743  
... ... @@ -1203,16 +1192,16 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1203 1192  
1204 1193 if (password.trim() == "")
1205 1194 {
1206   - $('#errorMsg').text('password required!');
  1195 + $('#errorMsg').text(AIAConstants.CB_Password_Required);
1207 1196 return;
1208 1197 }
1209 1198 if (confirm_password.trim() == "")
1210 1199 {
1211   - $('#errorMsg').text('confirm password required!');
  1200 + $('#errorMsg').text(AIAConstants.CB_Confirm_Password);
1212 1201 return;
1213 1202 }
1214 1203 if (password != confirm_password) {
1215   - $('#errorMsg').text('confirm password not matched!');
  1204 + $('#errorMsg').text(AIAConstants.CB_Confirm_Password_Not_Match);
1216 1205 return false;
1217 1206 }
1218 1207 $('#errorMsg').text('');
... ... @@ -1236,10 +1225,9 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1236 1225 $scope.cbUnlockSlide = function () {
1237 1226 var nodeid = document.getElementById('cbSelect').value;
1238 1227 var password = $('#slidepass').val();
1239   -
1240 1228 if (password.trim() == "")
1241 1229 {
1242   - $rootScope.errorMessage = "Password field is empty.please try again!";
  1230 + $('#errorMessage').text(AIAConstants.CB_Password_Empty);
1243 1231 $("#messageModal").modal('show');
1244 1232 return;
1245 1233 }
... ... @@ -1250,7 +1238,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1250 1238 traverseTreeSelectedSingleObj($rootScope.structureObjForSaveCB, nodeid);
1251 1239 if ($scope.selectedNodeSingleObj._isBranch == "false") {
1252 1240 if (password != $scope.selectedNodeSingleObj._password) {
1253   - $rootScope.errorMessage = "Password is not matched.please try again!";
  1241 + $('#errorMessage').text(AIAConstants.CB_Password_Not_Match);
1254 1242 $("#messageModal").modal('show');
1255 1243 return false;
1256 1244 }
... ... @@ -1443,21 +1431,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1443 1431 var extension='';
1444 1432 var fileId, file, objFileRead;
1445 1433 if (typeof window.FileReader !== 'function') {
1446   - $rootScope.errorMessage = "The file API isn't supported on this browser yet.";
  1434 + $('#errorMessage').text(AIAConstants.File_API_Not_Supported);
1447 1435 $("#messageModal").modal('show');
1448 1436 return;
1449 1437 }
1450 1438 fileId = document.getElementById('openCBJsonFile');
1451 1439 if (!fileId) {
1452   - $rootScope.errorMessage = "File couldn't find the element.";
  1440 + $('#errorMessage').text(AIAConstants.File_No_Content_Found);
1453 1441 $("#messageModal").modal('show');
1454 1442 }
1455 1443 else if (!fileId.files) {
1456   - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs.";
  1444 + $('#errorMessage').text(AIAConstants.Browser_Not_Supported);
1457 1445 $("#messageModal").modal('show');
1458 1446 }
1459 1447 else if (!fileId.files[0]) {
1460   - $rootScope.errorMessage = "Please select a file before clicking 'Load'.";
  1448 + $('#errorMessage').text(AIAConstants.Select_File);
1461 1449 $("#messageModal").modal('show');
1462 1450 }
1463 1451 else {
... ... @@ -1472,7 +1460,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1472 1460 }
1473 1461 else
1474 1462 {
1475   - $rootScope.errorMessage = AIAConstants.CB_FILE_FORMAT_ISSUE;
  1463 + $('#errorMessage').text(AIAConstants.CB_FILE_FORMAT_ISSUE);
1476 1464 $("#messageModal").modal('show');
1477 1465  
1478 1466 }
... ... @@ -1608,8 +1596,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1608 1596 }
1609 1597  
1610 1598 $rootScope.ExportSection = function () {
1611   - var currentid = document.getElementById('cbSelect').value;
1612   -
  1599 + var currentid = document.getElementById('cbSelect').value;
1613 1600 if ($rootScope.contentNotesForSaveCB.length == 0) {
1614 1601 $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;
1615 1602 }
... ... @@ -1620,7 +1607,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1620 1607 var strFromParent=$scope.selectedNodeSingleObj['structure'];
1621 1608 if(strFromParent.length<=0)
1622 1609 {
1623   - $rootScope.errorMessage = "Please add slide first to export this section.";
  1610 + $('#errorMessage').text(AIAConstants.CB_Add_Slide_First);
1624 1611 $("#messageModal").modal('show');
1625 1612 return;
1626 1613 }
... ... @@ -1632,11 +1619,12 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1632 1619 }
1633 1620  
1634 1621 $rootScope.ExportCurriculum =function()
1635   - {
  1622 + {
  1623 + $('#errorMessage').text("");
1636 1624 var filename = document.getElementById("filename").value;
1637 1625 if (filename == "" ||filename == " ")
1638 1626 {
1639   - $rootScope.errorMessage = "Curriculum name is empty!";
  1627 + $('#errorMessage').text(AIAConstants.CB_Curriculum_Name_Empty);
1640 1628 $("#messageModal").modal('show');
1641 1629 return;
1642 1630 }
... ... @@ -1713,7 +1701,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1713 1701 }
1714 1702  
1715 1703 $scope.saveCBwithAnimation=function(downloadtype,filename)
1716   - {
  1704 + {
  1705 + $('#errorMessage').text("");
1717 1706 if($rootScope.collectAnimationSource.length>0)
1718 1707 {
1719 1708 $rootScope.loadingAnimationstatus=1;
... ... @@ -1757,7 +1746,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1757 1746 $rootScope.dynamicUpdatedJsonForSaveCB = "";
1758 1747 $('#uploading-curriculum').css("display", "none");
1759 1748 $("#filename").val("");
1760   - $rootScope.errorMessage = AIAConstants.SAVE_ANIMATION_ERROR+"\n"+error.ExceptionMessage;;
  1749 + $('#errorMessage').text(AIAConstants.SAVE_ANIMATION_ERROR+"\n"+error.ExceptionMessage);
1761 1750 $("#messageModal").modal('show');
1762 1751 },
1763 1752 function(progress){
... ... @@ -1787,17 +1776,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
1787 1776 $rootScope.UnsaveCurriculum = false;
1788 1777 var blob = new Blob([angular.toJson($rootScope.dynamicUpdatedJsonForSaveCB, true)], { type: 'text/json' });
1789 1778 }
1790   -
1791   - // document.execCommand("SaveAs", true, filename);
1792   -
1793   - // var event = document.createEvent('MouseEvents'),
1794   - // saveElement = document.createElement('a');
1795   - // saveElement.download = filename;
1796   - // saveElement.href = window.URL.createObjectURL(blob);
1797   - // saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':');
1798   - // event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
1799   - // saveElement.dispatchEvent(event);
1800   -
1801 1779 //save file saver handle for all browser
1802 1780 saveAs(blob, filename);
1803 1781  
... ... @@ -2224,10 +2202,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2224 2202 }
2225 2203  
2226 2204 $rootScope.saveMyCurricullam = function () {
  2205 + $('#errorMessage').text("");
2227 2206 var filename = document.getElementById("filename").value;
2228 2207 if (filename == "" ||filename == " ")
2229 2208 {
2230   - $rootScope.errorMessage = "Curriculum name is empty!";
  2209 + $('#errorMessage').text(AIAConstants.CB_Curriculum_Name_Empty);
2231 2210 $("#messageModal").modal('show');
2232 2211 return;
2233 2212 }
... ... @@ -2402,9 +2381,41 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2402 2381 $("#modal-CurBuilder").draggable();
2403 2382 });
2404 2383  
  2384 + $rootScope.cbTreeToggleClick = function () {
  2385 + setTimeout(function(){
  2386 + // reset minimize panel while tree toggle click
  2387 +
  2388 + if($('div.CBLeft-Sidebar').hasClass('active'))
  2389 + {
  2390 + $('#jsPanel-min-container').css('left','15px');
  2391 + }
  2392 + else
  2393 + {
  2394 + $('#jsPanel-min-container').css('left','300px');
  2395 + }
  2396 +
  2397 + var modulePanel = $("div[id*='ImagePanel']");
  2398 + if (modulePanel != undefined && modulePanel != null) {
  2399 + if (modulePanel.length > 0) {
  2400 + for (var i = 0 ; i < modulePanel.length; i++) {
  2401 + var paneld = modulePanel[i].id;
  2402 + var containmentTop = $("#cbdivarea").position().top+10;
  2403 + var containmentLeft = $("#cbdivarea").position().left;
  2404 + //overrride containment of module on curriculum builder
  2405 + $('#'+paneld).draggable(
  2406 + {
  2407 + containment : [containmentLeft,containmentTop,5000,4000]//[left,top,right,bottom]
  2408 + });
  2409 + }
  2410 + }
  2411 + }
  2412 +
  2413 + },200)
  2414 +
  2415 + }
2405 2416  
2406 2417 $scope.loadContentOfSelectedSlide = function (id) {
2407   - console.log("id= " + id)
  2418 + $('#errorMessage').text("");
2408 2419 if ($rootScope.contentNotesForSaveCB.length == 0) {
2409 2420 $rootScope.contentNotesForSaveCB = $rootScope.cbDynamicContents;
2410 2421 }
... ... @@ -2446,7 +2457,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2446 2457 if (!annotation.hasOwnProperty(shapeStates) || !annotation.hasOwnProperty(paintCanvasState))
2447 2458 {
2448 2459 $rootScope.UnsaveCurriculum = true;
2449   - $rootScope.errorMessage =AIAConstants.CB_OLD_SLIDE_ANNOTATION_ISSUE;
  2460 + $('#errorMessage').text(AIAConstants.CB_OLD_SLIDE_ANNOTATION_ISSUE);
2450 2461 $("#messageModal").modal('show');
2451 2462 windowData.annotationData="";
2452 2463 }
... ... @@ -2561,7 +2572,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2561 2572 else {
2562 2573 //Added Code by sandeep for user story-52696
2563 2574 $("#viwerSelect").empty();
2564   - var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']");
  2575 + var modulePanel = $("div[id*='ImagePanel']");
2565 2576 if (modulePanel != undefined && modulePanel != null) {
2566 2577 //Added code by sandeep for fixed Bug-58066
2567 2578 if (modulePanel.length > 0) {
... ... @@ -2575,7 +2586,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $
2575 2586 var paneld = modulePanel[i].id;
2576 2587 var panelTitle = document.getElementById(paneld).childNodes[0].innerText;
2577 2588 $('#viwerSelect').append('<option value="' + paneld + '">' + panelTitle + '</option>');
2578   - $('#'+paneld).draggable({ containment: '#cbdivarea', scroll: false });
  2589 + var containmentTop = $("#cbdivarea").position().top+10;
  2590 + var containmentLeft = $("#cbdivarea").position().left;
  2591 + //overrride containment of module on curriculum builder
  2592 + $('#'+paneld).draggable(
  2593 + {
  2594 + containment : [containmentLeft,containmentTop,5000,4000]//[left,top,right,bottom]
  2595 + });
2579 2596 }
2580 2597  
2581 2598 $scope.CBEnableUI();
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -516,7 +516,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
516 516 "windowTitle": $event.currentTarget.textContent,
517 517 "zoom": 75,
518 518 "size":{height:600,width:900},
519   - "position": { x: 300, y: 110 },
  519 + "position": { x: 1, y: 30 },
520 520 "mType": 'DISSECTIBLE_ANATOMY',
521 521 "isModestyOn":userModestysettings,
522 522 "skinId": userEthnicity,
... ... @@ -665,11 +665,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
665 665  
666 666 }
667 667  
668   - $rootScope.openDABodyViewMain = function () {
669   - $scope.ScopeVariablesDeclare();
670   - $scope.DisableUI();
  668 + $rootScope.openDABodyViewMain = function () {
671 669 if ($rootScope.isCallFromOtherModule) {
672 670 $scope.DAModuleData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY");
  671 + if($scope.DAModuleData.length<1) return;
  672 + $scope.ScopeVariablesDeclare();
  673 + $scope.DisableUI();
673 674 $scope.readyToLoad=true;
674 675 $rootScope.DAWindowLoadComplete = false;
675 676 $scope.wincount=1;
... ... @@ -712,6 +713,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
712 713  
713 714 }
714 715 else {
  716 + $scope.ScopeVariablesDeclare();
  717 + $scope.DisableUI();
715 718 $scope.openBodyView(null);
716 719 }
717 720  
... ... @@ -736,7 +739,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
736 739 $scope.SetwindowStoreData(windowviewid,'currentViewTitle',$scope.daOpenInOtherModules.windowTitle);
737 740 localStorage.setItem("currentViewTitle", $scope.daOpenInOtherModules.windowTitle);
738 741 $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid;
739   - $scope.viewID = 'daViewDA_' + windowviewid;
740 742 console.log('$location.url = ' + $location.url())
741 743  
742 744 var skinValue=$scope.daOpenInOtherModules.skinId;
... ... @@ -838,7 +840,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
838 840 $scope.SetwindowStoreData(windowviewid, 'voId', $rootScope.getLocalStorageValue("currentBodyViewId"));
839 841  
840 842 $scope.jsPanelID = 'daImagePanel' + '_' + windowviewid;
841   - $scope.viewID = 'daViewDA' + '_' + windowviewid;
842 843 $scope.SetwindowStoreData(windowviewid, 'parentSlugName', 'da-view-list');
843 844  
844 845 $scope.loadTermData(windowviewid);
... ... @@ -923,7 +924,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
923 924 $scope.jsPanelWidth = $(window).outerWidth() - 20;
924 925 $scope.jsPanelHeight = $(window).outerHeight() - 110;
925 926 $scope.jsPanelLeft = 1;
926   - $scope.jsPanelTop = 70;
  927 + $scope.jsPanelTop = 55;
927 928 $rootScope.cernerIntegrationActive=false;
928 929 }
929 930 else
... ... @@ -935,13 +936,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
935 936 $scope.jsPanelHeight = 450;
936 937  
937 938 $scope.jsPanelLeft = $scope.daOpenInOtherModules.position.x;
938   - if ($scope.daOpenInOtherModules.position.x < 20)
939   - $scope.jsPanelLeft = 20;
  939 + if ($scope.daOpenInOtherModules.position.x <= 1)
  940 + $scope.jsPanelLeft = 0;
940 941 $scope.jsPanelTop = $scope.daOpenInOtherModules.position.y;
941   -
  942 + if ($scope.daOpenInOtherModules.position.y < 30)
  943 + $scope.jsPanelTop = 30;
  944 +
942 945 if($location.url()!= "/curriculum-builder-detail") {
943   - $scope.jsPanelLeft = 1;
944   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
  946 + $scope.jsPanelLeft = 1;
  947 + $scope.jsPanelTop = 85;
945 948 }
946 949 }
947 950  
... ... @@ -950,7 +953,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
950 953 $scope.jsPanelWidth = $(window).outerWidth() - 20;
951 954 $scope.jsPanelHeight = $(window).outerHeight() - 143;
952 955 $scope.jsPanelLeft = 1;
953   - $scope.jsPanelTop = 70;
  956 + $scope.jsPanelTop = 55;
954 957 }
955 958  
956 959 $scope.jsPanelDA = $.jsPanel({
... ... @@ -974,6 +977,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
974 977 height: $scope.jsPanelHeight
975 978 },
976 979 onminimized:function (panel) {
  980 + var pnlName=panel[0].id;
  981 + var len = (pnlName).split("_").length;
  982 + var windowviewid = (pnlName).split("_")[len - 1];
977 983 var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent');
978 984 if(!isAutoCalled)
979 985 {
... ... @@ -983,6 +989,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
983 989 $scope.SetwindowStoreData(windowviewid, 'maximised',false);
984 990 },
985 991 onmaximized:function (panel) {
  992 + var pnlName=panel[0].id;
  993 + var len = (pnlName).split("_").length;
  994 + var windowviewid = (pnlName).split("_")[len - 1];
986 995 var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent');
987 996 if(!isAutoCalled)
988 997 {
... ... @@ -993,39 +1002,64 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
993 1002 var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
994 1003  
995 1004 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
  1005 + $rootScope.resetMenuOptionOnClick(pnlName);
  1006 + $('#da-input_'+windowviewid).removeClass();
  1007 + var dawidth=$(window).outerWidth() - 20;
  1008 + if(dawidth<800)
  1009 + $('#da-input_'+windowviewid).addClass('input-group col-sm-4 col-xs-5 col-md-5 pull-left');
  1010 + else{
  1011 + $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-7 pull-left');
  1012 + }
996 1013 },
997 1014 onnormalized:function (panel) {
998   - var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent');
999   - if(!isAutoCalled)
1000   - {
1001   - $rootScope.UnsaveCurriculum = true;
1002   - }
1003   - $scope.SetwindowStoreData(windowviewid, 'minimised',false);
1004   - $scope.SetwindowStoreData(windowviewid, 'maximised',false);
1005   - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
1006   -
1007   - $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
  1015 + var pnlName=panel[0].id;
  1016 + var len = (pnlName).split("_").length;
  1017 + var windowviewid = (pnlName).split("_")[len - 1];
  1018 + var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent');
  1019 + if(!isAutoCalled)
  1020 + {
  1021 + $rootScope.UnsaveCurriculum = true;
  1022 + }
  1023 + $scope.SetwindowStoreData(windowviewid, 'minimised',false);
  1024 + $scope.SetwindowStoreData(windowviewid, 'maximised',false);
  1025 + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
  1026 +
  1027 + $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
  1028 + $rootScope.resetMenuOptionOnClick(pnlName);
  1029 +
1008 1030 },
1009 1031 resizable: {
1010 1032 stop: function (event, ui) {
1011   - var len = (event.currentTarget.id).split("_").length;
1012   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1033 + var pnlName=event.currentTarget.id;
  1034 + var len = (pnlName).split("_").length;
  1035 + var windowviewid = (pnlName).split("_")[len - 1];
1013 1036 $scope.SetwindowStoreData(windowviewid, 'width', ui.size.width);
1014 1037 $scope.SetwindowStoreData(windowviewid, 'height', ui.size.height);
  1038 + $scope.SetwindowStoreData(windowviewid, 'y', ui.position.top);
  1039 + $scope.SetwindowStoreData(windowviewid, 'x', ui.position.left);
1015 1040 $rootScope.UnsaveCurriculum = true;
1016 1041 var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
1017 1042  
1018 1043 $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight);
  1044 + $('#da-input_'+windowviewid).removeClass();
  1045 + if(ui.size.width<700)
  1046 + $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-5 pull-left');
  1047 + else{
  1048 + $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-7 pull-left');
  1049 + }
  1050 + $rootScope.resetMenuOptionOnClick(pnlName);
1019 1051 }
1020 1052  
1021 1053 },
1022 1054 draggable: {
1023 1055 stop: function( event, ui ) {
1024   - var len = (event.currentTarget.id).split("_").length;
1025   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  1056 + var pnlName=event.currentTarget.id;
  1057 + var len = (pnlName).split("_").length;
  1058 + var windowviewid = (pnlName).split("_")[len - 1];
1026 1059 $scope.SetwindowStoreData(windowviewid, 'y', ui.position.top);
1027 1060 $scope.SetwindowStoreData(windowviewid, 'x', ui.position.left);
1028 1061 $rootScope.UnsaveCurriculum = true;
  1062 + $rootScope.resetMenuOptionOnClick(pnlName);
1029 1063 }
1030 1064 },
1031 1065  
... ... @@ -1056,6 +1090,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1056 1090 else {
1057 1091 $scope.jsPanelDA.normalize();
1058 1092 }
  1093 +
  1094 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelDA);
1059 1095 // set false after initial call of min,max or normal
1060 1096 $scope.SetwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
1061 1097 $scope.SetwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -1076,7 +1112,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1076 1112 $scope.dropdownMenu4ID = "dropdownMenu4";
1077 1113 $scope.genderChangeID = "genderChangeId";
1078 1114 $scope.structureDropdownID = "structureDropdown";
1079   - $scope.viewID = "daView";
1080 1115 $scope.viewChangeID = "viewChangeID";
1081 1116 $scope.btnStrutureBoxID = "btnStrutureBox";
1082 1117 $scope.typedTermNameID = "typedTermName";
... ... @@ -1320,8 +1355,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1320 1355  
1321 1356 $scope.langSearchLoad= function(windowviewid)
1322 1357 {
1323   - $('#searchlangaugeDiv').empty();
1324   - $('#searchlangaugeDiv').css("display","none");
  1358 + $('#searchlangaugeDiv_'+windowviewid).empty();
  1359 + $('#searchlangaugeDiv_'+windowviewid).css("display","none");
1325 1360 var languageArray = $rootScope.lexiconLanguageArray;
1326 1361  
1327 1362 $("#btnDATermSearch_"+windowviewid).parent().css("margin-right", "10px");
... ... @@ -1329,13 +1364,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1329 1364 if(languageArray.length>1)
1330 1365 {
1331 1366 $("#btnDATermSearch_"+windowviewid).parent().css("margin-right", "-10px");
1332   - $('#searchlangaugeDiv').css("display","block");
  1367 + $('#searchlangaugeDiv_'+windowviewid).css("display","block");
1333 1368 var option='';
1334 1369 for (var i = 0; i <= languageArray.length - 1; i++) {
1335 1370 option=option+'<option value="' + languageArray[i].id + '">' + languageArray[i].language + '</option>';
1336 1371 }
1337   - var $all = $('#searchlangaugeDiv').append(
1338   - '<div class="btn-group col-sm-3 col-xs-7 col-md-2" style="margin-right:-10px">'+
  1372 + var $all = $('#searchlangaugeDiv_'+windowviewid).append(
  1373 + '<div class="btn-group col-sm-3 col-xs-3 col-md-2" style="margin-right:-10px">'+
1339 1374 '<select class="form-control" id="searchLanguageLm_'+windowviewid+'" ng-blur="HideSearch()" onchange="changeSearchLanguage(event)" style="height:30px;padding:4px 12px">'+
1340 1375 option+
1341 1376 '</select>'+
... ... @@ -1607,7 +1642,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1607 1642 $("#closeTermList").attr("id", "closeTermList_" + windowviewid);
1608 1643 $("#selectLanguage").attr("id", "selectLanguage_" + windowviewid);
1609 1644 $("#totalTerms").attr("id", "totalTerms_" + windowviewid);
1610   -
  1645 + $("#searchlangaugeDiv").attr("id", "searchlangaugeDiv_" + windowviewid);
1611 1646  
1612 1647 // bodyview id
1613 1648 $("#Anterior").attr("id", "Anterior_" + windowviewid);
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
1 1 ๏ปฟ'use strict';
2 2  
3   -AIA.controller("HomeController", ["$rootScope", "$scope", "Modules", "$log", "$location", "$compile", "$timeout", "DataService", "AuthenticationService", "ConfigurationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", "AIAConstants","ModuleService","$window","Idle", "Keepalive",
4   -function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, DataService, AuthenticationService, ConfigurationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants, AIAConstants, ModuleService,$window,Idle, Keepalive) {
  3 +AIA.controller("HomeController", ["$rootScope", "$scope", "Modules", "$log", "$location", "$compile", "$timeout", "DataService", "AuthenticationService", "ConfigurationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", "AIAConstants","ModuleService","$window","Idle", "Keepalive", "$interval",
  4 +function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, DataService, AuthenticationService, ConfigurationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants, AIAConstants, ModuleService,$window,Idle, Keepalive, $interval) {
5 5  
6 6 $rootScope.MULTI_VIEW_ID = 401;
7 7 $rootScope.pageToOpen = 'app/widget/MainMenu.html';
... ... @@ -60,7 +60,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
60 60 $rootScope.shapestyleborderColor = "black";
61 61 $rootScope.shapestyleborderWidth = 3;
62 62 $rootScope.shapestyleborderStyles = "solid";
63   - //$rootScope.errorMessage = ''; // Commented initialization to retain message when coming to login after password reset success screen
64 63 $("#fileMenuAnchor").addClass("disableFileMenu");
65 64  
66 65 $rootScope.userLicenseInfo = {
... ... @@ -80,7 +79,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
80 79 $rootScope.OpenMyPicture = function () {
81 80 $rootScope.CloseListManager();
82 81 $rootScope.CloseAnnotationTool();
83   -
84 82 // close list if opened in DA
85 83 var searchedTermListPopUp = $("#HomeContainerDiv").find("div[id*='searchedTermListPopUp']");
86 84 for (var i = 0 ; i < searchedTermListPopUp.length; i++) {
... ... @@ -101,39 +99,40 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
101 99  
102 100 var fileId, file, objFileRead;
103 101 if (typeof window.FileReader !== 'function') {
104   - $rootScope.errorMessage = "The file API isn't supported on this browser yet.";
  102 + $('#errorMessage').text(AIAConstants.File_API_Not_Supported);
105 103 $("#messageModal").modal('show');
106 104 return;
107 105 }
108 106 fileId = document.getElementById('myPictureFile');
109 107 if (!fileId) {
110   - $rootScope.errorMessage = "File couldn't find the element.";
  108 + $('#errorMessage').text(AIAConstants.File_No_Content_Found);
111 109 $("#messageModal").modal('show');
112 110 }
113 111 else if (!fileId.files) {
114   - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs.";
  112 + $('#errorMessage').text(AIAConstants.Browser_Not_Supported);
115 113 $("#messageModal").modal('show');
116 114 }
117 115 else if (!fileId.files[0]) {
118   - $rootScope.errorMessage = "Please select a file before clicking 'Load'.";
  116 + $('#errorMessage').text(AIAConstants.Select_File);
119 117 $("#messageModal").modal('show');
120 118 }
121   - else {
  119 + else
  120 + {
122 121 file = fileId.files[0];
123   - var extension = file.name.split(".")[1];
124   - if (extension == "jpg" || extension == "jpeg" || extension == "png") {
125   -
  122 + var extensionType = (file.name.split(".")[1]).toUpperCase();
  123 + if (extensionType == "JPG" || extensionType == "JPEG" || extensionType == "PNG" ||file.type=="image/png"||file.type=="image/jpg"||file.type=="image/jpeg")
  124 + {
126 125 var reader = new FileReader();
127 126 reader.onloadend = function () {
128   -
129 127 //set default module data
130 128 var PicOpenData = {
131 129 "mType": 'MY_PICTURES',
132 130 "imageSource":reader.result,
133 131 "windowTitle": file.name.split(".")[0],
134   - "size": { height: 500, width: 800 },
135   - "position": { x: 300, y: 110 }
  132 + "size": { height: 600, width: 900 },
  133 + "position": { x: 1, y: 30 }
136 134 };
  135 +
137 136 AIAModuleOpenResourceInfo(PicOpenData);
138 137  
139 138 }
... ... @@ -143,8 +142,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
143 142 }
144 143 else
145 144 {
146   - $rootScope.errorMessage = "Please select a file format type jpg/jpeg or png.";
  145 + $('#errorMessage').text(AIAConstants.Image_File_Format_Not_Supported);
147 146 $("#messageModal").modal('show');
  147 + return;
148 148 }
149 149  
150 150 }
... ... @@ -155,7 +155,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
155 155 $rootScope.OpenMyAnimation = function () {
156 156 $rootScope.CloseListManager();
157 157 $rootScope.CloseAnnotationTool();
158   -
  158 +
159 159 // close list if opened in DA
160 160 var searchedTermListPopUp = $("#HomeContainerDiv").find("div[id*='searchedTermListPopUp']");
161 161 for (var i = 0 ; i < searchedTermListPopUp.length; i++) {
... ... @@ -173,29 +173,29 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
173 173 $(fileupload).val('');//old file path
174 174 fileupload.onchange = function (e) {
175 175  
176   - var fileId, file, objFileRead;
  176 + var fileId, file;
177 177 if (typeof window.FileReader !== 'function') {
178   - $rootScope.errorMessage = "The file API isn't supported on this browser yet.";
  178 + $('#errorMessage').text(AIAConstants.File_API_Not_Supported);
179 179 $("#messageModal").modal('show');
180 180 return;
181 181 }
182 182 fileId = document.getElementById('myAnimationFile');
183 183 if (!fileId) {
184   - $rootScope.errorMessage = "File couldn't find the element.";
  184 + $('#errorMessage').text(AIAConstants.File_No_Content_Found);
185 185 $("#messageModal").modal('show');
186 186 }
187 187 else if (!fileId.files) {
188   - $rootScope.errorMessage = "This browser doesn't seem to support the `files` property of file inputs.";
  188 + $('#errorMessage').text(AIAConstants.Browser_Not_Supported);
189 189 $("#messageModal").modal('show');
190 190 }
191 191 else if (!fileId.files[0]) {
192   - $rootScope.errorMessage = "Please select a file before clicking 'Load'.";
  192 + $('#errorMessage').text(AIAConstants.Select_File);
193 193 $("#messageModal").modal('show');
194 194 }
195 195 else {
196 196 file = fileId.files[0];
197   - var extension = file.name.split(".")[1];
198   - if (extension == "mp4" && file.type=="video/mp4") {
  197 + var extensionType = (file.name.split(".")[1]).toUpperCase();
  198 + if (extensionType == "MP4" || file.type=="video/mp4") {
199 199 if (file.size <= $rootScope.MaxOneFileSize) {
200 200 var reader = new FileReader();
201 201 reader.onloadend = function () {
... ... @@ -207,8 +207,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
207 207 "id":animationId,//user for identify resource until save or export cb
208 208 "videoSource":reader.result,
209 209 "windowTitle": file.name.split(".")[0],
210   - "size": { height: 500, width: 800 },
211   - "position": { x: 300, y: 110 }
  210 + "size": { height: 500, width: 900 },
  211 + "position": { x: 1, y: 30 }
212 212 };
213 213 AIAModuleOpenResourceInfo(AniOpenData);
214 214 }
... ... @@ -218,14 +218,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
218 218 }
219 219 else
220 220 {
221   - $rootScope.errorMessage = "This Animation video size not allow more than 10MB.Please try again.";
  221 + $('#errorMessage').text(AIAConstants.Animation_File_Size_Exceeded);
222 222 $("#messageModal").modal('show');
223 223 }
224 224 }
225 225 else
226 226 {
227   - $rootScope.errorMessage = "This Animation video is not in supported format.Please try again.";
  227 + $('#errorMessage').text(AIAConstants.Animation_File_Format_Not_Supported);
228 228 $("#messageModal").modal('show');
  229 + return;
229 230 }
230 231  
231 232 }
... ... @@ -253,11 +254,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
253 254 // var homepath = $location.protocol() + "//" + $location.host() + ":" + $location.port() + "/";
254 255 var homepath = $rootScope.homeURL;
255 256 $("#HomeContainerDiv").css({ "display": "none", "pointer-events": "none", "opacity": ".5" });
256   - $(".navbar-fixed-top").css({"display": "none", "pointer-events": "none", "opacity": ".5" });
  257 +
257 258 // if any panel in minimized mode
258 259 $("#jsPanel-min-container").css({"display":"none"});
259   -
260   -
  260 +
261 261 var parentslag = "";
262 262 var openNewlink = "";
263 263 if ($location.url() == "/curriculum-builder") {
... ... @@ -299,26 +299,37 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
299 299 parentslag = "lab-exercise-view";
300 300 openNewlink = "lab-exercises";
301 301 }
302   -
  302 + var newpanelWidth=0;
  303 + var newpanelHeight=0;
  304 + var newpanelLeft=0;
  305 + var $ua = navigator.userAgent;
  306 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  307 + newpanelWidth=screen.width;
  308 + newpanelHeight=screen.height;
  309 + }
  310 + else{
  311 + newpanelWidth=screen.width-10;
  312 + newpanelHeight=screen.height-185;
  313 + }
303 314 $.jsPanel({
304 315 id: 'dvOpenResourcePanel',
305 316 selector: '#dvOpenResoucePanel',
306 317 theme: 'success',
307 318 currentController: 'HomeController',
308 319 parentSlug: parentslag,
309   - content: '<div class="col-sm-12" >' +
  320 + content: '<div>' +
310 321 '<iframe src="' + homepath + '" width="100%" height="10px" frameBorder="0" name="' + openNewlink + '" id="OpenModuleInCB" onload="OpenResourcePanel(this)"></iframe>',
311 322 title: "",
312 323 position: {
313 324 top: 1,
314   - left: 1
  325 + left: 0
315 326 },
316 327 controls: { buttons: 'closeonly' },
317 328 draggable: "disabled",
318 329  
319 330 size: {
320   - width: screen.width-30,
321   - height: screen.height-150
  331 + width: newpanelWidth,
  332 + height: newpanelHeight
322 333 },
323 334  
324 335 });
... ... @@ -326,67 +337,60 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
326 337 }
327 338  
328 339 $scope.OpenResourcePanel = function (iframe) {
329   -
  340 + var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
  341 + var head = $(innerDoc).contents().find("head");
  342 + //hide menu link
  343 + var css = '<style type="text/css">' +
  344 + //'#topMenuBar{visibility: hidden;} ' +
  345 + '#topMenuBar{pointer-events: none;opacity:.5} ' +
  346 + //'.navbar-fixed-top{display: none}'+
  347 + // '.pageHeading{margin-top: 2px}'+
  348 + // '.sidebar{padding-top: 35px}'+
  349 + // '.main{margin-top: 8px}'+
  350 +
  351 + '#Link\\/encyclopedia{display: none} ' +
  352 + // '#curriculum-builder{display: none} ' +
  353 + '#anatomy-test{display: none} ' +
  354 + '#Link\\/IP-10{display: none} ' +
  355 + //'#lab-exercises{display: none} ' +
  356 + '#Link\\/indepth-reports{display: none} ' +
  357 + '#Link\\/complementary-and-alternate-medicine{display: none} ' +
  358 + '#Link\\/bodyguide{display: none} ' +
  359 + '#Link\\/symptom-navigator{display: none} ' +
  360 + '#Link\\/health-navigator{display: none} ' +
  361 + '#Link\\/wellness-tools{display: none} ' +
  362 + '#ADAM-on-demand{display: none} ' +
  363 +
  364 + '</style>';
  365 +
  366 + // var storefunc = '<script> function OpenDefaultModule(iframe){ iframe.contentWindow.document.getElementById(iframe.name).click();}</script>';
  367 + $(head).append(css);
  368 + // $(head).append(storefunc);
  369 +
330 370 var canvasDIvHeight = $("#dvOpenResourcePanel .jsPanel-content").height();
331 371 $('#OpenModuleInCB').css('height', canvasDIvHeight);
332 372  
333   - //var iframe = document.getElementById('OpenModuleInCB');
334   - var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
335   - var head = $(innerDoc).contents().find("head");
336   - if (head != undefined && head != null)
337   - {
  373 + $timeout(function () {
  374 + console.log('frame content loding delayed......');
338 375 $scope.loadopenresourceContent(head, iframe);
339   - }
340   - else
341   - {
342   - $timeout(function () {
343   -
344   - var head = $(innerDoc).contents().find("head");
  376 + if (head != undefined && head != null)
  377 + {
345 378 $scope.loadopenresourceContent(head, iframe);
  379 + }
346 380  
347   - }, 500);
348   - }
  381 + }, 100);
349 382  
350 383 }
351 384  
352 385 $scope.loadopenresourceContent = function (header, iframe)
353   - {
354   - //disable link
355   - var css = '<style type="text/css">' +
356   - '#topMenuBar{pointer-events: none; opacity: .3} ' +
357   -
358   - '#Link\\/encyclopedia{pointer-events: none; opacity: .3} ' +
359   - // '#curriculum-builder{pointer-events: none; opacity: .3} ' +
360   - '#anatomy-test{pointer-events: none; opacity: .3} ' +
361   - '#Link\\/IP-10{pointer-events: none; opacity: .3} ' +
362   - //'#lab-exercises{pointer-events: none; opacity: .3} ' +
363   - '#Link\\/indepth-reports{pointer-events: none; opacity: .3} ' +
364   - '#Link\\/complementary-and-alternate-medicine{pointer-events: none; opacity: .3} ' +
365   - // '#ADAM-images{pointer-events: none; opacity: .3} ' +
366   - '#Link\\/bodyguide{pointer-events: none; opacity: .3} ' +
367   - '#Link\\/symptom-navigator{pointer-events: none; opacity: .3} ' +
368   - '#Link\\/health-navigator{pointer-events: none; opacity: .3} ' +
369   - '#Link\\/wellness-tools{pointer-events: none; opacity: .3} ' +
370   - '#ADAM-on-demand{pointer-events: none; opacity: .3} ' +
371   -
372   -
373   - '</style>';
374   -
375   - var storefunc = '<script> function OpenDefaultModule(iframe){ iframe.contentWindow.document.getElementById(iframe.name).click();}</script>';
376   - $(header).append(css);
377   - $(header).append(storefunc);
378   -
  386 + {
379 387 $timeout(function () {
380   - // var elmnt = iframe.contentWindow.document.getElementById("da-view-list");
381   - //$('#' + elmnt.id).trigger('click');
382 388 sessionStorage.setItem('isModuleOpenByOpenResource', 'true');
383   - sessionStorage.removeItem('ExitsCBFileDetail');
384   -
385   - OpenDefaultModule(iframe);
  389 + sessionStorage.removeItem('ExitsCBFileDetail');
  390 + // OpenDefaultModule(iframe);
386 391  
387 392 }, 500);
388 393  
389   -
390 394 }
391 395  
392 396 $scope.AIAModuleOpenResourceInfo = function (newWindowData)
... ... @@ -425,28 +429,28 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
425 429 }
426 430 else if (($location.url() == "/da-body-view")) {
427 431  
428   - $scope.loadOpenResourceWindow(newWindowData.mType, '#daBodyview');
  432 + $scope.loadOpenResourceWindow(newWindowData.mType, '#daparentcustomDiv');
429 433 }
430 434 else if ($location.url() == "/clinical-illustrations-detail") {
431   - $scope.loadOpenResourceWindow(newWindowData.mType, '#CIView');
  435 + $scope.loadOpenResourceWindow(newWindowData.mType, '#ciparentcustomDiv');
432 436 }
433 437 else if ($location.url() == "/module-item-view") {
434 438  
435   - $scope.loadOpenResourceWindow(newWindowData.mType, '#aaBodyView');
  439 + $scope.loadOpenResourceWindow(newWindowData.mType, '#aaparentcustomDiv');
436 440 }
437 441 else if ($location.url() == "/clinical-animations-detail") {
438   - $scope.loadOpenResourceWindow(newWindowData.mType, '#CAView');
  442 + $scope.loadOpenResourceWindow(newWindowData.mType, '#caparentcustomDiv');
439 443 }
440 444 else if ($location.url() == "/adam-images-detail") {
441   - $scope.loadOpenResourceWindow(newWindowData.mType, '#AIView');
  445 + $scope.loadOpenResourceWindow(newWindowData.mType, '#aiparentcustomDiv');
442 446 }
443 447 else if ($location.url() == "/3d-anatomy-details") {
444 448  
445   - $scope.loadOpenResourceWindow(newWindowData.mType, '#ThreeDView');
  449 + $scope.loadOpenResourceWindow(newWindowData.mType, '#tdparentcustomDiv');
446 450 }
447 451 else if ($location.url() == "/lab-exercise-view") {
448 452  
449   - $scope.loadOpenResourceWindow(newWindowData.mType, '#labBodyview');
  453 + $scope.loadOpenResourceWindow(newWindowData.mType, '#labparentcustomDiv');
450 454 }
451 455  
452 456 }, 500);
... ... @@ -459,7 +463,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
459 463 case "DISSECTIBLE_ANATOMY":
460 464 var daSectionExist = document.getElementById('daCustomModuleDiv');
461 465  
462   - if (daSectionExist == null && BasemoduleDivId != "#daBodyview") {
  466 + if (daSectionExist == null && BasemoduleDivId != "#daparentcustomDiv") {
463 467 $(BasemoduleDivId).append($('<div id="daCustomModuleDiv"></div>'));
464 468 var html = $('#daCustomModuleDiv').append("<da-directive></da-directive>");
465 469 $compile(html)($scope);
... ... @@ -472,7 +476,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
472 476 case "ATLAS_ANATOMY":
473 477 var aaSectionExist = document.getElementById('aaCustomModuleDiv');
474 478  
475   - if (aaSectionExist == null && BasemoduleDivId != "#aaBodyView") {
  479 + if (aaSectionExist == null && BasemoduleDivId != "#aaparentcustomDiv") {
476 480 $(BasemoduleDivId).append($('<div id="aaCustomModuleDiv"></div>'));
477 481 var html = $('#aaCustomModuleDiv').append("<atlas-anatomy-directive></atlas-anatomy-directive>");
478 482 $compile(html)($scope);
... ... @@ -485,7 +489,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
485 489 case "CLINICAL_ILLUSTRATIONS":
486 490 var ciSectionExist = document.getElementById('ciCustomModuleDiv');
487 491  
488   - if (ciSectionExist == null && BasemoduleDivId != "#CIView") {
  492 + if (ciSectionExist == null && BasemoduleDivId != "#ciparentcustomDiv") {
489 493 $(BasemoduleDivId).append($('<div id="ciCustomModuleDiv"></div>'));
490 494 var html = $('#ciCustomModuleDiv').append("<clinical-illustration-directive></clinical-illustration-directive>");
491 495 $compile(html)($scope);
... ... @@ -498,7 +502,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
498 502 case "ADAM_IMAGES":
499 503 var aiSectionExist = document.getElementById('aiCustomModuleDiv');
500 504  
501   - if (aiSectionExist == null && BasemoduleDivId != "#AIView") {
  505 + if (aiSectionExist == null && BasemoduleDivId != "#aiparentcustomDiv") {
502 506 $(BasemoduleDivId).append($('<div id="aiCustomModuleDiv"></div>'));
503 507 var html = $('#aiCustomModuleDiv').append("<adam-image-directive></adam-image-directive>");
504 508 $compile(html)($scope);
... ... @@ -511,7 +515,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
511 515 case "CLINICAL_ANIMATIONS":
512 516 var caSectionExist = document.getElementById('caCustomModuleDiv');
513 517  
514   - if (caSectionExist == null && BasemoduleDivId != "#CAView") {
  518 + if (caSectionExist == null && BasemoduleDivId != "#caparentcustomDiv") {
515 519 $(BasemoduleDivId).append($('<div id="caCustomModuleDiv"></div>'));
516 520 var html = $('#caCustomModuleDiv').append("<clinical-animation-directive></clinical-animation-directive>");
517 521 $compile(html)($scope);
... ... @@ -524,7 +528,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
524 528 case "THREE_D_ANATOMY":
525 529 var threeDSectionExist = document.getElementById('theeDCustomModuleDiv');
526 530  
527   - if (threeDSectionExist == null && BasemoduleDivId != "#ThreeDView") {
  531 + if (threeDSectionExist == null && BasemoduleDivId != "#tdparentcustomDiv") {
528 532 $(BasemoduleDivId).append($('<div id="theeDCustomModuleDiv"></div>'));
529 533 var html = $('#theeDCustomModuleDiv').append("<threed-anatomy-directive></threed-anatomy-directive>");
530 534 $compile(html)($scope);
... ... @@ -538,7 +542,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
538 542 case "LAB_EXERCISE":
539 543 var labSectionExist = document.getElementById('labCustomModuleDiv');
540 544  
541   - if (labSectionExist == null && BasemoduleDivId != "#labBodyview") {
  545 + if (labSectionExist == null && BasemoduleDivId != "#labparentcustomDiv") {
542 546 $(BasemoduleDivId).append($('<div id="labCustomModuleDiv"></div>'));
543 547 var html = $('#labCustomModuleDiv').append("<lab-exercise-directive></lab-exercise-directive>");
544 548 $compile(html)($scope);
... ... @@ -596,7 +600,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
596 600 }
597 601  
598 602 $rootScope.promptUserForCookies = function () {
599   - $rootScope.errorMessage = AIAConstants.COOKIES_MESSAGE;
  603 + $('#errorMessage').text(AIAConstants.COOKIES_MESSAGE);
600 604 $("#messageModal").modal('show');
601 605  
602 606 }
... ... @@ -638,8 +642,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
638 642  
639 643 var url = $location.url();
640 644 //some time value not remove then reload
641   - sessionStorage.removeItem('isModuleOpenByOpenResource');
642 645 sessionStorage.removeItem('ExitsCBFileDetail');
  646 + sessionStorage.removeItem('isModuleOpenByOpenResource');
643 647 $('#login').css('visibility', 'visible');
644 648 $rootScope.lexiconData();
645 649  
... ... @@ -720,11 +724,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
720 724 //incase site user login userid is 0 so then using license id
721 725 //logout site user while reload url without parameter
722 726 var userId=loggedInUser.Id==0?loggedInUser.LicenseId:loggedInUser.Id;
  727 +
  728 + //licenseId would be zero for admin/gernal admin
  729 + var isadminType=loggedInUser.LicenseId==0?true:false;
723 730 $scope.checkuserstatus = {
724 731 userId: userId,
725 732 tagName: loggedInUser.Id==0?'logout':'update',
726 733 SessionId:loggedInUser.SessionId,
727   - isSiteUser:loggedInUser.isSiteUser
  734 + isSiteUser:loggedInUser.isSiteUser,
  735 + isAdmin:isadminType
728 736 }
729 737  
730 738 // this case found when browser closed by user after login. after long time (after 20 min) open site again
... ... @@ -741,15 +749,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
741 749 $rootScope.LogoutUserSession();
742 750 }
743 751 else
744   - {
745   - AuthenticateAlreadyLoggedInUser();
  752 + {
  753 + AuthenticateAlreadyLoggedInUser();
746 754 }
747 755 }
748 756  
749 757 }),
750 758 function (error) {
751 759 console.log(' Error in user login status = ' + error.statusText);
752   - $rootScope.errorMessage = error;
  760 + $('#errorMessage').text(error);
753 761 $("#messageModal").modal('show');
754 762 }
755 763  
... ... @@ -980,10 +988,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
980 988 }
981 989 $rootScope.AuthenticateUser = function (userInfo) {
982 990 if (navigator.cookieEnabled) {
983   - $rootScope.errorMessage = "";
  991 + $('#errorMessage').text("");
984 992 if (userInfo.username == "" || userInfo.username == null || userInfo.username == undefined || userInfo.password == "" || userInfo.password == null || userInfo.password == undefined) {
985 993  
986   - $rootScope.errorMessage = LoginMessageConstants.USER_CREDENTIALS_MISSING;
  994 + $('#errorMessage').text(LoginMessageConstants.USER_CREDENTIALS_MISSING);
987 995 $("#messageModal").modal('show');
988 996 }
989 997 else {
... ... @@ -997,7 +1005,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
997 1005 if (result == LoginConstants.USER_NOT_FOUND) {
998 1006 $rootScope.LoginEnableUI();
999 1007 $rootScope.isVisibleLogin = true;
1000   - $rootScope.errorMessage = LoginMessageConstants.INVALID_USER;
  1008 + $('#errorMessage').text(LoginMessageConstants.INVALID_USER);
1001 1009 $("#messageModal").modal('show');
1002 1010 }
1003 1011 else {
... ... @@ -1056,10 +1064,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1056 1064  
1057 1065 }
1058 1066  
1059   - $rootScope.lexicons = {
1060   - primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1",
1061   - secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
1062   - };
  1067 + //under graduate
  1068 + if(result.EditionId==2 || result.EditionId==4 )
  1069 + {
  1070 + $rootScope.lexicons = {
  1071 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"2",
  1072 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1073 + };
  1074 + }
  1075 + else
  1076 + {
  1077 + $rootScope.lexicons = {
  1078 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1",
  1079 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1080 + };
  1081 + }
1063 1082  
1064 1083 $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids)
1065 1084  
... ... @@ -1090,10 +1109,22 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1090 1109  
1091 1110 }
1092 1111  
1093   - $rootScope.lexicons = {
1094   - primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1",
1095   - secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
1096   - };
  1112 + //under graduate
  1113 + if(result.EditionId==2 || result.EditionId==4 )
  1114 + {
  1115 + $rootScope.lexicons = {
  1116 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"2",
  1117 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1118 + };
  1119 + }
  1120 + else
  1121 + {
  1122 + $rootScope.lexicons = {
  1123 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1",
  1124 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1125 + };
  1126 + }
  1127 +
1097 1128  
1098 1129 $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids)
1099 1130  
... ... @@ -1109,72 +1140,72 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1109 1140 if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_PASSWORD_NOT_MATCH) {
1110 1141 $rootScope.isVisibleLogin = true;
1111 1142 $rootScope.LoginEnableUI();
1112   - $rootScope.errorMessage = LoginMessageConstants.INVALID_PASSWORD;
  1143 + $('#errorMessage').text(LoginMessageConstants.INVALID_PASSWORD);
1113 1144 $("#messageModal").modal('show');
1114 1145 }
1115 1146 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_ID_BLOCKED_24_HRS) {
1116 1147 $rootScope.isVisibleLogin = true;
1117 1148 $rootScope.LoginEnableUI();
1118   - $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED;
  1149 + $('#errorMessage').text(LoginMessageConstants.USER_BLOCKED);
1119 1150 $("#messageModal").modal('show');
1120 1151 }
1121 1152 else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) {
1122 1153 $rootScope.isVisibleLogin = true;
1123 1154 $rootScope.LoginEnableUI();
1124   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
1125   - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE;
  1155 + var expmsg = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
  1156 + $('#errorMessage').text(expmsg + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE);
1126 1157 $("#messageModal").modal('show');
1127 1158 }
1128 1159 else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) {
1129 1160 $rootScope.isVisibleLogin = true;
1130 1161 $rootScope.LoginEnableUI();
1131   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
1132   - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE;
  1162 + var expmsg = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
  1163 + $('#errorMessage').text(expmsg + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE);
1133 1164 $("#messageModal").modal('show');
1134 1165 }
1135 1166 else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) {
1136 1167 $rootScope.isVisibleLogin = true;
1137 1168 $rootScope.LoginEnableUI();
1138   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
1139   - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE;
  1169 + var expmsg = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
  1170 + $('#errorMessage').text(expmsg + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE);
1140 1171 $("#messageModal").modal('show');
1141 1172 }
1142 1173 else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) {
1143 1174 $rootScope.isVisibleLogin = true;
1144 1175 $rootScope.LoginEnableUI();
1145   - $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE;
  1176 + $('#errorMessage').text(LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE);
1146 1177 $("#messageModal").modal('show');
1147 1178 }
1148 1179 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) {
1149 1180 $rootScope.isVisibleLogin = true;
1150 1181 $rootScope.LoginEnableUI();
1151   - $rootScope.errorMessage = LoginMessageConstants.USER_INACTIVE_MESSAGE;
  1182 + $('#errorMessage').text(LoginMessageConstants.USER_INACTIVE_MESSAGE);
1152 1183 $("#messageModal").modal('show');
1153 1184 }
1154 1185 else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) {
1155 1186 $rootScope.isVisibleLogin = true;
1156 1187 $rootScope.LoginEnableUI();
1157   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
1158   - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE;
  1188 + var expmsg = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
  1189 + $('#errorMessage').text(expmsg + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE);
1159 1190 $("#messageModal").modal('show');
1160 1191 }
1161 1192 else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) {
1162 1193 $rootScope.isVisibleLogin = true;
1163 1194 $rootScope.LoginEnableUI();
1164   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
  1195 + $('#errorMessage').text(LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.');
1165 1196 $("#messageModal").modal('show');
1166 1197 }
1167 1198 else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && (result.IsSubscriptionNotStart)) {
1168 1199 // validation for new license which license start date is future date .
1169 1200 $rootScope.isVisibleLogin = true;
1170 1201 $rootScope.LoginEnableUI();
1171   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_NOT_START_MESSAGE + result.SubscriptionStartDate + '.';
  1202 + $('#errorMessage').text(LoginMessageConstants.SUBSCRIPTION_NOT_START_MESSAGE + result.SubscriptionStartDate + '.');
1172 1203 $("#messageModal").modal('show');
1173 1204 }
1174 1205 else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) {
1175 1206 $rootScope.isVisibleLogin = true;
1176 1207 $rootScope.LoginEnableUI();
1177   - $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE;
  1208 + $('#errorMessage').text(LoginMessageConstants.LICENSE_INACTIVE_MESSAGE);
1178 1209 $("#messageModal").modal('show');
1179 1210 }
1180 1211 else {
... ... @@ -1325,7 +1356,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1325 1356 }
1326 1357  
1327 1358 // set user session time
1328   - $rootScope.loadUserSession();
  1359 + $rootScope.loadUserSession();
1329 1360 $rootScope.LoginEnableUI();
1330 1361 }
1331 1362  
... ... @@ -1337,7 +1368,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1337 1368 console.log(' Error in authentication = ' + error.statusText);
1338 1369 $rootScope.LoginEnableUI();
1339 1370 $rootScope.isVisibleLogin = true;
1340   - $rootScope.errorMessage = error;
  1371 + $('#errorMessage').text(error);
1341 1372 $("#messageModal").modal('show');
1342 1373 }
1343 1374 }
... ... @@ -1498,7 +1529,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1498 1529 console.log(' Error in bypass login = ' + error.statusText);
1499 1530 $rootScope.isVisibleLogin = true;
1500 1531 $rootScope.LoginEnableUI();
1501   - $rootScope.errorMessage = error;
  1532 + $('#errorMessage').text(error);
1502 1533 $("#messageModal").modal('show');
1503 1534 }
1504 1535  
... ... @@ -1507,7 +1538,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1507 1538 {
1508 1539 console.log(' invalid detail in bypass login');
1509 1540 $rootScope.isVisibleLogin = true;
1510   - $rootScope.errorMessage = "authentication is not allowed due to invalid details format .\nPlease pass the correct details again!";
  1541 + $('#errorMessage').text("authentication is not allowed due to invalid details format .\nPlease pass the correct details again!");
1511 1542 $("#messageModal").modal('show');
1512 1543 }
1513 1544  
... ... @@ -1560,49 +1591,49 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1560 1591 if (result == LoginConstants.INVALID_CLIENT) {
1561 1592 $rootScope.isVisibleLogin = true;
1562 1593 $rootScope.LoginEnableUI();
1563   - $rootScope.errorMessage = LoginConstants.INVALID_CLIENT;
  1594 + $('#errorMessage').text(LoginConstants.INVALID_CLIENT);
1564 1595 $("#messageModal").modal('show');
1565 1596 }
1566 1597 else if (result == LoginConstants.MSG_NOT_AUTHORIZE_SITE_USER) {
1567 1598 $rootScope.isVisibleLogin = true;
1568 1599 $rootScope.LoginEnableUI();
1569   - $rootScope.errorMessage = LoginConstants.MSG_NOT_AUTHORIZE_SITE_USER;
  1600 + $('#errorMessage').text(LoginConstants.MSG_NOT_AUTHORIZE_SITE_USER);
1570 1601 $("#messageModal").modal('show');
1571 1602 }
1572 1603 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_ACCOUNT_NUMBER_NOT_NULL) {
1573 1604 $rootScope.isVisibleLogin = true;
1574 1605 $rootScope.LoginEnableUI();
1575   - $rootScope.errorMessage = LoginMessageConstants.E_ACCOUNT_NUMBER_NOT_NULL;
  1606 + $('#errorMessage').text(LoginMessageConstants.E_ACCOUNT_NUMBER_NOT_NULL);
1576 1607 $("#messageModal").modal('show');
1577 1608 }
1578 1609 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_EDITION_ID_NOT_NULL) {
1579 1610 $rootScope.isVisibleLogin = true;
1580 1611 $rootScope.LoginEnableUI();
1581   - $rootScope.errorMessage = LoginMessageConstants.E_EDITION_ID_NOT_NULL;
  1612 + $('#errorMessage').text(LoginMessageConstants.E_EDITION_ID_NOT_NULL);
1582 1613 $("#messageModal").modal('show');
1583 1614 }
1584 1615 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_EDITION_NOT_LINKED_WITH_SITE) {
1585 1616 $rootScope.isVisibleLogin = true;
1586 1617 $rootScope.LoginEnableUI();
1587   - $rootScope.errorMessage = LoginMessageConstants.E_EDITION_NOT_LINKED_WITH_SITE;
  1618 + $('#errorMessage').text(LoginMessageConstants.E_EDITION_NOT_LINKED_WITH_SITE);
1588 1619 $("#messageModal").modal('show');
1589 1620 }
1590 1621 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.LICENSE_INACTIVE) {
1591 1622 $rootScope.isVisibleLogin = true;
1592 1623 $rootScope.LoginEnableUI();
1593   - $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE;
  1624 + $('#errorMessage').text(LoginMessageConstants.LICENSE_INACTIVE_MESSAGE);
1594 1625 $("#messageModal").modal('show');
1595 1626 }
1596 1627 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.SITELICENSE_EXPIRED) {
1597 1628 $rootScope.isVisibleLogin = true;
1598 1629 $rootScope.LoginEnableUI();
1599   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.';
  1630 + $('#errorMessage').text(LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.');
1600 1631 $("#messageModal").modal('show');
1601 1632 }
1602 1633 else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.SITELICENSE_NOTSTARTED) {
1603 1634 $rootScope.isVisibleLogin = true;
1604 1635 $rootScope.LoginEnableUI();
1605   - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_NOT_START_MESSAGE + result.SubscriptionStartDate + '.';
  1636 + $('#errorMessage').text(LoginMessageConstants.SUBSCRIPTION_NOT_START_MESSAGE + result.SubscriptionStartDate + '.');
1606 1637 $("#messageModal").modal('show');
1607 1638 }
1608 1639 else
... ... @@ -1655,11 +1686,23 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1655 1686 $rootScope.UpdateSetting($rootScope.formsetting);
1656 1687  
1657 1688 }
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   - };
  1689 +
  1690 + //under graduate
  1691 + if(result.EditionId==2 || result.EditionId==4 )
  1692 + {
  1693 + $rootScope.lexicons = {
  1694 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"2",
  1695 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1696 + };
  1697 + }
  1698 + else
  1699 + {
  1700 + $rootScope.lexicons = {
  1701 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1",
  1702 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1703 + };
  1704 + }
  1705 +
1663 1706  
1664 1707 $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids)
1665 1708  
... ... @@ -1691,10 +1734,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1691 1734  
1692 1735 }
1693 1736  
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   - };
  1737 + //under graduate
  1738 + if(result.EditionId==2 || result.EditionId==4 )
  1739 + {
  1740 + $rootScope.lexicons = {
  1741 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"2",
  1742 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1743 + };
  1744 + }
  1745 + else
  1746 + {
  1747 + $rootScope.lexicons = {
  1748 + primaryid:result.userLexicon!=null && result.userLexicon.primaryid!=""?result.userLexicon.primaryid:"1",
  1749 + secondryids:result.userLexicon!=null && result.userLexicon.secondryids!="" ?result.userLexicon.secondryids:""
  1750 + };
  1751 + }
1698 1752  
1699 1753 $rootScope.InitiateLexicon( $rootScope.lexicons.primaryid, $rootScope.lexicons.secondryids)
1700 1754  
... ... @@ -1802,10 +1856,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1802 1856 $location.path('/');
1803 1857 }
1804 1858 }
1805   - $rootScope.LoginEnableUI();
1806   - // set user session time
1807   - $rootScope.loadUserSession();
1808   -
  1859 +
  1860 + $rootScope.loadUserSession();
  1861 + $rootScope.LoginEnableUI();
  1862 +
1809 1863 }
1810 1864  
1811 1865 }
... ... @@ -1818,7 +1872,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1818 1872 console.log(' Error in authentication = ' + error.statusText);
1819 1873 $rootScope.LoginEnableUI();
1820 1874 $rootScope.isVisibleLogin = true;
1821   - $rootScope.errorMessage = error;
  1875 + $('#errorMessage').text(error);
1822 1876 $("#messageModal").modal('show');
1823 1877  
1824 1878 }
... ... @@ -1915,7 +1969,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1915 1969 console.log(result);
1916 1970 $rootScope.isVisibleLogin = true;
1917 1971 $('#dvTermCondition').fadeIn();
1918   - $rootScope.errorMessage = LoginConstants.LICENSE_TERM_CONDITION_UPDATE_FAILED;
  1972 + $('#errorMessage').text(LoginConstants.LICENSE_TERM_CONDITION_UPDATE_FAILED);
1919 1973 $("#messageModal").modal('show');
1920 1974 $("#messageModal").css("z-index", 111112);
1921 1975 localStorage.removeItem("loggedInUserDetails");
... ... @@ -1926,7 +1980,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1926 1980 console.log(' Error in Term and Condition acceptance status update = ' + error);//.statusText
1927 1981 $rootScope.isVisibleLogin = true;
1928 1982 $rootScope.isVisibleLogin = true;
1929   - $rootScope.errorMessage = error;
  1983 + $('#errorMessage').text(error);
1930 1984 $("#messageModal").modal('show');
1931 1985 $('#dvTermCondition').fadeIn();
1932 1986 });
... ... @@ -1956,7 +2010,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
1956 2010 userId: null,
1957 2011 tagName: null,
1958 2012 SessionId:null,
1959   - isSiteUser:false
  2013 + isSiteUser:false,
  2014 + isAdmin:false
1960 2015 }
1961 2016 console.log('user session start');
1962 2017 $rootScope.CheckUserSession('insert');
... ... @@ -2019,6 +2074,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2019 2074 $rootScope.LogoutUserSession = function () {
2020 2075 $rootScope.isSessionTimeout=true;
2021 2076 localStorage.removeItem('loggedInUserDetails');
  2077 + sessionStorage.removeItem('isModuleOpenByOpenResource');
  2078 + sessionStorage.removeItem('ExitsCBFileDetail');
2022 2079 localStorage.clear();
2023 2080 document.location = '/';
2024 2081 $rootScope.isVisibleLogin = true;
... ... @@ -2033,6 +2090,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2033 2090 $rootScope.userStatus.tagName=tagName;
2034 2091 $rootScope.userStatus.SessionId=$rootScope.userData.SessionId;
2035 2092 $rootScope.userStatus.isSiteUser=$rootScope.userData.isSiteUser;
  2093 + //licenseId would be zero for admin/gernal admin
  2094 + $rootScope.userStatus.isAdmin=$rootScope.userData.LicenseId==0?true:false;
2036 2095  
2037 2096 AuthenticationService.ManageUserLoginStatus($rootScope.userStatus)
2038 2097 .then(
... ... @@ -2048,7 +2107,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2048 2107 }),
2049 2108 function (error) {
2050 2109 console.log(' Error in user login status = ' + error.statusText);
2051   - $rootScope.errorMessage = error;
  2110 + $('#errorMessage').text(error);
2052 2111 $("#messageModal").modal('show');
2053 2112 }
2054 2113  
... ... @@ -2101,12 +2160,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2101 2160 .then(function (result) {
2102 2161 if (result == LoginConstants.USER_NOT_FOUND) {
2103 2162 removeEmailPopUp();
2104   - $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID;
  2163 + $('#errorMessage').text(LoginMessageConstants.INCORRECT_EMAIL_ID);
2105 2164 $("#messageModal").modal('show');
2106 2165 }
2107 2166 else if (result == LoginConstants.MAIL_NOT_SENT) {
2108 2167 removeEmailPopUp();
2109   - $rootScope.errorMessage = LoginMessageConstants.MAIL_NOT_SENT;
  2168 + $('#errorMessage').text(LoginMessageConstants.MAIL_NOT_SENT);
2110 2169 $("#messageModal").modal('show');
2111 2170 }
2112 2171 else {
... ... @@ -2122,7 +2181,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2122 2181 }
2123 2182 else
2124 2183 message = LoginMessageConstants.USERID_SENT_IN_EMAIL
2125   - $rootScope.errorMessage = message;
  2184 + $('#errorMessage').text(message);
2126 2185 $("#messageModal").modal('show');
2127 2186  
2128 2187  
... ... @@ -2133,19 +2192,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2133 2192 function (error) {
2134 2193 console.log(' Error in authentication = ' + error.statusText);
2135 2194 removeEmailPopUp();
2136   - $rootScope.errorMessage = error;
  2195 + $('#errorMessage').text( error);
2137 2196 $("#messageModal").modal('show');
2138 2197 });
2139 2198 }
2140 2199 else {
2141 2200 removeEmailPopUp();
2142   - $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID;
  2201 + $('#errorMessage').text(LoginMessageConstants.INCORRECT_EMAIL_ID);
2143 2202 $("#messageModal").modal('show');
2144 2203 }
2145 2204 }
2146 2205 else {
2147 2206 removeEmailPopUp();
2148   - $rootScope.errorMessage = LoginMessageConstants.BLANK_EMAIL_ID;
  2207 + $('#errorMessage').text(LoginMessageConstants.BLANK_EMAIL_ID);
2149 2208 $("#messageModal").modal('show');
2150 2209  
2151 2210 }
... ... @@ -2185,30 +2244,30 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2185 2244 .then(
2186 2245 function (result) {
2187 2246 if (result == LoginConstants.USER_NOT_FOUND) {
2188   - $rootScope.errorMessage = LoginMessageConstants.USER_NOT_FOUND;
  2247 + $('#errorMessage').text(LoginMessageConstants.USER_NOT_FOUND);
2189 2248 $("#messageModal").modal('show');
2190 2249  
2191 2250 }
2192 2251 else if (result == LoginConstants.EXCEPTION_OCCURED) {
2193   - $rootScope.errorMessage = LoginConstants.ERROR_IN_FECTHING_DETAILS;
  2252 + $('#errorMessage').text(LoginConstants.ERROR_IN_FECTHING_DETAILS);
2194 2253 $("#messageModal").modal('show');
2195 2254  
2196 2255 }
2197 2256 else if (result == LoginConstants.SQL_CONNECTION_ERROR) {
2198   - $rootScope.errorMessage = LoginConstants.SQL_CONNECTION_ERROR_MESSAGE;
  2257 + $('#errorMessage').text(LoginConstants.SQL_CONNECTION_ERROR_MESSAGE);
2199 2258 $("#messageModal").modal('show');
2200 2259 }
2201 2260 else {
2202 2261 //if ((result.IsAcknowledged == true) && (result.IsModifiedCountAvailable == true)) {
2203 2262 if (result == LoginMessageConstants.PASSWORD_UPDATE_SUCCESS) {
2204   - $rootScope.errorMessage = LoginMessageConstants.PASSWORD_RESET_MESSAGE;
  2263 + $('#errorMessage').text(LoginMessageConstants.PASSWORD_RESET_MESSAGE);
2205 2264 $("#messageModal").modal('show');
2206 2265 $rootScope.isVisibleLogin = true;
2207 2266 $rootScope.isVisibleResetPass = false;
2208 2267 $location.url("/");
2209 2268 }
2210 2269 else {
2211   - $rootScope.errorMessage = LoginMessageConstants.PASSWORD_RESET_FAILURE;
  2270 + $('#errorMessage').text(LoginMessageConstants.PASSWORD_RESET_FAILURE);
2212 2271 $("#messageModal").modal('show');
2213 2272 $rootScope.isVisibleLogin = true;
2214 2273 $rootScope.isVisibleResetPass = false;
... ... @@ -2218,18 +2277,18 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2218 2277 },
2219 2278 function (error) {
2220 2279 console.log(' Error in authentication = ' + error.statusText);
2221   - $rootScope.errorMessage = error;
  2280 + $('#errorMessage').text(error);
2222 2281 $("#messageModal").modal('show');
2223 2282  
2224 2283 });
2225 2284 }
2226 2285 else {
2227   - $rootScope.errorMessage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH;
  2286 + $('#errorMessage').text(LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH);
2228 2287 $("#messageModal").modal('show');
2229 2288 }
2230 2289 }
2231 2290 else {
2232   - $rootScope.errorMessage = LoginMessageConstants.NEW_PASSWORD_FIELD_IS_EMPTY;
  2291 + $('#errorMessage').text(LoginMessageConstants.NEW_PASSWORD_FIELD_IS_EMPTY);
2233 2292 $("#messageModal").modal('show');
2234 2293 }
2235 2294  
... ... @@ -2254,7 +2313,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2254 2313 $location.url("/");
2255 2314 }
2256 2315 else {
2257   - $rootScope.errorMessage = LoginMessageConstants.UNABLE_TO_UNBLOCK;
  2316 + $('#errorMessage').text(LoginMessageConstants.UNABLE_TO_UNBLOCK);
2258 2317 $("#messageModal").modal('show');
2259 2318 $rootScope.isVisibleLogin = true;
2260 2319 $location.url("/");
... ... @@ -2262,14 +2321,81 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2262 2321 },
2263 2322 function (error) {
2264 2323 console.log(' Error in UnblockUser = ' + error.statusText);
2265   - $rootScope.errorMessage = error;
  2324 + $('#errorMessage').text(error);
2266 2325 $("#messageModal").modal('show');
2267 2326 }
2268 2327 );
2269 2328 }
  2329 + $rootScope.AllPanelStoreObject=[];
  2330 + $rootScope.AllPanelObject=function(panelno,panelObject)
  2331 + {
  2332 + var windata={
  2333 + 'winid': panelno,
  2334 + 'panelObject': panelObject,
  2335 + };
  2336 +
  2337 + $rootScope.AllPanelStoreObject.push(windata);
  2338 + $(".jsPanel").draggable({
  2339 + containment : [0,55,5000,4000]//[left,top,right,bottom]
  2340 + });
  2341 +
  2342 + }
  2343 +
  2344 + $rootScope.orientationchangeToMax=function(windowviewid)
  2345 + {
  2346 + for (var x = 0 ; x < $rootScope.AllPanelStoreObject.length; x++) {
2270 2347  
  2348 + if ($rootScope.AllPanelStoreObject[x].winid == windowviewid) {
  2349 + var obj=$rootScope.AllPanelStoreObject[x]['panelObject'];
  2350 + obj.maximize();
  2351 + break;
  2352 + }
  2353 + }
  2354 + }
  2355 + $rootScope.orientationchangeToNormal=function(windowviewid)
  2356 + {
  2357 + for (var x = 0 ; x < $rootScope.AllPanelStoreObject.length; x++) {
  2358 +
  2359 + if ($rootScope.AllPanelStoreObject[x].winid == windowviewid) {
  2360 + var obj=$rootScope.AllPanelStoreObject[x]['panelObject'];
  2361 + obj.normalize();
  2362 + break;
  2363 + }
  2364 + }
  2365 + }
  2366 +
2271 2367 $(document).ready(function () {
2272 2368  
  2369 + var $ua = navigator.userAgent;
  2370 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  2371 + $('#arragePannel .dropdown-content').css("display","block");
  2372 + }
  2373 +
  2374 + $(window).unbind('resize');
  2375 + window.addEventListener("resize", orientationchange);
  2376 + function orientationchange() {
  2377 + if($location.url()!= "/curriculum-builder-detail") {
  2378 + var moduleImagePanel = $("div[id*='ImagePanel']");
  2379 +
  2380 + if (moduleImagePanel.length > 0) {
  2381 +
  2382 + for (var j = 0; j < moduleImagePanel.length; j++) {
  2383 + var paneld=moduleImagePanel[j].id;
  2384 + var len = (paneld).split("_").length;
  2385 + var MultiWinId = (paneld).split("_")[len - 1];
  2386 +
  2387 + //first set to normal and then to set max mode while browser resize or iPad orientation change
  2388 + $rootScope.orientationchangeToNormal(MultiWinId);
  2389 + $rootScope.orientationchangeToMax(MultiWinId);
  2390 +
  2391 + }
  2392 + }
  2393 +
  2394 + }
  2395 + };
  2396 +
  2397 +
  2398 +
2273 2399 $(function () {
2274 2400 var colpick = $('.demo').each(function () {
2275 2401  
... ... @@ -2564,30 +2690,228 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2564 2690 }, 300);
2565 2691 }
2566 2692  
2567   - $rootScope.cBModulejsPanelTop = function () {
2568   -
2569   - var paneltopPosition = 0;
  2693 + $rootScope.arrangeCascadePanel = function () {
  2694 + //cascade view
  2695 + var pTop = 55;
  2696 + var pLeft = 1;
  2697 + var resetWidth=0;
  2698 + if($location.url()== "/curriculum-builder-detail") {
  2699 + pTop = 30;
  2700 + pLeft = 0;
  2701 + }
2570 2702 var moduleImagePanel = $("div[id*='ImagePanel']");
  2703 +
  2704 + if (moduleImagePanel.length > 0) {
  2705 + var resetWidth=($(window).innerWidth()-30)/2;
  2706 +
  2707 + for (var j = 0; j < moduleImagePanel.length; j++) {
  2708 + var paneld=moduleImagePanel[j].id;
  2709 + var len = (paneld).split("_").length;
  2710 + var MultiWinId = (paneld).split("_")[len - 1];
  2711 + $rootScope.orientationchangeToNormal(MultiWinId);
  2712 +
  2713 + if(j>0)
  2714 + {
  2715 + pTop = pTop+30;
  2716 + pLeft = pLeft+30;
  2717 + }
  2718 + $("#"+paneld).css('top',pTop);
  2719 + $("#"+paneld).css('left',pLeft);
  2720 +
  2721 + $("#"+paneld+" .jsPanel-hdr .jsPanel-title").css('width','300px');
  2722 + $("#"+paneld).css('width',resetWidth);
  2723 + $("#"+paneld+' .jsPanel-content').css('width',resetWidth);
  2724 + $("#"+paneld).css('z-index',j+1000);
  2725 +
  2726 + $scope.resetPanelPosition(MultiWinId,paneld,resetWidth,pTop,pLeft);
  2727 +
  2728 + }
2571 2729  
2572   - if (moduleImagePanel.length > 0) {
2573   - for (var j = 0; j < moduleImagePanel.length; j++) {
2574   -
2575   - var ctx = document.getElementById(moduleImagePanel[j].id);
  2730 + }
  2731 +
  2732 + }
  2733 + $rootScope.arrangeTiledPanel = function () {
  2734 + //tiled view
  2735 + var pTop = 55;
  2736 + var pLeft = 1;
  2737 + var resetWidth=0;
  2738 + var countreset=0;
  2739 + if($location.url()== "/curriculum-builder-detail") {
  2740 + pTop = 30;
  2741 + pLeft = 0;
  2742 + }
  2743 + var countnumber=0;
  2744 + var moduleImagePanel = $("div[id*='ImagePanel']");
  2745 +
  2746 + if (moduleImagePanel.length > 0) {
2576 2747  
2577   - var pTop = ctx.offsetTop + ctx.offsetHeight + 10;
  2748 + if(moduleImagePanel.length<=2)
  2749 + {
  2750 + resetWidth=($(window).innerWidth()-30)/2;
  2751 + if($location.url()== "/curriculum-builder-detail") {
  2752 + resetWidth=($(window).innerWidth()-60)/2;
  2753 + }
  2754 +
  2755 + }
  2756 + else if(moduleImagePanel.length>=3)
  2757 + {
  2758 + resetWidth=($(window).innerWidth()-30)/3;
  2759 + if($location.url()== "/curriculum-builder-detail") {
  2760 + resetWidth=($(window).innerWidth()-65)/3;
  2761 + }
  2762 + }
  2763 +
  2764 + for (var j = 0; j < moduleImagePanel.length; j++) {
  2765 + countnumber=countnumber+1;
  2766 + var paneld=moduleImagePanel[j].id;
  2767 +
  2768 + var len = (paneld).split("_").length;
  2769 + var MultiWinId = (paneld).split("_")[len - 1];
  2770 + $rootScope.orientationchangeToNormal(MultiWinId);
  2771 +
  2772 + //set max tiles 3 on screen width
  2773 + if(countnumber>1 && countnumber<4)
  2774 + {
  2775 + pLeft = pLeft+resetWidth+5;
  2776 + }
  2777 + else if(countnumber>=4)
  2778 + {
  2779 + countreset=countreset+1;
  2780 + countnumber=1;
  2781 + pTop = 55+5+countreset*520;
  2782 + pLeft = 1;
  2783 + if($location.url()== "/curriculum-builder-detail") {
  2784 + pTop = 35+5+countreset*520;
  2785 + pLeft = 1;
  2786 + }
2578 2787  
2579   - if (paneltopPosition < pTop) {
2580   - paneltopPosition = pTop+20;
  2788 + }
  2789 +
  2790 + $("#"+paneld+" .jsPanel-hdr .jsPanel-title").css('width','300px');// remove extra tile width
  2791 + $("#"+paneld).css('width',resetWidth);
  2792 + $("#"+paneld+' .jsPanel-content').css('width',resetWidth);
  2793 +
  2794 + $("#"+paneld).css('top',pTop);
  2795 + $("#"+paneld).css('left',pLeft);
  2796 +
  2797 + $("#"+paneld).css('z-index',j+1000);
  2798 + $scope.resetPanelPosition(MultiWinId,paneld,resetWidth,pTop,pLeft);
2581 2799 }
2582 2800 }
  2801 +
2583 2802 }
2584   - else {
2585   - // first panel
2586   - paneltopPosition = 610;
  2803 +
  2804 + $scope.resetPanelPosition=function(MultiWinId,paneld,resetWidth,pTop,pLeft)
  2805 + {
  2806 + $rootScope.UnsaveCurriculum = true;
  2807 +
  2808 + if(paneld.match("daImagePanel"))
  2809 + {
  2810 + $("#"+paneld).css('height','520');
  2811 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2812 +
  2813 + $('#canvasDivDA_' + MultiWinId).css('height', '440');
  2814 + $rootScope.SetDAwindowData(MultiWinId,'width',resetWidth);
  2815 + $rootScope.SetDAwindowData(MultiWinId,'height',520);
  2816 + $rootScope.SetDAwindowData(MultiWinId,'y',pTop);
  2817 + $rootScope.SetDAwindowData(MultiWinId,'x',pLeft);
  2818 +
  2819 + }
  2820 + else if(paneld.match("AAImagePanel"))
  2821 + {
  2822 + $("#"+paneld).css('height','520');
  2823 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2824 +
  2825 + $('#canvasAADiv_' + MultiWinId).css('height', '440');
  2826 + $rootScope.SetAAwindowData(MultiWinId,'width',resetWidth);
  2827 + $rootScope.SetAAwindowData(MultiWinId,'height',520);
  2828 + $rootScope.SetAAwindowData(MultiWinId,'y',pTop);
  2829 + $rootScope.SetAAwindowData(MultiWinId,'x',pLeft);
  2830 + }
  2831 + else if(paneld.match("ciImagePanel"))
  2832 + {
  2833 + $("#"+paneld).css('height','520');
  2834 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2835 +
  2836 + $('#canvasDivCI_' + MultiWinId).css('height', '490');
  2837 + $rootScope.SetCIwindowData(MultiWinId,'width',resetWidth);
  2838 + $rootScope.SetCIwindowData(MultiWinId,'height',520);
  2839 + $rootScope.SetCIwindowData(MultiWinId,'y',pTop);
  2840 + $rootScope.SetCIwindowData(MultiWinId,'x',pLeft);
  2841 + }
  2842 + else if(paneld.match("aiImagePanel"))
  2843 + {
  2844 + $("#"+paneld).css('height','520');
  2845 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2846 +
  2847 + $('#canvasDivAI_' + MultiWinId).css('height', '485');
  2848 + $rootScope.SetAIwindowData(MultiWinId,'width',resetWidth);
  2849 + $rootScope.SetAIwindowData(MultiWinId,'height',520);
  2850 + $rootScope.SetAIwindowData(MultiWinId,'y',pTop);
  2851 + $rootScope.SetAIwindowData(MultiWinId,'x',pLeft);
  2852 + }
  2853 + else if(paneld.match("picImagePanel"))
  2854 + {
  2855 + $("#"+paneld).css('height','520');
  2856 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2857 +
  2858 + $('#canvasDivPIC_' + MultiWinId).css('height', '485');
  2859 + $rootScope.SetPICwindowData(MultiWinId,'width',resetWidth);
  2860 + $rootScope.SetPICwindowData(MultiWinId,'height',520);
  2861 + $rootScope.SetPICwindowData(MultiWinId,'y',pTop);
  2862 + $rootScope.SetPICwindowData(MultiWinId,'x',pLeft);
  2863 + }
  2864 + else if(paneld.match("ThreeDImagePanel"))
  2865 + {
  2866 + $("#"+paneld).css('height','520');
  2867 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2868 + $('#thContentDiv_'+ MultiWinId ).css("height",'490');
  2869 +
  2870 + $rootScope.Set3DwindowData(MultiWinId,'width',resetWidth);
  2871 + $rootScope.Set3DwindowData(MultiWinId,'height',520);
  2872 + $rootScope.Set3DwindowData(MultiWinId,'y',pTop);
  2873 + $rootScope.Set3DwindowData(MultiWinId,'x',pLeft);
  2874 +
  2875 + }
  2876 + else if(paneld.match("caImagePanel"))
  2877 + {
  2878 + $("#"+paneld).css('height','520');
  2879 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2880 + $('#playerinlineVideo_'+ MultiWinId ).css("height",370 );
  2881 +
  2882 + $rootScope.SetCAwindowData(MultiWinId,'width',resetWidth);
  2883 + $rootScope.SetCAwindowData(MultiWinId,'height',520);
  2884 + $rootScope.SetCAwindowData(MultiWinId,'y',pTop);
  2885 + $rootScope.SetCAwindowData(MultiWinId,'x',pLeft);
  2886 +
2587 2887 }
  2888 + else if(paneld.match("vidImagePanel"))
  2889 + {
  2890 + $("#"+paneld).css('height','520');
  2891 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2892 + $('#playerinlineVideo_'+ MultiWinId ).css("height",490 );
  2893 +
  2894 + $rootScope.SetVideowindowData(MultiWinId,'width',resetWidth);
  2895 + $rootScope.SetVideowindowData(MultiWinId,'height',520);
  2896 + $rootScope.SetVideowindowData(MultiWinId,'y',pTop);
  2897 + $rootScope.SetVideowindowData(MultiWinId,'x',pLeft);
  2898 +
  2899 + }
  2900 + else if(paneld.match("labImagePanel"))
  2901 + {
  2902 + $("#"+paneld).css('height','520');
  2903 + $("#"+paneld+' .jsPanel-content').css('height','490');
  2904 + $('#LabView_' + MultiWinId).css('height', 505);
  2905 + $('#panelbodyDiv_' + MultiWinId).css("height",380);
  2906 + $rootScope.SetLabwindowData(MultiWinId,'width',resetWidth);
  2907 + $rootScope.SetLabwindowData(MultiWinId,'height',520);
  2908 + $rootScope.SetLabwindowData(MultiWinId,'y',pTop);
  2909 + $rootScope.SetLabwindowData(MultiWinId,'x',pLeft);
  2910 +
  2911 + }
  2912 +
  2913 + }
2588 2914  
2589   - return paneltopPosition;
2590   - }
2591 2915 $rootScope.disableTopMenuOption=function()
2592 2916 {
2593 2917 $("#annotationButton").addClass("disableMenuoption");
... ... @@ -2938,7 +3262,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2938 3262 $rootScope.SetPaintZindexforDA(MultiWinId);
2939 3263  
2940 3264 }
2941   - else if(paneld.match("AAImagePanel"))
  3265 +
  3266 + if(paneld.match("AAImagePanel"))
2942 3267 {
2943 3268 $rootScope.aaAnnotationToolEvent(MultiWinId);
2944 3269 var canvasZIndex = $("#canvasAA_" + MultiWinId).css("z-index");
... ... @@ -2955,30 +3280,24 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
2955 3280 }
2956 3281  
2957 3282 }
2958   - else if(paneld.match("ciImagePanel"))
  3283 +
  3284 + if(paneld.match("ciImagePanel"))
2959 3285 {
2960   - $rootScope.ciAnnotationToolEvent(MultiWinId);
2961   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
2962   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
2963   -
2964   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
2965   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
2966   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
2967   -
2968   - }
2969   - else {
2970   - canvasZIndex = parseInt(canvasZIndex) + 1;
2971   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
2972   - }
2973   -
  3286 + $rootScope.ciAnnotationToolEvent(MultiWinId);
  3287 + $rootScope.SetPaintZindexforCI(MultiWinId);
  3288 +
2974 3289 }
2975   - else if(paneld.match("aiImagePanel"))
  3290 +
  3291 + if(paneld.match("aiImagePanel"))
2976 3292 {
2977 3293 $rootScope.aiAnnotationToolEvent(MultiWinId);
  3294 + $rootScope.SetPaintZindexforAI(MultiWinId);
2978 3295 }
2979   - else if(paneld.match("picImagePanel"))
  3296 +
  3297 + if(paneld.match("picImagePanel"))
2980 3298 {
2981 3299 $rootScope.picAnnotationToolEvent(MultiWinId);
  3300 + $rootScope.SetPaintZindexforPIC(MultiWinId);
2982 3301 }
2983 3302  
2984 3303 var PanelElement= $scope.GetPanelElement(paneld);
... ... @@ -3030,15 +3349,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3030 3349 var $ua = navigator.userAgent;
3031 3350 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
3032 3351  
3033   - var drawCanvasZindex = $("#canvasDA_" + MultiWinId).css("z-index");
3034   - var paintCanvasZindex = $("#canvasPaintDA_" + MultiWinId).css("z-index");
  3352 + var drawCanvasZindex = parseInt($("#canvasDA_" + MultiWinId).css("z-index"));
  3353 + var paintCanvasZindex = parseInt($("#canvasPaintDA_" + MultiWinId).css("z-index"));
3035 3354  
3036 3355 if (drawCanvasZindex > paintCanvasZindex) {
3037   - paintCanvasZindex = parseInt(drawCanvasZindex) + 1;
  3356 + paintCanvasZindex = drawCanvasZindex + 1;
3038 3357 }
3039 3358 else
3040 3359 {
3041   - paintCanvasZindex = parseInt(paintCanvasZindex) + 1;
  3360 + paintCanvasZindex = paintCanvasZindex + 1;
3042 3361 }
3043 3362  
3044 3363 $("#canvasPaintDA_" + MultiWinId).css("z-index", paintCanvasZindex);
... ... @@ -3049,6 +3368,73 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3049 3368  
3050 3369 }
3051 3370 }
  3371 + // keep on top paint Canvas zindex on top
  3372 + $rootScope.SetPaintZindexforAI = function (MultiWinId)
  3373 + {
  3374 + //scroll issue in iPad
  3375 + var $ua = navigator.userAgent;
  3376 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  3377 +
  3378 + var drawCanvasZindex = parseInt($("#canvasAI_" + MultiWinId).css("z-index"));
  3379 + var paintCanvasZindex = parseInt($("#canvasPaintAI_" + MultiWinId).css("z-index"));
  3380 +
  3381 + if (drawCanvasZindex > paintCanvasZindex) {
  3382 + paintCanvasZindex = drawCanvasZindex + 1;
  3383 + }
  3384 + else
  3385 + {
  3386 + paintCanvasZindex = paintCanvasZindex + 1;
  3387 + }
  3388 +
  3389 + $("#canvasPaintAI_" + MultiWinId).css("z-index", paintCanvasZindex);
  3390 + }
  3391 + }
  3392 +
  3393 + // keep on top paint Canvas zindex on top
  3394 + $rootScope.SetPaintZindexforPIC = function (MultiWinId)
  3395 + {
  3396 + //scroll issue in iPad
  3397 + var $ua = navigator.userAgent;
  3398 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  3399 +
  3400 + var drawCanvasZindex = parseInt($("#canvasPIC_" + MultiWinId).css("z-index"));
  3401 + var paintCanvasZindex = parseInt($("#canvasPaintPIC_" + MultiWinId).css("z-index"));
  3402 +
  3403 + if (drawCanvasZindex > paintCanvasZindex) {
  3404 + paintCanvasZindex = drawCanvasZindex + 1;
  3405 + }
  3406 + else
  3407 + {
  3408 + paintCanvasZindex = paintCanvasZindex + 1;
  3409 + }
  3410 +
  3411 + $("#canvasPaintPIC_" + MultiWinId).css("z-index", paintCanvasZindex);
  3412 + }
  3413 + }
  3414 +
  3415 + // keep on top paint Canvas zindex on top
  3416 + $rootScope.SetPaintZindexforCI = function (MultiWinId)
  3417 + {
  3418 + var drawCanvasZindex = parseInt($("#canvasCI_" + MultiWinId).css("z-index"));
  3419 + var paintCanvasZindex = parseInt($("#canvasPaintCI_" + MultiWinId).css("z-index"));
  3420 +
  3421 + if (drawCanvasZindex > paintCanvasZindex) {
  3422 + paintCanvasZindex = drawCanvasZindex + 1;
  3423 + }
  3424 + else
  3425 + {
  3426 + paintCanvasZindex = paintCanvasZindex + 1;
  3427 + }
  3428 +
  3429 + //scroll issue in iPad
  3430 + var $ua = navigator.userAgent;
  3431 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  3432 + $("#canvasPaintCI_" + MultiWinId).css("z-index", paintCanvasZindex);
  3433 + }
  3434 +
  3435 + $('#summary_' + MultiWinId).css("z-index", paintCanvasZindex+1);
  3436 +
  3437 + }
3052 3438  
3053 3439 $rootScope.CloseAnnotationTool = function () {
3054 3440 console.log('close');
... ... @@ -3141,19 +3527,17 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3141 3527  
3142 3528 if(paneld.match("ciImagePanel"))
3143 3529 {
3144   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3145   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3146   -
3147   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3148   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3149   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3150   -
3151   - }
3152   - else {
3153   - canvasZIndex = parseInt(canvasZIndex) + 1;
3154   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3155   - }
3156   -
  3530 + $rootScope.SetPaintZindexforCI(MultiWinId);
  3531 + }
  3532 +
  3533 + if(paneld.match("aiImagePanel"))
  3534 + {
  3535 + $rootScope.SetPaintZindexforAI(MultiWinId);
  3536 + }
  3537 +
  3538 + if(paneld.match("picImagePanel"))
  3539 + {
  3540 + $rootScope.SetPaintZindexforPIC(MultiWinId);
3157 3541 }
3158 3542  
3159 3543 }
... ... @@ -3250,21 +3634,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3250 3634  
3251 3635 if(paneld.match("ciImagePanel"))
3252 3636 {
3253   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3254   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3255   -
3256   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3257   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3258   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3259   -
3260   - }
3261   - else {
3262   - canvasZIndex = parseInt(canvasZIndex) + 1;
3263   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3264   - }
3265   -
  3637 + $rootScope.SetPaintZindexforCI(MultiWinId);
3266 3638 }
3267 3639  
  3640 + if(paneld.match("aiImagePanel"))
  3641 + {
  3642 + $rootScope.SetPaintZindexforAI(MultiWinId);
  3643 + }
  3644 +
  3645 + if(paneld.match("picImagePanel"))
  3646 + {
  3647 + $rootScope.SetPaintZindexforPIC(MultiWinId);
  3648 + }
  3649 +
3268 3650 // remove event listener
3269 3651 var PanelElement= $scope.GetPanelElement(paneld);
3270 3652 var canvasElement = PanelElement.canvasElement;
... ... @@ -3356,19 +3738,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3356 3738 }
3357 3739 if(paneld.match("ciImagePanel"))
3358 3740 {
3359   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3360   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3361   -
3362   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3363   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3364   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3365   -
3366   - }
3367   - else {
3368   - canvasZIndex = parseInt(canvasZIndex) + 1;
3369   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3370   - }
3371   -
  3741 + $rootScope.SetPaintZindexforCI(MultiWinId);
3372 3742 }
3373 3743  
3374 3744 // remove event listener
... ... @@ -3443,19 +3813,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3443 3813 }
3444 3814 if(paneld.match("ciImagePanel"))
3445 3815 {
3446   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3447   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3448   -
3449   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3450   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3451   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3452   -
3453   - }
3454   - else {
3455   - canvasZIndex = parseInt(canvasZIndex) + 1;
3456   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3457   - }
3458   -
  3816 + $rootScope.SetPaintZindexforCI(MultiWinId);
3459 3817 }
3460 3818  
3461 3819 $scope.onDrawingCanvasOnModule(canvasElement);
... ... @@ -3528,18 +3886,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3528 3886 }
3529 3887 if(paneld.match("ciImagePanel"))
3530 3888 {
3531   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3532   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3533   -
3534   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3535   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3536   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3537   -
3538   - }
3539   - else {
3540   - canvasZIndex = parseInt(canvasZIndex) + 1;
3541   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3542   - }
  3889 + $rootScope.SetPaintZindexforCI(MultiWinId);
3543 3890  
3544 3891 }
3545 3892  
... ... @@ -3581,19 +3928,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3581 3928 }
3582 3929 if(paneld.match("ciImagePanel"))
3583 3930 {
3584   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3585   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3586   -
3587   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3588   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3589   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3590   -
3591   - }
3592   - else {
3593   - canvasZIndex = parseInt(canvasZIndex) + 1;
3594   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3595   - }
3596   -
  3931 + $rootScope.SetPaintZindexforCI(MultiWinId);
3597 3932 }
3598 3933  
3599 3934 // remove event listener
... ... @@ -3646,19 +3981,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3646 3981  
3647 3982 if(paneld.match("ciImagePanel"))
3648 3983 {
3649   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3650   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3651   -
3652   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3653   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3654   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3655   -
3656   - }
3657   - else {
3658   - canvasZIndex = parseInt(canvasZIndex) + 1;
3659   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3660   - }
3661   -
  3984 + $rootScope.SetPaintZindexforCI(MultiWinId);
3662 3985 }
3663 3986  
3664 3987 $scope.onDrawingCanvasOnModule(canvasElement);
... ... @@ -3744,19 +4067,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3744 4067  
3745 4068 if(paneld.match("ciImagePanel"))
3746 4069 {
3747   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3748   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3749   -
3750   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3751   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3752   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3753   -
3754   - }
3755   - else {
3756   - canvasZIndex = parseInt(canvasZIndex) + 1;
3757   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3758   - }
3759   -
  4070 + $rootScope.SetPaintZindexforCI(MultiWinId);
3760 4071 }
3761 4072 // remove event listener
3762 4073 $scope.removeOnDrawingCanvas(canvasElement);
... ... @@ -3793,19 +4104,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3793 4104 $rootScope.switchCanvasToPaintCanvas(paneld);
3794 4105 if(paneld.match("ciImagePanel"))
3795 4106 {
3796   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3797   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3798   -
3799   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3800   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3801   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3802   -
3803   - }
3804   - else {
3805   - canvasZIndex = parseInt(canvasZIndex) + 1;
3806   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3807   - }
3808   -
  4107 + $rootScope.SetPaintZindexforCI(MultiWinId);
3809 4108 }
3810 4109  
3811 4110 $('#' + canvasPaintId).sketch();
... ... @@ -3972,19 +4271,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3972 4271 }
3973 4272 if(paneld.match("ciImagePanel"))
3974 4273 {
3975   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
3976   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
3977   -
3978   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
3979   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
3980   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
3981   -
3982   - }
3983   - else {
3984   - canvasZIndex = parseInt(canvasZIndex) + 1;
3985   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
3986   - }
3987   -
  4274 + $rootScope.SetPaintZindexforCI(MultiWinId);
3988 4275 }
3989 4276  
3990 4277 $scope.onDrawingCanvasOnModule(canvasElement);
... ... @@ -4034,19 +4321,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4034 4321 }
4035 4322 if(paneld.match("ciImagePanel"))
4036 4323 {
4037   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
4038   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
4039   -
4040   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
4041   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
4042   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
4043   -
4044   - }
4045   - else {
4046   - canvasZIndex = parseInt(canvasZIndex) + 1;
4047   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
4048   - }
4049   -
  4324 + $rootScope.SetPaintZindexforCI(MultiWinId);
4050 4325 }
4051 4326  
4052 4327 $scope.onDrawingCanvasOnModule(canvasElement);
... ... @@ -4095,19 +4370,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4095 4370 }
4096 4371 if(paneld.match("ciImagePanel"))
4097 4372 {
4098   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
4099   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
4100   -
4101   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
4102   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
4103   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
4104   -
4105   - }
4106   - else {
4107   - canvasZIndex = parseInt(canvasZIndex) + 1;
4108   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
4109   - }
4110   -
  4373 + $rootScope.SetPaintZindexforCI(MultiWinId);
4111 4374 }
4112 4375  
4113 4376 $scope.onDrawingCanvasOnModule(canvasElement);
... ... @@ -4155,19 +4418,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4155 4418 }
4156 4419 if(paneld.match("ciImagePanel"))
4157 4420 {
4158   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
4159   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
4160   -
4161   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
4162   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
4163   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
4164   -
4165   - }
4166   - else {
4167   - canvasZIndex = parseInt(canvasZIndex) + 1;
4168   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
4169   - }
4170   -
  4421 + $rootScope.SetPaintZindexforCI(MultiWinId);
4171 4422 }
4172 4423  
4173 4424 $scope.onDrawingCanvasOnModule(canvasElement);
... ... @@ -4268,19 +4519,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4268 4519 }
4269 4520 if(paneld.match("ciImagePanel"))
4270 4521 {
4271   - var canvasZIndex = $("#canvasCI_" + MultiWinId).css("z-index");
4272   - var canvasPaintZIndex = $("#canvasPaintCI_" + MultiWinId).css("z-index");
4273   -
4274   - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {
4275   - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;
4276   - $('#summary_' + MultiWinId).css("z-index", canvasPaintZIndex);
4277   -
4278   - }
4279   - else {
4280   - canvasZIndex = parseInt(canvasZIndex) + 1;
4281   - $('#summary_' + MultiWinId).css("z-index", canvasZIndex);
4282   - }
4283   -
  4522 + $rootScope.SetPaintZindexforCI(MultiWinId);
4284 4523 }
4285 4524 }
4286 4525 }
... ... @@ -8270,20 +8509,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8270 8509 setting.modesty =Formatsetting.modesty ;
8271 8510 setting.skintone = Formatsetting.ethnicity;
8272 8511  
8273   - // var isallowToChange=false;
8274 8512 if($rootScope.userData.isSiteUser)
8275 8513 {
8276 8514 // send as user id
8277 8515 setting.userId = $rootScope.userData.siteId;
8278   - //isallowToChange=$rootScope.userData.EditionId<3;
8279 8516 }
8280 8517 else
8281 8518 {
8282 8519 setting.userId = $rootScope.userData.Id;
8283   - //concurrent license
8284   - // only instructor
8285   - //if($rootScope.userData.LicenseId!=0)
8286   - // isallowToChange=$rootScope.userData.EditionId<3;
8287 8520  
8288 8521 }
8289 8522  
... ... @@ -8300,8 +8533,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8300 8533 setting.isSiteUser=$rootScope.userData.isSiteUser;
8301 8534 setting.LicenseEditionId=$rootScope.userData.LicenseEditionId;
8302 8535  
8303   - // if(isallowToChange ||$rootScope.userData.LicenseId==0)
8304   - // {
8305 8536 AuthenticationService.saveSetings(setting)
8306 8537 .then(
8307 8538 function (result) {
... ... @@ -8319,7 +8550,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8319 8550 }
8320 8551 else
8321 8552 {
8322   - $rootScope.errorMessage =AIAConstants.SETTING_SAVE_ERROR;
  8553 + $('#errorMessage').text(AIAConstants.SETTING_SAVE_ERROR);
8323 8554 $("#messageModal").modal('show');
8324 8555 }
8325 8556  
... ... @@ -8331,23 +8562,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8331 8562 $('#modal-settings').css("display", "none");
8332 8563 $('#modelsettingsbackground').css('z-index', '12000000');
8333 8564 $("#modelsettingsbackground").css("display", "none");
8334   - $rootScope.errorMessage = error;
  8565 + $('#errorMessage').text(error);
8335 8566 $("#messageModal").modal('show');
8336 8567 }
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   - // }
8350   -
  8568 +
8351 8569 };
8352 8570  
8353 8571  
... ... @@ -8605,6 +8823,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8605 8823 };
8606 8824  
8607 8825 $rootScope.ShowPrintWindow = function () { // Print Active Viewer
  8826 + $scope.Totalpage=0;
  8827 + $scope.pageCount=0;
8608 8828  
8609 8829 if ($('#printDivContent').html() != "") {
8610 8830 $('#printDivContent').empty();
... ... @@ -8618,14 +8838,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8618 8838  
8619 8839 if (canvasDivElement == null || canvasDivElement == undefined) return;
8620 8840 var canvasDivId = canvasDivElement.id;
8621   -
  8841 + $scope.Totalpage=1;
8622 8842 CollectPrintData(canvasDivId, 1, panelTitle);
8623 8843  
8624   -
8625   - $timeout(function () {
8626   - SetFrameToPrint();
8627   - }, 500);
8628   -
8629 8844 };
8630 8845  
8631 8846  
... ... @@ -8636,14 +8851,18 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8636 8851 }
8637 8852  
8638 8853 var multiprint = function (canvasId, page, title, delaytime) {
  8854 +
8639 8855 $timeout(function () { CollectPrintData(canvasId, page, title) }, delaytime);
8640 8856 };
8641 8857  
8642 8858 var pageno = 0;
  8859 + $scope.Totalpage=0;
  8860 + $scope.pageCount=0;
8643 8861 // select all open module div.
8644 8862 var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='ThreeDImagePanel']").not("div[id*='labImagePanel']").not("div[id*='vidImagePanel']");
8645 8863  
8646   - for (var i = 0 ; i < modulePanel.length; i++) {
  8864 + $scope.Totalpage=modulePanel.length;
  8865 + for (var i = 0 ; i < $scope.Totalpage; i++) {
8647 8866  
8648 8867 var paneld = modulePanel[i].id;
8649 8868  
... ... @@ -8655,21 +8874,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8655 8874 var canvasDivId = canvasDivElement.id;
8656 8875 var panelTitle = document.getElementById(paneld).childNodes[0].innerText;
8657 8876  
8658   - var timeintrval = pageno * 400;
  8877 + pageno = pageno + 1;
  8878 + var timeintrval = pageno * 200;
8659 8879  
8660 8880 multiprint(canvasDivId, pageno, panelTitle,timeintrval);
8661 8881  
8662   - if(pageno==modulePanel.length-1)
8663   - {
8664   - $timeout(function () {
8665   - // working for all device
8666   - SetFrameToPrint();
8667   -
8668   - }, pageno * 400+500);
8669   -
8670   - }
8671   - pageno = pageno + 1;
8672   -
8673 8882 }
8674 8883  
8675 8884 }
... ... @@ -8681,6 +8890,23 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8681 8890 html2canvas($("#" + canvasDivId), {
8682 8891 onrendered: function (canvas) {
8683 8892 var dataURL = canvas.toDataURL("image/jpeg");
  8893 + if (canvas.id.match("canvasDivDA")) {
  8894 + var curModule = 'DISSECTIBLE_ANATOMY';
  8895 + }
  8896 + else if (canvas.id.match("canvasAADiv")) {
  8897 + var curModule = 'ATLAS_ANATOMY';
  8898 + }
  8899 + else if (canvas.id.match("canvasDivCI")) {
  8900 + var curModule = 'CLINICAL_ILLUSTRATIONS';
  8901 + }
  8902 + else if (canvas.id.match("canvasDivAI")) {
  8903 + var curModule = 'ADAM_IMAGES';
  8904 + }
  8905 + else if (canvas.id.match("canvasDivPIC")) {
  8906 + var curModule = 'MY_PICTURES';
  8907 + }
  8908 +
  8909 + $scope.pageCount= $scope.pageCount+1;
8684 8910  
8685 8911 if (pageno == 1) {
8686 8912 $('#printDivContent').append("<div id='dvPortrait" + pageno + "'>");
... ... @@ -8694,15 +8920,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8694 8920 $('#image_preview' + pageno).append("<div id='image_Header" + pageno + "' style='position: absolute; top: 0px; width:98%'>");
8695 8921  
8696 8922 //<!--Dynamic Print Header-->
8697   - var getHeader = "<div id='printHeader" + pageno + "'><div style='position: relative; float: left;'><span id='spnModule'>"+$rootScope.currentActiveModuleTitle+"</span> </div><div style='position: relative; float: right;margin-right: 20px;'><span id='spnBodyViewTitle" + pageno + " '>"+panelTitle+"</span></div></div>";
  8923 + var getHeader = "<div id='printHeader" + pageno + "'><div style='position: relative; float: left;'><span id='spnModule'>"+curModule+"</span> </div><div style='position: relative; float: right;margin-right: 20px;'><span id='spnBodyViewTitle" + pageno + " '>"+panelTitle+"</span></div></div>";
8698 8924  
8699 8925 $('#image_Header' + pageno).append(getHeader);
8700 8926  
8701 8927 if (canvas.height < 825) {
8702   - $('#image_preview' + pageno).append("<img id='snipImage" + pageno + "' alt='' class='logo-image' style='width: 90%;height:auto;top:20px ; position: relative;'>");
  8928 + if (canvas.width < 600) {
  8929 + $('#image_preview' + pageno).append("<img id='snipImage" + pageno + "' alt='' class='logo-image' style='width: 90%;height:90%;top:20px ; position: relative;'>");
  8930 + }
  8931 + else{
  8932 + $('#image_preview' + pageno).append("<img id='snipImage" + pageno + "' alt='' class='logo-image' style='width: 95%;height:auto;top:20px ; position: relative;'>");
  8933 + }
  8934 +
8703 8935 }
8704 8936 else {
8705   - $('#image_preview' + pageno).append("<img id='snipImage" + pageno + "' alt='' class='logo-image' style='width: 90%;height:92%; top:20px ; position: relative;'>");
  8937 + $('#image_preview' + pageno).append("<img id='snipImage" + pageno + "' alt='' class='logo-image' style='width: 95%;height:92%; top:20px ; position: relative;'>");
8706 8938  
8707 8939 }
8708 8940  
... ... @@ -8713,7 +8945,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8713 8945 var getfooter = document.getElementById('printFooter').innerHTML;
8714 8946 $('#image_Footer' + pageno).append(getfooter);
8715 8947  
  8948 + if($scope.Totalpage==$scope.pageCount)
  8949 + {
  8950 + $timeout(function () {
  8951 + SetFrameToPrint();
  8952 + }, 300);
8716 8953  
  8954 + }
8717 8955 }
8718 8956 });
8719 8957  
... ... @@ -8742,7 +8980,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8742 8980 window.frames["frame1"].focus();
8743 8981 window.frames["frame1"].print();
8744 8982 frame1.remove();
8745   - }, 500);
  8983 + }, 100);
8746 8984  
8747 8985 }
8748 8986  
... ... @@ -8773,10 +9011,25 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8773 9011 if ($('#jsPanel-1').length > 0) {
8774 9012 // $('.jsPanel-btn-norm').attr('style', 'display: block');
8775 9013 }
  9014 + if (canvas.id.match("canvasDivDA")) {
  9015 + var curModule = 'DISSECTIBLE_ANATOMY';
  9016 + }
  9017 + else if (canvas.id.match("canvasAADiv")) {
  9018 + var curModule = 'ATLAS_ANATOMY';
  9019 + }
  9020 + else if (canvas.id.match("canvasDivCI")) {
  9021 + var curModule = 'CLINICAL_ILLUSTRATIONS';
  9022 + }
  9023 + else if (canvas.id.match("canvasDivAI")) {
  9024 + var curModule = 'ADAM_IMAGES';
  9025 + }
  9026 + else if (canvas.id.match("canvasDivPIC")) {
  9027 + var curModule = 'MY_PICTURES';
  9028 + }
8776 9029  
8777   - console.log('jsPanel loaded exist= ' + document.getElementById('jsPanel-1'));
8778   -
8779   - var curModule = $rootScope.currentActiveModuleTitle;
  9030 + $(".jsPanel").draggable({
  9031 + containment : [0,55,5000,4000]//[left,top,right,bottom]
  9032 + });
8780 9033 // var curPosture = $rootScope.getLocalStorageValue('currentViewTitle');
8781 9034 var curPosture = panelTitle;
8782 9035  
... ... @@ -8800,33 +9053,72 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8800 9053 }, 520);
8801 9054 }
8802 9055 else {
8803   - setTimeout(function () {
8804   - // $("#btnPrint").attr("id", canvas.id.replace("#",""));
8805   - document.getElementById('imgPortrait').setAttribute('src', dataURL);
8806   - document.getElementById('imgLandscape').setAttribute('src', dataURL);
8807   -
8808   - if (canvas.height < 825) {
8809   -
8810   - document.getElementById('imgPortrait').setAttribute("style", "width:90%");
  9056 + var timeintval = null;
  9057 + timeintval = $interval(function () {
  9058 + var printPageContent = document.getElementById('imgPortrait');
  9059 + if (printPageContent!=null) {
  9060 + $scope.stopPreview();
  9061 + document.getElementById('imgPortrait').setAttribute('src', dataURL);
  9062 + document.getElementById('imgLandscape').setAttribute('src', dataURL);
  9063 +
  9064 + if (canvas.height < 825) {
  9065 + if (canvas.width < 560) {
  9066 + document.getElementById('imgPortrait').setAttribute("style", "width:80%;");
  9067 + }
  9068 + else if (canvas.width < 660)
  9069 + {
  9070 + document.getElementById('imgPortrait').setAttribute("style", "width:90%;");
  9071 + }
  9072 + else
  9073 + {
  9074 + document.getElementById('imgPortrait').setAttribute("style", "width:100%;");
  9075 + }
  9076 +
  9077 + }
  9078 + else {
  9079 + document.getElementById('imgPortrait').setAttribute("style", "width:90%");
  9080 +
  9081 + }
  9082 +
  9083 + ResizeImage(0);
  9084 +
  9085 + document.getElementById('spnModulePor').innerHTML = curModule;
  9086 + document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture;
  9087 + document.getElementById('spnModuleLan').innerHTML = curModule;
  9088 + document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture;
  9089 + if ($('#printcontainer').length > 0) {
  9090 + $("#printcontainer").css('width', $(window).outerWidth());
  9091 + $("#printcontainer").css('height', $(window).outerHeight());
  9092 + }
  9093 + var $ua = navigator.userAgent;
  9094 +
  9095 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  9096 + $("#dvPortrait").css('left', "0%");
  9097 + $("#dvPortrait").css('transform', "translateX(0%)");
  9098 +
  9099 + }
  9100 + else
  9101 + {
  9102 + $("#dvPortrait").css('left', "50%");
  9103 + $("#dvPortrait").css('transform', "translateX(-50%)");
  9104 + }
  9105 +
  9106 + $(".currentyear").html($rootScope.current_year);
  9107 +
8811 9108 }
8812   - else {
8813   - document.getElementById('imgPortrait').setAttribute("style", "width:80%");
8814   -
  9109 + else
  9110 + {
  9111 + console.log("waiting for print Data");
8815 9112 }
  9113 + }, 100);
8816 9114  
8817   - ResizeImage(0);
8818   -
8819   - document.getElementById('spnModulePor').innerHTML = curModule;
8820   - document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture;
8821   - document.getElementById('spnModuleLan').innerHTML = curModule;
8822   - document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture;
8823   - if ($('#printcontainer').length > 0) {
8824   - $("#printcontainer").css('width', $(window).outerWidth());
8825   - $("#printcontainer").css('height', $(window).outerHeight());
  9115 + $scope.stopPreview = function () {
  9116 + if (angular.isDefined(timeintval)) {
  9117 + $interval.cancel(timeintval);
  9118 + timeintval = undefined;
8826 9119 }
8827   -
8828   - $(".currentyear").html($rootScope.current_year);
8829   - }, 520);
  9120 + };
  9121 +
8830 9122 }
8831 9123  
8832 9124 }
... ... @@ -8837,18 +9129,25 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8837 9129  
8838 9130 $scope.printImagePreview = function (event) {
8839 9131  
8840   - PrintDivContentByID('printBoxPor');
  9132 + if($('#printBoxPor').css('display') == 'none'){
  9133 + PrintDivContentByID('printBoxLan');
  9134 + }
  9135 + else
  9136 + {
  9137 + PrintDivContentByID('printBoxPor');
  9138 + }
8841 9139  
8842 9140 }
8843 9141  
8844 9142 function PrintDivContentByID(id) {
8845   - if (id == 'printBoxPor') {
8846   - $("#printPSOptions").val("100%");
8847   - ResizeImage(1);
  9143 + if (id == 'printBoxPor' ||id == 'printBoxLan') {
  9144 + $("#printPSOptions").val("75%");
  9145 + ResizeImage(0);
8848 9146 }
8849 9147 var contents;
8850 9148 $(document).ready(function () {
8851 9149 contents = document.getElementById(id).innerHTML;
  9150 +
8852 9151 });
8853 9152 var frame1 = $('<iframe />');
8854 9153 frame1[0].name = "frame1";
... ... @@ -8862,6 +9161,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8862 9161 //Append the external CSS file.
8863 9162 frameDoc.document.write('<link href="content/css/print-Portrait.css" rel="stylesheet" type="text/css" />');
8864 9163 frameDoc.document.write('<link href="content/css/print-main.css" rel="stylesheet" type="text/css" />');
  9164 + frameDoc.document.write('<style> #dvPortrait {width:650px !important} #dvLandscape {width:650px !important} </style>');
8865 9165 //Append the DIV contents.
8866 9166 frameDoc.document.write(contents);
8867 9167 frameDoc.document.write('</body></html>');
... ... @@ -8870,7 +9170,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8870 9170 window.frames["frame1"].focus();
8871 9171 window.frames["frame1"].print();
8872 9172 frame1.remove();
8873   - }, 500);
  9173 + }, 100);
8874 9174  
8875 9175 }
8876 9176  
... ... @@ -8903,7 +9203,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
8903 9203 left: 1,
8904 9204 },
8905 9205 controls: { buttons: 'closeonly' },
8906   - size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() + 60 },
  9206 + size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() +60},
8907 9207 });
8908 9208 }
8909 9209 $rootScope.getLocalStorageValue = function (localStorageParam) {
... ... @@ -9067,14 +9367,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9067 9367 $(document).on('click', '#dvOpenResourcePanel .jsglyph-remove', function () {
9068 9368  
9069 9369 $("#HomeContainerDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" });
9070   - $(".navbar-fixed-top").css({ "display": "block", "pointer-events": "auto", "opacity": "1" });
9071   - $("#topMenuBar").css({ "display": "block", "pointer-events": "auto", "opacity": "1" });
9072   -
  9370 +
9073 9371 $('#dvOpenResourcePanel').remove();
9074 9372 sessionStorage.removeItem('isModuleOpenByOpenResource');
9075 9373 $("#jsPanel-min-container").removeAttr("style");
9076 9374 if (document.location.pathname == "/curriculum-builder-detail") {
9077   - $("#jsPanel-min-container").css( 'left', '300px' );
  9375 + if($('div.CBLeft-Sidebar').hasClass('active'))
  9376 + {
  9377 + $('#jsPanel-min-container').css('left','15px');
  9378 + }
  9379 + else
  9380 + {
  9381 + $('#jsPanel-min-container').css('left','300px');
  9382 + }
9078 9383 }
9079 9384 });
9080 9385  
... ... @@ -9124,7 +9429,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9124 9429 },
9125 9430 function (error) {
9126 9431 console.log(' Error in sending mail to admin support = ' + error.statusText);
9127   - $rootScope.errorMessage = AdminConstants.ERROR_IN_SENDING_MAIL;
  9432 + $('#errorMessage').text(AdminConstants.ERROR_IN_SENDING_MAIL);
9128 9433 $("#messageModal").modal('show');
9129 9434 });
9130 9435 };
... ... @@ -9384,7 +9689,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9384 9689 }),
9385 9690 function (error) {
9386 9691 console.log(' Error in export Image to databse = ' + error.statusText);
9387   - $rootScope.errorMessage = error;
  9692 + $('#errorMessage').text(error);
9388 9693 $("#messageModal").modal('show');
9389 9694 }
9390 9695  
... ... @@ -9456,7 +9761,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
9456 9761 }),
9457 9762 function (error) {
9458 9763 console.log(' Error in export Image to databse = ' + error.statusText);
9459   - $rootScope.errorMessage = error;
  9764 + $('#errorMessage').text(error);
9460 9765 $("#messageModal").modal('show');
9461 9766 }
9462 9767  
... ... @@ -9497,8 +9802,7 @@ function OpenResourcePanel(iframe) {
9497 9802 function closeIFrame() {
9498 9803 $('#dvOpenResourcePanel').remove();
9499 9804 $("#HomeContainerDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" });
9500   - $(".navbar-fixed-top").css({ "display": "block", "pointer-events": "auto", "opacity": "1" });
9501   - $("#topMenuBar").css({ "display": "block", "pointer-events": "auto", "opacity": "1" });
  9805 +
9502 9806 }
9503 9807  
9504 9808 function AIAModuleOpenResourceInfo(windowData) {
... ... @@ -9509,7 +9813,14 @@ function AIAModuleOpenResourceInfo(windowData) {
9509 9813 var scope = angular.element(document.querySelector('[ng-controller="HomeController"]')).scope();
9510 9814 scope.$apply(function () {
9511 9815 if (document.location.pathname == "/curriculum-builder-detail") {
9512   - $("#jsPanel-min-container").css( 'left', '300px' );
  9816 + if($('div.CBLeft-Sidebar').hasClass('active'))
  9817 + {
  9818 + $('#jsPanel-min-container').css('left','15px');
  9819 + }
  9820 + else
  9821 + {
  9822 + $('#jsPanel-min-container').css('left','300px');
  9823 + }
9513 9824 }
9514 9825 scope.AIAModuleOpenResourceInfo(windowData);
9515 9826 });
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
... ... @@ -92,6 +92,17 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
92 92 }
93 93 }
94 94  
  95 + // access from home controller
  96 + $rootScope.SetLabwindowData=function(windowviewid,keyname,data) {
  97 + for(var x=0 ;x < $rootScope.LEWindowData.length;x++){
  98 +
  99 + if($rootScope.LEWindowData[x].multiwinid==windowviewid)
  100 + {
  101 + $rootScope.LEWindowData[x][keyname]=data;
  102 + }
  103 + }
  104 + }
  105 +
95 106 $scope.DisableUI = function () {
96 107  
97 108 var leImagePanelConetent = document.getElementsByClassName("jsPanel-content");
... ... @@ -215,8 +226,8 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
215 226 "id": excercise.Slug,
216 227 "mType": 'LAB_EXERCISE',
217 228 "windowTitle": excercise.Topic,
218   - "size": { height: 500, width: 900 },
219   - "position": { x: 300, y: 110 }
  229 + "size": { height: 600, width: 900 },
  230 + "position": { x: 1, y: 30 }
220 231 };
221 232  
222 233 window.parent.AIAModuleOpenResourceInfo(LEopenData);
... ... @@ -241,9 +252,10 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
241 252 }
242 253  
243 254 $rootScope.InitializeLabExerciseMain = function () {
244   - $scope.DisableUI();
245 255 if ($rootScope.isCallFromOtherModule) {
246 256 $scope.LEModuleData = ModuleService.getModuleData("LAB_EXERCISE");
  257 + if($scope.LEModuleData.length<1) return;
  258 + $scope.DisableUI();
247 259 $scope.readyToLoad = true;
248 260 $rootScope.LEWindowLoadComplete = false;
249 261 $scope.wincount = 1;
... ... @@ -281,6 +293,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
281 293  
282 294 }
283 295 else {
  296 + $scope.DisableUI();
284 297 $scope.InitializeLabExercise(null);
285 298 }
286 299 }
... ... @@ -353,13 +366,15 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
353 366 $scope.jsPanelHeight = 450;
354 367  
355 368 $scope.jsPanelLeft = $scope.leOpenInOtherModules.position.x;
356   - if ($scope.leOpenInOtherModules.position.x < 20)
357   - $scope.jsPanelLeft = 20;
  369 + if ($scope.leOpenInOtherModules.position.x <= 1)
  370 + $scope.jsPanelLeft = 0;
358 371 $scope.jsPanelTop = $scope.leOpenInOtherModules.position.y;
359   -
  372 + if ($scope.leOpenInOtherModules.position.y < 30)
  373 + $scope.jsPanelTop = 30;
  374 +
360 375 if($location.url()!= "/curriculum-builder-detail") {
361   - $scope.jsPanelLeft = 1;
362   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
  376 + $scope.jsPanelLeft = 1;
  377 + $scope.jsPanelTop = 85;
363 378 }
364 379  
365 380 }
... ... @@ -367,7 +382,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
367 382 $scope.jsPanelWidth = $(window).outerWidth() - 10;
368 383 $scope.jsPanelHeight = $(window).outerHeight() - 110;
369 384 $scope.jsPanelLeft = 1;
370   - $scope.jsPanelTop = 70;
  385 + $scope.jsPanelTop = 55;
371 386 }
372 387  
373 388 $scope.jsPanelLab = $.jsPanel({
... ... @@ -391,6 +406,9 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
391 406 height: $scope.jsPanelHeight
392 407 },
393 408 onminimized:function (panel) {
  409 + var pnlName=panel[0].id;
  410 + var len = (pnlName).split("_").length;
  411 + var windowviewid = (pnlName).split("_")[len - 1];
394 412 var isAutoCalled = $scope.GetLEwindowStoreData(windowviewid, 'minmaxAutoEvent');
395 413 if(!isAutoCalled)
396 414 {
... ... @@ -400,6 +418,9 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
400 418 $scope.SetLEwindowStoreData(windowviewid, 'maximised',false);
401 419 },
402 420 onmaximized:function (panel) {
  421 + var pnlName=panel[0].id;
  422 + var len = (pnlName).split("_").length;
  423 + var windowviewid = (pnlName).split("_")[len - 1];
403 424 var isAutoCalled = $scope.GetLEwindowStoreData(windowviewid, 'minmaxAutoEvent');
404 425 if(!isAutoCalled)
405 426 {
... ... @@ -410,8 +431,12 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
410 431 var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight()) - 15;
411 432 $('#LabView_' + windowviewid).css('height', canvasDIvHeight);
412 433 $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-125);
  434 + $rootScope.resetMenuOptionOnClick(pnlName);
413 435 },
414 436 onnormalized:function (panel) {
  437 + var pnlName=panel[0].id;
  438 + var len = (pnlName).split("_").length;
  439 + var windowviewid = (pnlName).split("_")[len - 1];
415 440 var isAutoCalled = $scope.GetLEwindowStoreData(windowviewid, 'minmaxAutoEvent');
416 441 if(!isAutoCalled)
417 442 {
... ... @@ -422,27 +447,34 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
422 447 var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight()) - 15;
423 448 $('#LabView_' + windowviewid).css('height', canvasDIvHeight);
424 449 $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-125);
  450 + $rootScope.resetMenuOptionOnClick(pnlName);
425 451 },
426 452 resizable: {
427 453 stop: function (event, ui) {
428   - var len = (event.currentTarget.id).split("_").length;
429   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  454 + var pnlName=event.currentTarget.id;
  455 + var len = (pnlName).split("_").length;
  456 + var windowviewid = (pnlName).split("_")[len - 1];
430 457 $scope.SetLEwindowStoreData(windowviewid, 'width', ui.size.width);
431 458 $scope.SetLEwindowStoreData(windowviewid, 'height', ui.size.height);
  459 + $scope.SetLEwindowStoreData(windowviewid, 'y', ui.position.top);
  460 + $scope.SetLEwindowStoreData(windowviewid, 'x', ui.position.left);
432 461 $rootScope.UnsaveCurriculum = true;
433 462 var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight()) - 15;
434 463 $('#LabView_' + windowviewid).css('height', canvasDIvHeight);
435 464 $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-125);
  465 + $rootScope.resetMenuOptionOnClick(pnlName);
436 466 }
437 467  
438 468 },
439 469 draggable: {
440 470 stop: function( event, ui ) {
441   - var len = (event.currentTarget.id).split("_").length;
442   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  471 + var pnlName=event.currentTarget.id;
  472 + var len = (pnlName).split("_").length;
  473 + var windowviewid = (pnlName).split("_")[len - 1];
443 474 $scope.SetLEwindowStoreData(windowviewid, 'y', ui.position.top);
444 475 $scope.SetLEwindowStoreData(windowviewid, 'x', ui.position.left);
445 476 $rootScope.UnsaveCurriculum = true;
  477 + $rootScope.resetMenuOptionOnClick(pnlName);
446 478  
447 479 }
448 480 },
... ... @@ -465,6 +497,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
465 497 else {
466 498 $scope.jsPanelLab.normalize();
467 499 }
  500 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelLab);
468 501 // set false after initial call of min,max or normal
469 502 $scope.SetLEwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
470 503 $scope.SetLEwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -1584,7 +1617,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
1584 1617  
1585 1618 console.log(' Error in saving lab exercise = ' + error.statusText);
1586 1619 $rootScope.isVisibleLogin = true;
1587   - $rootScope.errorMessage = error;
  1620 + $('#errorMessage').text(error);
1588 1621 $("#messageModal").modal('show');
1589 1622 $('#messageModal').css('z-index', '12000001');
1590 1623 }
... ... @@ -2214,7 +2247,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
2214 2247 else {
2215 2248 $rootScope.closeLabExEmailModel("", windowviewid);
2216 2249 var message = LoginConstants.MAIL_NOT_SENT
2217   - $rootScope.errorMessage = message;
  2250 + $('#errorMessage').text(message);
2218 2251 $("#messageModal").modal('show');
2219 2252 $('#messageModal').css('z-index', '12000001');
2220 2253 }
... ... @@ -2222,7 +2255,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
2222 2255 },
2223 2256 function (error) {
2224 2257 var message = LoginConstants.MAIL_NOT_SENT
2225   - $rootScope.errorMessage = message;
  2258 + $('#errorMessage').text(message);
2226 2259 $("#messageModal").modal('show');
2227 2260 $('#messageModal').css('z-index', '12000001');
2228 2261 console.log(error.statusText);
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
... ... @@ -69,6 +69,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
69 69 }
70 70 }
71 71  
  72 + // access from home controller
  73 + $rootScope.SetVideowindowData=function(windowviewid,keyname,data) {
  74 + for(var x=0 ;x < $rootScope.VideoWindowData.length;x++){
  75 +
  76 + if($rootScope.VideoWindowData[x].multiwinid==windowviewid)
  77 + {
  78 + $rootScope.VideoWindowData[x][keyname]=data;
  79 + }
  80 + }
  81 + }
  82 +
72 83 $scope.DisableUI = function () {
73 84  
74 85 var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content");
... ... @@ -146,8 +157,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
146 157  
147 158 $rootScope.OpenMyAnimationViewMain = function () {
148 159 if ($rootScope.isCallFromOtherModule) {
149   - $scope.DisableUI();
150 160 $scope.VideoModuleData = ModuleService.getModuleData("MY_ANIMATIONS");
  161 + if($scope.VideoModuleData.length<1) return;
  162 + $scope.DisableUI();
151 163 $scope.readyToLoad = true;
152 164 $rootScope.VideoLoadComplete = false;
153 165 $scope.wincount = 1;
... ... @@ -253,34 +265,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
253 265  
254 266 var playerScript = "~/../libs/video_4_12_11/video_4_12_11.js";
255 267  
256   - if ($rootScope.isCallFromOtherModule) {
257   - // open JS panel for curriculum with define cornonate in CB jason
258   - $scope.jsPanelWidth = $scope.VidOpenInOtherModules.size.width;//1000;
259   - if ($scope.VidOpenInOtherModules.size.width < 800)
260   - $scope.jsPanelWidth = 800;
261   -
262   - $scope.jsPanelHeight = $scope.VidOpenInOtherModules.size.height;
263   - if ($scope.VidOpenInOtherModules.size.height > 360)
264   - $scope.jsPanelHeight = 360;
265   -
266   - $scope.jsPanelLeft = $scope.VidOpenInOtherModules.position.x;
267   - if ($scope.VidOpenInOtherModules.position.x < 20)
268   - $scope.jsPanelLeft = 20;
269   - $scope.jsPanelTop = $scope.VidOpenInOtherModules.position.y;
270   -
271   - if($location.url()!= "/curriculum-builder-detail") {
  268 + // open JS panel for curriculum with define cornonate in CB jason
  269 + $scope.jsPanelWidth = $scope.VidOpenInOtherModules.size.width;//1000;
  270 + if ($scope.VidOpenInOtherModules.size.width < 500)
  271 + $scope.jsPanelWidth = 500;
  272 +
  273 + $scope.jsPanelHeight = $scope.VidOpenInOtherModules.size.height;
  274 + if ($scope.VidOpenInOtherModules.size.height < 400)
  275 + $scope.jsPanelHeight = 400;
  276 +
  277 + $scope.jsPanelLeft = $scope.VidOpenInOtherModules.position.x;
  278 + if ($scope.VidOpenInOtherModules.position.x <= 1)
  279 + $scope.jsPanelLeft = 0;
  280 + $scope.jsPanelTop = $scope.VidOpenInOtherModules.position.y;
  281 + if ($scope.VidOpenInOtherModules.position.y < 30)
  282 + $scope.jsPanelTop = 30;
  283 +
  284 + if($location.url()!= "/curriculum-builder-detail") {
272 285 $scope.jsPanelLeft = 1;
273   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
274   - }
275   -
  286 + $scope.jsPanelTop = 85;
276 287 }
277   - else {
278   - $scope.jsPanelWidth = $(window).outerWidth() - 20;
279   - $scope.jsPanelHeight = $(window).outerHeight() - 105;
280   - $scope.jsPanelLeft = 1;
281   - $scope.jsPanelTop = 70;
282   - }
283   -
284 288  
285 289 if (animationSource.length > 0 ) {
286 290 $scope.jsPanelVideo = $.jsPanel({
... ... @@ -290,20 +294,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
290 294 currentController: 'MyAnimationController',
291 295 parentSlug: $scope.GetVideowindowStoreData(windowviewid, 'parentSlugName'),
292 296 content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();});</script>' +
293   - '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="400"' +
  297 + '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="100%" height="400"' +
294 298 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="MyvideoOnLoad(event)"' +
295   - // ' poster="' + poster + '"' +
296 299 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' +
297   - // ' ad="' + admp4 + '"' +
298 300 ' nonad="' + animationSource + '"' +
299   - //' hd="' + hdvideo + '" ' +
300 301 ' nonhd="' + animationSource + '">' +
301 302 ' <source type="video/mp4" src="' + animationSource + '">' +
302   - //' <source type="video/webm" src="' + webm + '">' +
303   - // ' <source type="video/ogv" src="' + ogv + '">' +
304   - // ' <track src="' + vtt + '" kind="captions" srclang="en" label="On">'+
305   - '<object width="640" height="400"' +
306   - ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' +
  303 + '<object width="640" height="400" type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf">'+
  304 + '<param name="allowfullscreen" value="true">' +
307 305 ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' +
308 306 ' <param name="flashvars" ng-value="controls=true&amp;file=' + animationSource + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video></div></div>',
309 307  
... ... @@ -318,6 +316,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
318 316 height: $scope.jsPanelHeight
319 317 },
320 318 onminimized:function (panel) {
  319 + var pnlName=panel[0].id;
  320 + var len = (pnlName).split("_").length;
  321 + var windowviewid = (pnlName).split("_")[len - 1];
321 322 var isAutoCalled = $scope.GetVideowindowStoreData(windowviewid, 'minmaxAutoEvent');
322 323 if(!isAutoCalled)
323 324 {
... ... @@ -327,6 +328,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
327 328 $scope.SetVideowindowStoreData(windowviewid, 'maximised',false);
328 329 },
329 330 onmaximized:function (panel) {
  331 + var pnlName=panel[0].id;
  332 + var len = (pnlName).split("_").length;
  333 + var windowviewid = (pnlName).split("_")[len - 1];
330 334 var isAutoCalled = $scope.GetVideowindowStoreData(windowviewid, 'minmaxAutoEvent');
331 335 if(!isAutoCalled)
332 336 {
... ... @@ -335,9 +339,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
335 339 $scope.SetVideowindowStoreData(windowviewid, 'maximised',true);
336 340 $scope.SetVideowindowStoreData(windowviewid, 'minimised',false);
337 341 var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height();
338   - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-20 );
  342 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight);
  343 + $rootScope.resetMenuOptionOnClick(pnlName);
  344 + var $ua = navigator.userAgent;
  345 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  346 + var aodheight = screen.height;
  347 + if(aodheight>=1024)
  348 + {
  349 + $("#vidImagePanel_"+windowviewid).css('height',canvasDIvHeight+30-150);
  350 + $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").css('height',canvasDIvHeight-150);
  351 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-150 );
  352 + }
  353 + else if(aodheight<1024)
  354 + {
  355 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight);
  356 + }
  357 + }
339 358 },
340 359 onnormalized:function (panel) {
  360 + var pnlName=panel[0].id;
  361 + var len = (pnlName).split("_").length;
  362 + var windowviewid = (pnlName).split("_")[len - 1];
341 363 var isAutoCalled = $scope.GetVideowindowStoreData(windowviewid, 'minmaxAutoEvent');
342 364 if(!isAutoCalled)
343 365 {
... ... @@ -346,27 +368,34 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
346 368 $scope.SetVideowindowStoreData(windowviewid, 'minimised',false);
347 369 $scope.SetVideowindowStoreData(windowviewid, 'maximised',false);
348 370 var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height();
349   - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-20 );
  371 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight);
  372 + $rootScope.resetMenuOptionOnClick(pnlName);
350 373 },
351 374 resizable: {
352 375 stop: function (event, ui) {
353   - var len = (event.currentTarget.id).split("_").length;
354   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  376 + var pnlName=event.currentTarget.id;
  377 + var len = (pnlName).split("_").length;
  378 + var windowviewid = (pnlName).split("_")[len - 1];
355 379 $scope.SetVideowindowStoreData(windowviewid, 'width', ui.size.width);
356 380 $scope.SetVideowindowStoreData(windowviewid, 'height', ui.size.height);
  381 + $scope.SetVideowindowStoreData(windowviewid, 'y', ui.position.top);
  382 + $scope.SetVideowindowStoreData(windowviewid, 'x', ui.position.left);
357 383 $rootScope.UnsaveCurriculum = true;
358 384 var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height();
359   - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-20 );
  385 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight);
  386 + $rootScope.resetMenuOptionOnClick(pnlName);
360 387 }
361 388  
362 389 },
363 390 draggable: {
364 391 stop: function( event, ui ) {
365   - var len = (event.currentTarget.id).split("_").length;
366   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  392 + var pnlName=event.currentTarget.id;
  393 + var len = (pnlName).split("_").length;
  394 + var windowviewid = (pnlName).split("_")[len - 1];
367 395 $scope.SetVideowindowStoreData(windowviewid, 'y', ui.position.top);
368 396 $scope.SetVideowindowStoreData(windowviewid, 'x', ui.position.left);
369 397 $rootScope.UnsaveCurriculum = true;
  398 + $rootScope.resetMenuOptionOnClick(pnlName);
370 399 }
371 400 },
372 401  
... ... @@ -384,6 +413,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
384 413 else {
385 414 $scope.jsPanelVideo.normalize();
386 415 }
  416 +
  417 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelVideo);
  418 +
387 419 // set false after initial call of min,max or normal
388 420 $scope.SetVideowindowStoreData(windowviewid, 'minmaxAutoEvent', false);
389 421 $scope.SetVideowindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -399,10 +431,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
399 431 "slug": $scope.GetVideowindowStoreData(windowviewid, 'currentSlug')
400 432 });
401 433  
402   -
403   - // var jspContentHeight = $('.jsPanel-content').height();
404 434 var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height();
405   - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-20 );
  435 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight);
406 436  
407 437 var videoHeight = $('#divplayerinlineVideo_'+ windowviewid +' div').height();
408 438 if (videoHeight <= 0)
... ... @@ -421,12 +451,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
421 451  
422 452 }
423 453  
424   - if (!$rootScope.isCallFromOtherModule) {
425   - $('#VideoView').css("height", $(window).outerHeight() - 20);
426   -
427   - $('#VideoView').css("width", $(window).outerWidth() - 30);
428   -
429   - }
430 454 //Calling methode for save Js Panel Activity for SaveCB
431 455 $scope.PanelActivity();
432 456 }
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
... ... @@ -160,9 +160,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
160 160 }
161 161  
162 162 $rootScope.OpenMyPictureViewMain = function () {
163   - $scope.DisableUI();
164 163 if ($rootScope.isCallFromOtherModule) {
165 164 $scope.PicModuleData = ModuleService.getModuleData("MY_PICTURES");
  165 + if($scope.PicModuleData.length<1) return;
  166 + $scope.DisableUI();
166 167 $scope.readyToLoad = true;
167 168 $rootScope.PicLoadComplete = false;
168 169 $scope.wincount = 1;
... ... @@ -262,15 +263,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
262 263 $scope.jsPanelHeight = $scope.picOpenInOtherModules.size.height;
263 264 if ($scope.picOpenInOtherModules.size.height < 540)
264 265 $scope.jsPanelHeight = 540;
265   -
  266 +
266 267 $scope.jsPanelLeft = $scope.picOpenInOtherModules.position.x;
267   - if ($scope.picOpenInOtherModules.position.x < 20)
268   - $scope.jsPanelLeft = 20;
  268 + if ($scope.picOpenInOtherModules.position.x <= 1)
  269 + $scope.jsPanelLeft = 0;
269 270 $scope.jsPanelTop = $scope.picOpenInOtherModules.position.y;
270   -
  271 + if ($scope.picOpenInOtherModules.position.y < 30)
  272 + $scope.jsPanelTop = 30;
  273 +
271 274 if($location.url()!= "/curriculum-builder-detail") {
272   - $scope.jsPanelLeft = 1;
273   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
  275 + $scope.jsPanelLeft = 1;
  276 + $scope.jsPanelTop = 85;
274 277 }
275 278  
276 279 $scope.jsPanelPIC = $.jsPanel({
... ... @@ -297,6 +300,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
297 300 height: $scope.jsPanelHeight
298 301 },
299 302 onminimized:function (panel) {
  303 + var pnlName=panel[0].id;
  304 + var len = (pnlName).split("_").length;
  305 + var windowviewid = (pnlName).split("_")[len - 1];
300 306 var isAutoCalled = $scope.GetPICwindowStoreData(windowviewid, 'minmaxAutoEvent');
301 307 if(!isAutoCalled)
302 308 {
... ... @@ -306,6 +312,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
306 312 $scope.SetPICwindowStoreData(windowviewid, 'maximised',false);
307 313 },
308 314 onmaximized:function (panel) {
  315 + var pnlName=panel[0].id;
  316 + var len = (pnlName).split("_").length;
  317 + var windowviewid = (pnlName).split("_")[len - 1];
309 318 var isAutoCalled = $scope.GetPICwindowStoreData(windowviewid, 'minmaxAutoEvent');
310 319 if(!isAutoCalled)
311 320 {
... ... @@ -315,8 +324,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
315 324 $scope.SetPICwindowStoreData(windowviewid, 'minimised',false);
316 325 var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height();
317 326 $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5);
  327 + $rootScope.resetMenuOptionOnClick(pnlName);
318 328 },
319 329 onnormalized:function (panel) {
  330 + var pnlName=panel[0].id;
  331 + var len = (pnlName).split("_").length;
  332 + var windowviewid = (pnlName).split("_")[len - 1];
320 333 var isAutoCalled = $scope.GetPICwindowStoreData(windowviewid, 'minmaxAutoEvent');
321 334 if(!isAutoCalled)
322 335 {
... ... @@ -326,26 +339,33 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
326 339 $scope.SetPICwindowStoreData(windowviewid, 'maximised',false);
327 340 var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height();
328 341 $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5);
  342 + $rootScope.resetMenuOptionOnClick(pnlName);
329 343 },
330 344 resizable: {
331 345 stop: function (event, ui) {
332   - var len = (event.currentTarget.id).split("_").length;
333   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  346 + var pnlName=event.currentTarget.id;
  347 + var len = (pnlName).split("_").length;
  348 + var windowviewid = (pnlName).split("_")[len - 1];
334 349 $scope.SetPICwindowStoreData(windowviewid, 'width', ui.size.width);
335 350 $scope.SetPICwindowStoreData(windowviewid, 'height', ui.size.height);
  351 + $scope.SetPICwindowStoreData(windowviewid, 'y', ui.position.top);
  352 + $scope.SetPICwindowStoreData(windowviewid, 'x', ui.position.left);
336 353 $rootScope.UnsaveCurriculum = true;
337 354 var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height();
338 355 $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5);
  356 + $rootScope.resetMenuOptionOnClick(pnlName);
339 357 }
340 358  
341 359 },
342 360 draggable: {
343 361 stop: function( event, ui ) {
344   - var len = (event.currentTarget.id).split("_").length;
345   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  362 + var pnlName=event.currentTarget.id;
  363 + var len = (pnlName).split("_").length;
  364 + var windowviewid = (pnlName).split("_")[len - 1];
346 365 $scope.SetPICwindowStoreData(windowviewid, 'y', ui.position.top);
347 366 $scope.SetPICwindowStoreData(windowviewid, 'x', ui.position.left);
348 367 $rootScope.UnsaveCurriculum = true;
  368 + $rootScope.resetMenuOptionOnClick(pnlName);
349 369 }
350 370 },
351 371  
... ... @@ -361,6 +381,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
361 381 else {
362 382 $scope.jsPanelPIC.normalize();
363 383 }
  384 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelPIC);
364 385  
365 386 // set false after initial call of min,max or normal
366 387 $scope.SetPICwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
... ... @@ -375,34 +396,38 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
375 396  
376 397 $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important')
377 398  
378   - if (!$rootScope.isCallFromOtherModule) {
379   - $('#PicView').css("height", $(window).outerHeight() - 65);
380   - $('#PicView').css("width", $(window).outerWidth() - 15);
381   - }
382   -
383 399 var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height();
384 400  
385 401 $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5);
386 402 var canvas = document.getElementById("canvasPIC_" + windowviewid);
387 403 var canvasPaint = document.getElementById("canvasPaintPIC_" + windowviewid);
388 404  
389   - canvas.height = canvasDIvHeight;
390   - canvasPaint.height = canvasDIvHeight
391 405 var $ua = navigator.userAgent;
392 406 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
393 407 canvas.width = screen.width-20;
394 408 canvasPaint.width = screen.width-20;
  409 + canvas.height = screen.height-130;
  410 + canvasPaint.height = screen.height-130;
395 411 }
396 412 else
397 413 {
  414 + canvas.height = screen.height-280;
  415 + canvasPaint.height = screen.height-280;
398 416 canvas.width = screen.width-40;
399 417 canvasPaint.width = screen.width-40;
  418 +
400 419 }
401 420  
402 421 var openedImage = document.getElementById('mypic_' + windowviewid );
403 422 openedImage.src = selectedpicture;
404 423 openedImage.onload = function () {
405 424 $scope.JsPanelclick(windowviewid);
  425 + //some time get big size image
  426 + if(this.height>780)
  427 + {
  428 + canvas.height = this.height;
  429 + canvasPaint.height = this.height;
  430 + }
406 431  
407 432 var annotationData= $scope.picOpenInOtherModules.annotationData;
408 433 // load annotation
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -354,7 +354,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
354 354 "windowTitle": moduleItemDataToBeSaved,
355 355 "scaleIndex":100,
356 356 "size": { height: 600, width: 900 },
357   - "position": { x: 300, y: 110 }
  357 + "position": { x: 1, y: 30 }
358 358 };
359 359  
360 360 window.parent.AIAModuleOpenResourceInfo(AAopenData);
... ... @@ -415,13 +415,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
415 415 var OpenItemImagePath = "../../../content/images/aa/images/" +OpenedTileData[3];
416 416 $scope.SetAAwindowStoreData(windowviewid,'OpenItemImagePath',OpenItemImagePath);
417 417 $rootScope.listArray.push({ "imageName": OpenItemImagePath, "text": moduleItemDataToBeSaved });
418   - $("#viewList").append("<div class='col-xs-12 text-center' style='padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:10px;background-color:#fff;'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:115px!important;' src=" + OpenItemImagePath + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + moduleItemDataToBeSaved + "</div></div></div><a id=" + moduleItemDataToBeSavedID + " style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>");
  418 + $("#viewList").append("<div class='col-xs-12 text-center' style='padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:10px;background-color:#fff;height:178px'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:115px!important;' src=" + OpenItemImagePath + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + moduleItemDataToBeSaved + "</div></div></div><a id=" + moduleItemDataToBeSavedID + " style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>");
419 419 }
420 420  
421 421 $rootScope.openAAModuleItemMain = function () {
422   - $scope.DisableUI();
423 422 if ($rootScope.isCallFromOtherModule) {
424 423 $scope.AAModuleData = ModuleService.getModuleData("ATLAS_ANATOMY");
  424 + if($scope.AAModuleData.length<1) return;
  425 + $scope.DisableUI();
425 426 $scope.readyToLoad=true;
426 427 $rootScope.AAWindowLoadComplete = false;
427 428 $scope.wincount=1;
... ... @@ -462,6 +463,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
462 463  
463 464 }
464 465 else {
  466 + $scope.DisableUI();
465 467 $scope.openModuleItem(null);
466 468 }
467 469 }
... ... @@ -587,7 +589,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
587 589 if (moduleName == ATLAS_ANATOMY) {
588 590  
589 591 jsContentURL = 'app/views/aa/atlas-anatomy-detail.html';
590   - // moduleItemViewDivId = 'aaDetailPageDiv';
591 592 $scope.jsPanelID = 'AAImagePanel' + '_' + windowviewid;
592 593 }
593 594 else if (moduleName == CLINICAL_ANIMATION) {
... ... @@ -608,13 +609,15 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
608 609 $scope.jsPanelHeight = 420;
609 610  
610 611 $scope.jsPanelLeft = $scope.aaOpenInOtherModules.position.x;
611   - if ($scope.aaOpenInOtherModules.position.x < 20)
612   - $scope.jsPanelLeft = 20;
  612 + if ($scope.aaOpenInOtherModules.position.x <= 1)
  613 + $scope.jsPanelLeft = 0;
613 614 $scope.jsPanelTop = $scope.aaOpenInOtherModules.position.y;
614   -
  615 + if ($scope.aaOpenInOtherModules.position.y < 30)
  616 + $scope.jsPanelTop = 30;
  617 +
615 618 if($location.url()!= "/curriculum-builder-detail") {
616   - $scope.jsPanelLeft = 1;
617   - $scope.jsPanelTop = $rootScope.cBModulejsPanelTop();
  619 + $scope.jsPanelLeft = 1;
  620 + $scope.jsPanelTop = 85;
618 621 }
619 622  
620 623 }
... ... @@ -622,7 +625,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
622 625 $scope.jsPanelWidth = $(window).outerWidth() - 20;
623 626 $scope.jsPanelHeight = $(window).outerHeight() - 140;
624 627 $scope.jsPanelLeft = 1;
625   - $scope.jsPanelTop = 70;
  628 + $scope.jsPanelTop = 55;
626 629 }
627 630  
628 631 //1. create a jsPanel and load the module item view
... ... @@ -648,6 +651,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
648 651 height: $scope.jsPanelHeight
649 652 },
650 653 onminimized:function (panel) {
  654 + var pnlName=panel[0].id;
  655 + var len = (pnlName).split("_").length;
  656 + var windowviewid = (pnlName).split("_")[len - 1];
651 657 var isAutoCalled = $scope.GetAAwindowStoreData(windowviewid, 'minmaxAutoEvent');
652 658 if(!isAutoCalled)
653 659 {
... ... @@ -657,6 +663,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
657 663 $scope.SetAAwindowStoreData(windowviewid, 'maximised',false);
658 664 },
659 665 onmaximized:function (panel) {
  666 + var pnlName=panel[0].id;
  667 + var len = (pnlName).split("_").length;
  668 + var windowviewid = (pnlName).split("_")[len - 1];
660 669 var isAutoCalled = $scope.GetAAwindowStoreData(windowviewid, 'minmaxAutoEvent');
661 670 if(!isAutoCalled)
662 671 {
... ... @@ -666,8 +675,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
666 675 $scope.SetAAwindowStoreData(windowviewid, 'minimised',false);
667 676 var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
668 677 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
  678 + $rootScope.resetMenuOptionOnClick(pnlName);
669 679 },
670 680 onnormalized:function (panel) {
  681 + var pnlName=panel[0].id;
  682 + var len = (pnlName).split("_").length;
  683 + var windowviewid = (pnlName).split("_")[len - 1];
671 684 var isAutoCalled = $scope.GetAAwindowStoreData(windowviewid, 'minmaxAutoEvent');
672 685 if(!isAutoCalled)
673 686 {
... ... @@ -677,26 +690,33 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
677 690 $scope.SetAAwindowStoreData(windowviewid, 'maximised',false);
678 691 var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
679 692 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
  693 + $rootScope.resetMenuOptionOnClick(pnlName);
680 694 },
681 695 resizable: {
682 696 stop: function (event, ui) {
683   - var len = (event.currentTarget.id).split("_").length;
684   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  697 + var pnlName=event.currentTarget.id;
  698 + var len = (pnlName).split("_").length;
  699 + var windowviewid = (pnlName).split("_")[len - 1];
685 700 $scope.SetAAwindowStoreData(windowviewid, 'width', ui.size.width);
686 701 $scope.SetAAwindowStoreData(windowviewid, 'height', ui.size.height);
  702 + $scope.SetAAwindowStoreData(windowviewid, 'y', ui.position.top);
  703 + $scope.SetAAwindowStoreData(windowviewid, 'x', ui.position.left);
687 704 $rootScope.UnsaveCurriculum = true;
688 705 var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
689 706 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
  707 + $rootScope.resetMenuOptionOnClick(pnlName);
690 708 }
691 709  
692 710 },
693 711 draggable: {
694 712 stop: function( event, ui ) {
695   - var len = (event.currentTarget.id).split("_").length;
696   - var windowviewid = (event.currentTarget.id).split("_")[len - 1];
  713 + var pnlName=event.currentTarget.id;
  714 + var len = (pnlName).split("_").length;
  715 + var windowviewid = (pnlName).split("_")[len - 1];
697 716 $scope.SetAAwindowStoreData(windowviewid, 'y', ui.position.top);
698 717 $scope.SetAAwindowStoreData(windowviewid, 'x', ui.position.left);
699 718 $rootScope.UnsaveCurriculum = true;
  719 + $rootScope.resetMenuOptionOnClick(pnlName);
700 720 }
701 721 },
702 722  
... ... @@ -718,6 +738,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
718 738 $scope.jsPanelAA.normalize('auto');
719 739 }
720 740  
  741 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelAA);
  742 +
721 743 // set false after initial call of min,max or normal
722 744 $scope.SetAAwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
723 745 $scope.SetAAwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
... ... @@ -763,13 +785,15 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
763 785 $scope.loadAAModule = function (windowviewid) {
764 786  
765 787 if (!$rootScope.isCallFromOtherModule) {
766   - $('#aaBodyView').css("height", $(window).outerHeight() - 65);
767   - $('#aaBodyView').css("width", $(window).outerWidth() - 15);
  788 + // $('#aaBodyView').css("height", $(window).outerHeight() - 65);
  789 + // $('#aaBodyView').css("width", $(window).outerWidth() - 15);
  790 + $('#aaBodyView').css("height", $(window).innerHeight()-100);
  791 + $('#aaBodyView').css("width",$(window).innerWidth()-100);
768 792 }
769 793  
770 794 var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50;
771 795 $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight);
772   - $('.canvasDivClass').css("height", canvasDIvHeight);
  796 + // $('.canvasDivClass').css("height", canvasDIvHeight);
773 797  
774 798 $scope.convertToZoomValue(windowviewid);
775 799  
... ... @@ -940,7 +964,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
940 964 }
941 965  
942 966 $scope.setControlsIDs = function (windowviewid) {
943   -
  967 +
  968 + $("#aaDetailPageDiv").attr("id", "aaDetailPageDiv_" + windowviewid);
944 969 $("#canvasDiv").attr("id", "canvasAADiv_" + windowviewid);
945 970 $("#canvas").attr("id", "canvasAA_" + windowviewid);
946 971 $("#canvasPaint").attr("id", "canvasPaintAA_" + windowviewid);
... ... @@ -1680,8 +1705,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1680 1705 }
1681 1706 else
1682 1707 {
1683   - $('#ListViewDiv').css({"height":"490","overflow":"scroll"});
1684   - $('#grid-view').css({"height":"720","overflow":"scroll"});
  1708 + $('#ListViewDiv').css({"height":"460","overflow":"scroll"});
  1709 + $('#grid-view').css({"height":"696","overflow":"scroll"});
1685 1710 }
1686 1711  
1687 1712 }
... ... @@ -3391,8 +3416,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
3391 3416  
3392 3417  
3393 3418 function refreshTermListOnSystemSel(bodySystemId) {
3394   -
3395   - var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  3419 + var windowviewid = (bodySystemId).split("_")[1];
  3420 + var rootScope = angular.element(document.getElementById("aaDetailPageDiv_"+windowviewid)).scope();
3396 3421 rootScope.$apply(function () {
3397 3422 rootScope.refreshTermListOnAASystemSelection(bodySystemId);
3398 3423 });
... ...
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... ... @@ -308,7 +308,7 @@ AIA.constant(&#39;Modules&#39;, [
308 308 Name: 'The Wellness Tools',
309 309 },
310 310 {
311   - Id: 1017, // Updated from 17 to 1017 to match with database Id
  311 + Id: 17,
312 312 Name: 'A.D.A.M. OnDemand',
313 313 },
314 314  
... ... @@ -539,15 +539,32 @@ AIA.constant(&quot;UserModules&quot;, [
539 539  
540 540  
541 541 AIA.constant("AIAConstants", {
  542 + "File_API_Not_Supported": "The file API isn't supported on this browser yet.",
  543 + "File_No_Content_Found": "File couldn't find the element.",
  544 + "Browser_Not_Supported": "This browser doesn't seem to support the `files` property of file inputs.",
  545 + "Select_File": "Please select a file before clicking 'Load'.",
  546 + "Image_File_Format_Not_Supported": "This image file not supported 'jpg/jpeg or png' format.\n Please try again.",
  547 + "Animation_File_Size_Exceeded": "This Animation video size not allow more than 50MB.\n Please try again.",
  548 + "Animation_File_Format_Not_Supported": "This Animation video not supported mp4 format.\n Please try again.",
  549 + "CB_Password_Empty": "Password field is empty. Please try again.",
  550 + "CB_Password_Not_Match": "Password is not matched. Please try again.",
  551 + "CB_Password_Required": "password required.",
  552 + "CB_Confirm_Password": "confirm password required.",
  553 + "CB_Confirm_Password_Not_Match": "confirm password not matched.",
  554 + "CB_Add_Slide_First": "Please add slide first to export this section.",
  555 + "CB_Curriculum_Name_Empty": "Curriculum name is empty!",
  556 + "NO_COURSE_FOUND": "NO COURSE FOUND",
  557 + "NO_COURSE_FOUND_MESSAGE": "No Selected A.D.A.M. courses found for this user account. Please contact ADAM.",
  558 +
542 559 "NO_BODY_SYSTEM_AVAILABLE": "Selected body system is not available on this layer.",
543 560 "COOKIES_MESSAGE": "You need to enable your browser's cookies to run this application.",
544 561 "SAVED_LAB_EXERCISE_NOT_FOUND": "Saved Lab Exercise not found.",
545 562 "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.",
546 563 "PLEASE_ENTER_SEARCH_TEXT": "Please enter the text to search.",
547 564 "SETTINGS_SAVED": "Your current settings has been saved.",
548   - "SETTING_SAVE_ERROR":"There is some error in saving your current settings. Please try after sometime.",
549   - "SAVE_ANIMATION_ERROR":"There is some error while saving your animation. Please try after sometime.",
550   - "CB_FILE_FORMAT_ISSUE":"This Curriculum file is not supported! Please try again.",
  565 + "SETTING_SAVE_ERROR":"There is some error in saving your current settings.\n Please try after sometime.",
  566 + "SAVE_ANIMATION_ERROR":"There is some error while saving your animation.\n Please try after sometime.",
  567 + "CB_FILE_FORMAT_ISSUE":"This Curriculum file is not supported. Please try again.",
551 568 "CONVERT_CB_OLD_TO_NEW_ISSUE":"The system detected some legacy functionality in the selected curriculum that cannot be fully converted to the new format (.json). Please consider recreating the curriculum using the newer version of the curriculum builder, or contact ADAM.\nDo you want to proceed with the conversion?",
552 569 "OPEN_CB_OLD_TO_NEW_ISSUE":"The selected curriculum is in a legacy format. The system detected some legacy functionality in the curriculum that cannot be completely converted to the new format (.json), and it may not work correctly. Please consider recreating the curriculum using the newer version of the curriculum builder, or contact ADAM.\nDo you want to continue to open the curriculum?",
553 570 "IMPORT_CB_OLD_TO_NEW_ISSUE":"The selected curriculum is in a legacy format. The system detected some legacy functionality in the curriculum that cannot be completely converted to the new format (.json), and it may not work correctly. Please consider recreating the curriculum using the newer version of the curriculum builder, or contact ADAM.\nDo you want to continue to import the curriculum?",
... ...
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
... ... @@ -16,7 +16,7 @@
16 16 deferred.reject(data);
17 17 $rootScope.isVisibleLogin = true;
18 18 $rootScope.LoginEnableUI();
19   - $rootScope.errorMessage = data;
  19 + $('#errorMessage').text(data);
20 20 $("#messageModal").modal('show');
21 21  
22 22 });
... ... @@ -37,7 +37,7 @@
37 37 }).error(function (data, status, headers, config) {
38 38 console.log('error')
39 39 deferred.reject(data);
40   - $rootScope.errorMessage = data;
  40 + $('#errorMessage').text( data);
41 41 $("#messageModal").modal('show');
42 42  
43 43 });
... ... @@ -59,7 +59,7 @@
59 59 $rootScope.isVisibleLogin = true;
60 60 $rootScope.LoginEnableUI();
61 61 deferred.reject(data);
62   - $rootScope.errorMessage = data;
  62 + $('#errorMessage').text(data);
63 63 $("#messageModal").modal('show');
64 64  
65 65 });
... ... @@ -80,9 +80,7 @@
80 80 }).error(function (data, status, headers, config) {
81 81 console.log('error')
82 82 deferred.reject(data);
83   - // $rootScope.errorMessage = data;
84   - // $("#messageModal").modal('show');
85   -
  83 +
86 84 });
87 85 return deferred.promise;
88 86 },
... ... @@ -105,7 +103,7 @@
105 103 $('#modal-settings').css("display", "none");
106 104 $('#modelsettingsbackground').css('zIndex', '12000000');
107 105 $("#modelsettingsbackground").css("display", "none");
108   - $rootScope.errorMessage = data;
  106 + $('#errorMessage').text(data);
109 107 $("#messageModal").modal('show');
110 108  
111 109 });
... ... @@ -133,6 +131,28 @@
133 131 return deferred.promise;
134 132 },
135 133  
  134 + GetAodCoursesList: function (licenseId) {
  135 + var deferred = $q.defer();
  136 +
  137 + $http({
  138 + url: "/API/api/GetAodCoursesList",
  139 + method: "GET",
  140 + params: { LicenseId: licenseId }
  141 + })
  142 +
  143 + .success(function (data, status, headers, config) {
  144 + deferred.resolve(data);
  145 + }).error(function (data, status, headers, config) {
  146 + console.log('error')
  147 + deferred.reject(data);
  148 + $rootScope.isVisibleLogin = true;
  149 + $('#errorMessage').text(data);
  150 + $("#messageModal").modal('show');
  151 +
  152 + });
  153 + return deferred.promise;
  154 + },
  155 +
136 156 validateClientSite: function (clientInfo) {
137 157 var deferred = $q.defer();
138 158  
... ... @@ -149,7 +169,7 @@
149 169 deferred.reject(data);
150 170 $rootScope.isVisibleLogin = true;
151 171 $rootScope.LoginEnableUI();
152   - $rootScope.errorMessage = data;
  172 + $('#errorMessage').text(data);
153 173 $("#messageModal").modal('show');
154 174  
155 175 });
... ... @@ -173,7 +193,7 @@
173 193 deferred.reject(data);
174 194  
175 195 $rootScope.isVisibleLogin = true;
176   - $rootScope.errorMessage = data;
  196 + $('#errorMessage').text(data);
177 197 $("#messageModal").modal('show');
178 198 });
179 199 return deferred.promise;
... ... @@ -195,7 +215,7 @@
195 215 deferred.reject(data);
196 216  
197 217 $rootScope.isVisibleLogin = true;
198   - $rootScope.errorMessage = data;
  218 + $('#errorMessage').text(data);
199 219 $("#messageModal").modal('show');
200 220 });
201 221 return deferred.promise;
... ... @@ -217,7 +237,7 @@
217 237 deferred.reject(data);
218 238  
219 239 $rootScope.isVisibleLogin = true;
220   - $rootScope.errorMessage = data;
  240 + $('#errorMessage').text(data);
221 241 $("#messageModal").modal('show');
222 242 });
223 243 return deferred.promise;
... ... @@ -239,7 +259,7 @@
239 259 deferred.reject(data);
240 260  
241 261 $rootScope.isVisibleLogin = true;
242   - $rootScope.errorMessage = data;
  262 + $('#errorMessage').text(data);
243 263 $("#messageModal").modal('show');
244 264 });
245 265 return deferred.promise;
... ...
400-SOURCECODE/AIAHTML5.Web/app/services/LabExerciseService.js
... ... @@ -19,7 +19,7 @@
19 19 console.log('error')
20 20 deferred.reject(data);
21 21 $rootScope.isVisibleLogin = true;
22   - $rootScope.errorMessage = data;
  22 + $('#errorMessage').text(data);
23 23 $("#messageModal").modal('show');
24 24  
25 25 });
... ... @@ -43,7 +43,7 @@
43 43 console.log('error')
44 44 deferred.reject(data);
45 45 $rootScope.isVisibleLogin = true;
46   - $rootScope.errorMessage = data;
  46 + $('#errorMessage').text(data);
47 47 $("#messageModal").modal('show');
48 48  
49 49 });
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/3dA/3d-anatomy-details.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="Open3DModelBodyMain()" id="ThreeDView" class="threeDView" ng-controller="3dAController"></div>
4   -</div>
5 4 \ No newline at end of file
  5 +</div>
  6 +<div id="tdparentcustomDiv"></div>
6 7 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-detail.html
... ... @@ -12,7 +12,7 @@
12 12 width: 300px;
13 13 padding-top: 0px;
14 14 background: #222;
15   - padding-top: 20px;
  15 + padding-top: 10px;
16 16 position: absolute !important;
17 17 left: 0;
18 18 }
... ... @@ -51,7 +51,7 @@
51 51 <div ng-include="aap/widget/MainMenu.html"></div>
52 52 <div class=" " id="CBDetailPageDiv" ng-controller="CurrBuildController">
53 53 <div class="pos-relative leftToolBar CBLeft-Sidebar pull-left">
54   - <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;left:285px"></div>
  54 + <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;left:285px" onclick="cbTreeToggleClick()"></div>
55 55 <div class="col-xs-12">
56 56 <div id="sidebar-wrapper" class="sidebar-lft">
57 57 <div class="row">
... ... @@ -114,7 +114,7 @@
114 114 </div>
115 115  
116 116 <div class="CB-JS-Panel">
117   - <div id="cbdivarea" class="col-sm-12 stickey-area" style="overflow:scroll;margin-top:20px;background-color: #afacac;">
  117 + <div id="cbdivarea" class="col-sm-12 stickey-area" style="overflow:scroll;margin-top:10px;background-color: #afacac;">
118 118 <div ng-init="openCBJsPanel()" id="CBPanelDiv" class="CBBodyView"></div>
119 119 <div id="cbparentcustomDiv"></div>
120 120 <div id="cbModelDeleteBackground"></div>
... ... @@ -373,6 +373,10 @@
373 373 });
374 374 });
375 375  
  376 + function cbTreeToggleClick() {
  377 + angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope().cbTreeToggleClick();
  378 + }
  379 +
376 380 </script>
377 381 <script>
378 382 function removeSpaces(string)
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/Home/printPreview.html
... ... @@ -42,8 +42,8 @@
42 42 <span class="pull-right font12 span-font" id="spnBodyViewTitlePor"></span>
43 43 </div>
44 44 </div>
45   - <div class=" mar-top-25" align="center" id="dvPortrait" style="text-align: center;">
46   - <img src="" alt="" class="logo-image img-responsive" id="imgPortrait" style="width: 90%; " />
  45 + <div class=" mar-top-25" id="dvPortrait" align="center">
  46 + <img src="" alt="" class="logo-image img-responsive" id="imgPortrait" style="width: 100%; " />
47 47 </div>
48 48 <div>
49 49 <div class="pp-col-sm-4" style="position: absolute; bottom: 20px;">
... ... @@ -67,7 +67,7 @@
67 67 <span class="pull-right font12 span-font" id="spnBodyViewTitleLan"></span>
68 68 </div>
69 69 </div>
70   - <div class="" id="dvLandscape" align="center">
  70 + <div class="" id="dvLandscape" align="center" style="left: 50%;-ms-transform: translateX(-50%);transform: translateX(-50%);">
71 71 <img src="" alt="" class="logo-image img-responsive" id="imgLandscape" style="width: 100%;" />
72 72 </div>
73 73 <div class="print-footer-land">
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercise-view.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="InitializeLabExerciseMain()" id="labBodyview" class="labBodyView" ng-controller="LabExercController"></div>
4   -</div>
5 4 \ No newline at end of file
  5 +</div>
  6 +<div id="labparentcustomDiv"></div>
6 7 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/MyAnimation/MyAnimation.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="OpenMyAnimationViewMain()" id="VideoView" class="videoView" ng-controller="MyAnimationController" style=" "></div> <!--position: absolute !important;-->
4   - <style>
5   - .jsPanel-content.jsPanel-theme-success {
6   - overflow-y: auto !important;
7   - }
8   - </style>
9 4 </div>
10 5 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/MyPicture/MyPicture.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="OpenMyPictureViewMain()" id="PicView" class="picView" ng-controller="MyPictureController" style=" "></div> <!--position: absolute !important;-->
4   - <style>
5   - .jsPanel-content.jsPanel-theme-success {
6   - overflow-y: auto !important;
7   - }
8   - </style>
9 4 </div>
10 5 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... ... @@ -144,7 +144,7 @@
144 144 <div class="container-fluid">
145 145 <div class="row">
146 146  
147   - <div class="img-thumbnail canvasDivClass" id="canvasDiv" style="overflow: scroll;width:100%;position:relative">
  147 + <div class="img-thumbnail" id="canvasDiv" style="overflow: scroll;width:100%;position:relative">
148 148 <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="1024" class="canvas-annotationStyle1"></canvas>
149 149 <canvas id="canvas" width="2277" height="1024" class="canvas-annotationStyle"></canvas>
150 150  
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/module-item-view.html
1 1 ๏ปฟ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="openAAModuleItemMain()" id="aaBodyView" class="aaBodyView" ng-controller="TileViewListController"></div>
4   - <!--<div >
5   -
6   - </div>-->
7 4 </div>
  5 +<div id="aaparentcustomDiv"></div>
8 6 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/tile-view.html
... ... @@ -114,7 +114,7 @@
114 114 </table>
115 115 </div>
116 116 <!--</div>-->
117   - <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;">
  117 + <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;height:174px">
118 118 <div class="row well">
119 119 <div title="{{SelectedAATitle}}" class="col-sm-3 col-lg-2 no-padding">
120 120 <div class="thumbnail no-margin">
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ai/adam-images-detail.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="OpenAdamImageViewMain()" id="AIView" class="aiView" ng-controller="AIController" style=" "></div> <!--position: absolute !important;-->
4   - <style>
5   - .jsPanel-content.jsPanel-theme-success {
6   - overflow-y: auto !important;
7   - }
8   - </style>
9 4 </div>
  5 +<div id="aiparentcustomDiv"></div>
10 6 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html
... ... @@ -81,7 +81,7 @@
81 81 </tbody>
82 82 </table>
83 83 </div>
84   - <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;">
  84 + <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;height:174px">
85 85 <div class="row well" style="margin-bottom: 0px;">
86 86 <div title="{{SelectedAITitle}}" class="col-sm-3 col-lg-2 no-padding">
87 87 <div class="thumbnail no-margin">
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
... ... @@ -105,7 +105,7 @@
105 105 </tbody>
106 106 </table>
107 107 </div>
108   - <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;">
  108 + <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;height:174px">
109 109 <div class="row well" style="margin-bottom: 0px;">
110 110 <div title="{{SelectedCATitle}}" class="col-sm-3 col-lg-2 no-padding">
111 111 <div class="thumbnail no-margin">
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ca/clinical-animations-detail.html
... ... @@ -2,3 +2,4 @@
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="openCABodyViewMain()" id="CAView" class="caView" ng-controller="CAController"></div>
4 4 </div>
  5 +<div id="caparentcustomDiv"></div>
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
... ... @@ -131,7 +131,7 @@
131 131 </table>
132 132 </div>
133 133  
134   - <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;">
  134 + <div class="col-xs-12 text-center" ng-show="hiderow" style="padding-left:25px;height:174px">
135 135 <div class="row well" style="margin-bottom: 0px;">
136 136 <div title="{{SelectedCITitle}}" class="col-sm-3 col-lg-2 no-padding">
137 137 <div class="thumbnail no-margin">
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/ci/clinical-illustrations-detail.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3   - <div ng-init="openCIBodyViewMain()" id="CIView" class="ciView" ng-controller="CIController" style=" "></div> <!--position: absolute !important;-->
4   -
5   -
  3 + <div ng-init="openCIBodyViewMain()" id="CIView" class="ciView" ng-controller="CIController" style=" "></div> <!--position: absolute !important;-->
6 4 </div>
  5 +<div id="ciparentcustomDiv"></div>
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-body-view.html
1 1 ๏ปฟ<div>
2 2 <div ng-include="aap/widget/MainMenu.html"></div>
3 3 <div ng-init="openDABodyViewMain()" id="daBodyview" class="daBodyView" ng-controller="DAController"></div>
4   - <!--<div >
5   -
6   - </div>-->
7   -</div>
8 4 \ No newline at end of file
  5 +</div>
  6 +<div id="daparentcustomDiv"></div>
9 7 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -20,6 +20,12 @@
20 20 <li id="printAVAnchor"><a href="" data-toggle="modal" ng-click="ShowPrintWindow()">Print Active Viewer</a></li>
21 21 <li id="printAllAVAnchor"><a href="#" data-toggle="modal" ng-click="ShowAllPrintWindow()">Print All Open Viewers</a></li>
22 22 <li id="printPreviewAnchor"><a href="" data-toggle="modal" ng-click="ShowPrintPreviewWindow()">Print Preview</a></li>
  23 + <li id="arragePannel"><a href="#" role="button" aria-haspopup="true" aria-expanded="false" > Arrange Window <span class="caret"></span></a>
  24 + <ul class="dropdown-content">
  25 + <li><a href="#" ng-click="arrangeCascadePanel()">Cascade View</a></li>
  26 + <li><a href="#" ng-click="arrangeTiledPanel()">Tiled View</a></li>
  27 + </ul>
  28 + </li>
23 29 </ul>
24 30 </li>
25 31 <!--#7904-->
... ...
400-SOURCECODE/AIAHTML5.Web/index.aspx
... ... @@ -1377,7 +1377,8 @@
1377 1377 </div>
1378 1378 <div class="modal-body" style=" height: 160px; overflow-x: auto;">
1379 1379 <div class="panel-body">
1380   - <div style="font-size: 15px;float: left;text-align: left;" data-ng-bind="errorMessage"></div>
  1380 + <div id="errorMessage" style="font-size: 15px;float: left;text-align: left;white-space: pre-wrap;">
  1381 + </div>
1381 1382 </div>
1382 1383 </div>
1383 1384 <div class="modal-footer ui-draggable-handle" style="background-color: #f1e8e8;">
... ...
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js
... ... @@ -859,11 +859,11 @@ var jsPanel = {
859 859 var currentController = panel.option.currentController;
860 860 if (pathname == "/curriculum-builder-detail")
861 861 {
862   - var ht=$("#cbdivarea").height()-100;
863   - var wt= $("#cbdivarea").width();
  862 + var ht=$("#cbdivarea").height()-15;
  863 + var wt= $("#cbdivarea").width()+8;
864 864 panel.css({
865   - top: parseInt(80),
866   - left:parseInt(10),
  865 + top:0,// parseInt(30),
  866 + left:0,//parseInt(1),
867 867 width: wt,
868 868 height:ht,
869 869 });
... ... @@ -872,19 +872,15 @@ var jsPanel = {
872 872 }
873 873 else
874 874 {
875   - //disable resize and drag on full screen
876   - // panel.resizable({ disabled: true });
877   - // panel.draggable({ disabled: true });
878   - //maximize
879   - var screenWidth =screen.width-20;
880   - var screenHeight =screen.height<1024 ?screen.height-80:screen.height-230;
881   - var ht=$(window).outerHeight()-10 - parseInt(panel.option.maximizedMargin.top) - parseInt(panel.option.maximizedMargin.bottom) - 65;
882   - var wt=$(window).outerWidth()-10 - parseInt(panel.option.maximizedMargin.left) - parseInt(panel.option.maximizedMargin.right);
  875 + var ht=$(window).outerHeight()-10 - parseInt(panel.option.maximizedMargin.top) - parseInt(panel.option.maximizedMargin.bottom) - 43;
  876 + var wt=$(window).outerWidth() - parseInt(panel.option.maximizedMargin.left) - parseInt(panel.option.maximizedMargin.right)+1;
883 877 panel.css({
884   - top: parseInt(70),//panel.option.maximizedMargin.top),
885   - left:parseInt(panel.option.maximizedMargin.left),
886   - width: currentController == 'CAController' ? screenWidth: currentController == '3dAController' ? screenWidth: wt,
887   - height:currentController == '3dAController' ? screenHeight: ht,
  878 + top: parseInt(55),//panel.option.maximizedMargin.top),
  879 + left:parseInt(1),//panel.option.maximizedMargin.left
  880 + width: wt,
  881 + height: ht,
  882 + // width: currentController == 'CAController' ? screenWidth: currentController == '3dAController' ? screenWidth: wt,
  883 + // height:currentController == '3dAController' ? screenHeight: ht,
888 884 });
889 885  
890 886  
... ... @@ -992,7 +988,17 @@ var jsPanel = {
992 988 var pathname = window.location.pathname;
993 989 if (pathname == "/curriculum-builder-detail")
994 990 {
995   - $('body').append('<div id="jsPanel-min-container" style="left:300px"></div>');
  991 + // reset minimize panel while tree toggle click
  992 +
  993 + if($('div.CBLeft-Sidebar').hasClass('active'))
  994 + {
  995 + $('body').append('<div id="jsPanel-min-container" style="left:15px"></div>');
  996 + }
  997 + else
  998 + {
  999 + $('body').append('<div id="jsPanel-min-container" style="left:300px"></div>');
  1000 + }
  1001 +
996 1002 }
997 1003 else
998 1004 {
... ... @@ -1056,7 +1062,7 @@ var jsPanel = {
1056 1062 else
1057 1063 {
1058 1064 var ht=$(window).outerHeight()-panel.option.size.height<200?$(window).outerHeight()-200:panel.option.size.height;
1059   - var wt=screen.width<1025?screen.width-100:$(window).innerWidth()-panel.option.size.width<300?$(window).innerWidth()-300:panel.option.size.width;
  1065 + var wt=screen.width<1025?screen.width-100:$(window).innerWidth()-panel.option.size.width<600?$(window).innerWidth()-600:panel.option.size.width;
1060 1066 panel.css({
1061 1067 width: wt,
1062 1068 height:ht,
... ... @@ -1226,7 +1232,7 @@ var jsPanel = {
1226 1232 }
1227 1233 });
1228 1234 // reposition minimized panels
1229   - this.reposMinimized(jsPanel.widthForMinimized);
  1235 + // this.reposMinimized(jsPanel.widthForMinimized);
1230 1236 },
1231 1237  
1232 1238 // rewrite option.paneltype strings to objects and set defaults for option.paneltype
... ...
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... ... @@ -1453,8 +1453,24 @@ footer .browserIcons
1453 1453  
1454 1454 filter: Alpha(opacity=50); /* IE8 and earlier */
1455 1455 }
  1456 +#arragePannel:hover > .dropdown-content {
  1457 + display: block;
  1458 + }
  1459 + .dropdown-content {
  1460 + display: none;
  1461 + min-width: 160px;
  1462 + color:black;
  1463 + }
  1464 +.dropdown-content a {
  1465 + padding: 3px 0px;
  1466 + text-decoration: none;
  1467 + display: block;
  1468 + color:black;
  1469 + }
  1470 + .dropdown-content a:hover {
  1471 + background-color: #0095da;
  1472 + }
1456 1473  
1457   -
1458 1474 #cbModelRenameId
1459 1475 {
1460 1476 display:none;
... ...
400-SOURCECODE/Admin/package-lock.json
... ... @@ -507,6 +507,15 @@
507 507 "moment": "^2.19.3"
508 508 }
509 509 },
  510 + "angular2-multiselect-checkbox-dropdown": {
  511 + "version": "1.4.0",
  512 + "resolved": "https://registry.npmjs.org/angular2-multiselect-checkbox-dropdown/-/angular2-multiselect-checkbox-dropdown-1.4.0.tgz",
  513 + "integrity": "sha1-eN+iYuqAPvx9x/ctRmRdcCs59Is=",
  514 + "requires": {
  515 + "bootstrap": "*",
  516 + "font-awesome": "*"
  517 + }
  518 + },
510 519 "angular4-slimscroll": {
511 520 "version": "1.0.5",
512 521 "resolved": "https://registry.npmjs.org/angular4-slimscroll/-/angular4-slimscroll-1.0.5.tgz",
... ... @@ -3855,6 +3864,11 @@
3855 3864 }
3856 3865 }
3857 3866 },
  3867 + "font-awesome": {
  3868 + "version": "4.7.0",
  3869 + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz",
  3870 + "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM="
  3871 + },
3858 3872 "for-in": {
3859 3873 "version": "1.0.2",
3860 3874 "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
... ...
400-SOURCECODE/Admin/package.json
... ... @@ -30,6 +30,7 @@
30 30 "@types/node": "^6.0.102",
31 31 "angular2-json2csv": "^1.1.2",
32 32 "angular2-moment": "^1.9.0",
  33 + "angular2-multiselect-checkbox-dropdown": "^1.4.0",
33 34 "angular4-slimscroll": "^1.0.5",
34 35 "bootstrap": "^3.1.1",
35 36 "chosen-js": "^1.8.7",
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/README.md 0 โ†’ 100644
  1 +# Angular2 Multiselect Dropdown
  2 +[![npm version](https://img.shields.io/npm/v/angular2-multiselect-dropdown.svg)](https://www.npmjs.com/package/angular2-multiselect-dropdown)
  3 +
  4 +Angular 2 multiselect dropdown component for web applications. Easy to integrate and use.
  5 +
  6 +
  7 +# [Documentation](http://cuppalabs.github.io/components/multiselectDropdown) | [Demo](https://cuppalabs.github.io/angular2-multiselect-dropdown).
  8 +
  9 +## Getting Started
  10 +### Installation
  11 +- The Mutiselect Dropdown package is published on the [npm](https://www.npmjs.com/package/angular2-multiselect-dropdown) Registry.
  12 +- Install the package :
  13 + `npm install angular2-multiselect-checkbox-dropdown`
  14 +
  15 +- Once installed import `AngularMultiSelectModule` from the installed package into your module as follows:
  16 +
  17 +### Usage
  18 +Import `AngularMultiSelectModule` into `NgModule` in `app.module.ts`
  19 +```js
  20 +import { AngularMultiSelectModule } from 'angular2-multiselect-checkbox-dropdown/angular2-multiselect-dropdown';
  21 +
  22 +@NgModule({
  23 + // ...
  24 + imports: [
  25 + AngularMultiSelectModule,
  26 + ]
  27 + // ...
  28 +})
  29 +
  30 +```
  31 +
  32 +Declare the component data variables and options in your component where you want to consume the dropdown component.
  33 +
  34 +```js
  35 +
  36 +import { Component, OnInit } from '@angular/core';
  37 +
  38 +export class AppComponent implements OnInit {
  39 + dropdownList = [];
  40 + selectedItems = [];
  41 + dropdownSettings = {};
  42 + ngOnInit(){
  43 + this.dropdownList = [
  44 + {"id":1,"itemName":"India"},
  45 + {"id":2,"itemName":"Singapore"},
  46 + {"id":3,"itemName":"Australia"},
  47 + {"id":4,"itemName":"Canada"},
  48 + {"id":5,"itemName":"South Korea"},
  49 + {"id":6,"itemName":"Germany"},
  50 + {"id":7,"itemName":"France"},
  51 + {"id":8,"itemName":"Russia"},
  52 + {"id":9,"itemName":"Italy"},
  53 + {"id":10,"itemName":"Sweden"}
  54 + ];
  55 + this.selectedItems = [
  56 + {"id":2,"itemName":"Singapore"},
  57 + {"id":3,"itemName":"Australia"},
  58 + {"id":4,"itemName":"Canada"},
  59 + {"id":5,"itemName":"South Korea"}
  60 + ];
  61 + this.dropdownSettings = {
  62 + singleSelection: false,
  63 + text:"Select Countries",
  64 + selectAllText:'Select All',
  65 + unSelectAllText:'UnSelect All',
  66 + enableSearchFilter: true,
  67 + classes:"myclass custom-class"
  68 + };
  69 + }
  70 + onItemSelect(item:any){
  71 + console.log(item);
  72 + console.log(this.selectedItems2);
  73 + }
  74 + OnItemDeSelect(item:any){
  75 + console.log(item);
  76 + console.log(this.selectedItems2);
  77 + }
  78 + onSelectAll(items: any){
  79 + console.log(items);
  80 + }
  81 + onDeSelectAll(items: any){
  82 + console.log(items);
  83 + }
  84 +}
  85 +```
  86 +
  87 +Add the following component tag in you template
  88 +```html
  89 +<angular2-multiselect [data]="dropdownList" [(ngModel)]="selectedItems"
  90 + [settings]="dropdownSettings"
  91 + (onSelect)="onItemSelect($event)"
  92 + (onDeSelect)="OnItemDeSelect($event)"
  93 + [selectedItems]="selectedItems"
  94 + (onSelectAll)="onSelectAll($event)"
  95 + (onDeSelectAll)="onDeSelectAll($event)"></angular2-multiselect>
  96 +
  97 +```
  98 +
  99 +### Settings
  100 +The following list of settings are supported by the component. Configure the settings to meet your requirement.
  101 +
  102 +| Setting |Type | Description | Default Value |
  103 +|:--- |:--- |:--- |:--- |
  104 +| singleSelection | Boolean | To set the dropdown for single item selection only. | false |
  105 +| text | String | Text to be show in the dropdown, when no items are selected. | 'Select' |
  106 +| enableCheckAll | Boolean | Enable the option to select all items in list | false |
  107 +| selectAllText | String | Text to display as the label of select all option | Select All |
  108 +| unSelectAllText | String | Text to display as the label of unSelect option | UnSelect All |
  109 +| enableSearchFilter | Boolean | Enable filter option for the list. | false |
  110 +| maxHeight | Number | Set maximum height of the dropdown list in px. | 300 |
  111 +| badgeShowLimit | Number | Limit the number of badges/items to show in the input field. If not set will show all selected. | All |
  112 +| classes | String | Custom classes to the dropdown component. Classes are added to the dropdown selector tag. To add multiple classes, the value should be space separated class names.| '' |
  113 +| limitSelection | Number | Limit the selection of number of items from the dropdown list. Once the limit is reached, all unselected items gets disabled. | none |
  114 +
  115 +### Callback Methods
  116 +- `onSelect` - Return the selected item on selection.
  117 + Example : (onSelect)="onItemSelect($event)"
  118 +- `onDeSelect` - Return the un-selected item on un-selecting.
  119 + Example : (onDeSelect)="OnItemDeSelect($event)"
  120 +- `onSelectAll` - Return the list of all selected items.
  121 + Example : (onSelectAll)="onSelectAll($event)"
  122 +- `onDeSelectAll` - Returns an empty array.
  123 + Example : (onDeSelectAll)="onDeSelectAll($event)"
  124 +
  125 +
  126 +## Run locally
  127 +- Clone the repository or downlod the .zip,.tar files.
  128 +- Run `npm install`
  129 +- Run `ng serve` for a dev server
  130 +- Navigate to `http://localhost:4200/`
  131 + The app will automatically reload if you change any of the source files.
  132 +
  133 +## License
  134 +MIT License.
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/angular2-multiselect-dropdown.ts 0 โ†’ 100644
  1 +export * from './src/app/angular2-multiselect-dropdown/multiselect.component';
0 2 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/package.json 0 โ†’ 100644
  1 +{
  2 + "_args": [
  3 + [
  4 + {
  5 + "raw": "angular2-multiselect-checkbox-dropdown",
  6 + "scope": null,
  7 + "escapedName": "angular2-multiselect-checkbox-dropdown",
  8 + "name": "angular2-multiselect-checkbox-dropdown",
  9 + "rawSpec": "",
  10 + "spec": "latest",
  11 + "type": "tag"
  12 + },
  13 + "D:\\tamil\\angular-projects\\Angular2-AdminLTE-master"
  14 + ]
  15 + ],
  16 + "_from": "angular2-multiselect-checkbox-dropdown@1.4.0",
  17 + "_id": "angular2-multiselect-checkbox-dropdown@1.4.0",
  18 + "_inBundle": false,
  19 + "_inCache": true,
  20 + "_integrity": "sha1-eN+iYuqAPvx9x/ctRmRdcCs59Is=",
  21 + "_location": "/angular2-multiselect-checkbox-dropdown",
  22 + "_nodeVersion": "6.10.3",
  23 + "_npmUser": {
  24 + "name": "tamilzh",
  25 + "email": "tamilzhchelvan@gmail.com"
  26 + },
  27 + "_npmVersion": "3.10.10",
  28 + "_phantomChildren": {},
  29 + "_requested": {
  30 + "type": "version",
  31 + "registry": true,
  32 + "raw": "angular2-multiselect-checkbox-dropdown@1.4.0",
  33 + "name": "angular2-multiselect-checkbox-dropdown",
  34 + "escapedName": "angular2-multiselect-checkbox-dropdown",
  35 + "rawSpec": "1.4.0",
  36 + "saveSpec": null,
  37 + "fetchSpec": "1.4.0"
  38 + },
  39 + "_requiredBy": [
  40 + "#USER",
  41 + "/"
  42 + ],
  43 + "_resolved": "https://registry.npmjs.org/angular2-multiselect-checkbox-dropdown/-/angular2-multiselect-checkbox-dropdown-1.4.0.tgz",
  44 + "_shasum": "78dfa262ea803efc7dc7f72d46645d702b39f48b",
  45 + "_shrinkwrap": null,
  46 + "_spec": "angular2-multiselect-checkbox-dropdown@1.4.0",
  47 + "_where": "F:\\AIAProject\\400-SOURCECODE\\Admin",
  48 + "angular-cli": {},
  49 + "bundleDependencies": false,
  50 + "dependencies": {
  51 + "bootstrap": "*",
  52 + "font-awesome": "*"
  53 + },
  54 + "deprecated": false,
  55 + "description": "[![npm version](https://img.shields.io/npm/v/angular2-multiselect-dropdown.svg)](https://www.npmjs.com/package/angular2-multiselect-dropdown)",
  56 + "devDependencies": {},
  57 + "directories": {},
  58 + "dist": {
  59 + "shasum": "346520b7512dc677da738bfcc7249045c2e0efde",
  60 + "tarball": "https://registry.npmjs.org/angular2-multiselect-checkbox-dropdown/-/angular2-multiselect-checkbox-dropdown-1.0.0.tgz"
  61 + },
  62 + "license": "MIT",
  63 + "maintainers": [
  64 + {
  65 + "name": "tamilzh",
  66 + "email": "tamilzhchelvan@gmail.com"
  67 + }
  68 + ],
  69 + "name": "angular2-multiselect-checkbox-dropdown",
  70 + "optionalDependencies": {},
  71 + "private": false,
  72 + "scripts": {
  73 + "e2e": "ng e2e",
  74 + "lint": "ng lint",
  75 + "ng": "ng",
  76 + "start": "ng serve",
  77 + "test": "ng test"
  78 + },
  79 + "version": "1.4.0"
  80 +}
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/src/app/angular2-multiselect-dropdown/clickOutside.ts 0 โ†’ 100644
  1 +import {Directive, ElementRef, Output, EventEmitter, HostListener} from '@angular/core';
  2 +
  3 +@Directive({
  4 + selector: '[clickOutside]'
  5 +})
  6 +export class ClickOutsideDirective {
  7 + constructor(private _elementRef: ElementRef) {
  8 + }
  9 +
  10 + @Output()
  11 + public clickOutside = new EventEmitter<MouseEvent>();
  12 +
  13 + @HostListener('document:click', ['$event', '$event.target'])
  14 + public onClick(event: MouseEvent, targetElement: HTMLElement): void {
  15 + if (!targetElement) {
  16 + return;
  17 + }
  18 +
  19 + const clickedInside = this._elementRef.nativeElement.contains(targetElement);
  20 + if (!clickedInside) {
  21 + this.clickOutside.emit(event);
  22 + }
  23 + }
  24 +}
0 25 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/src/app/angular2-multiselect-dropdown/list-filter.ts 0 โ†’ 100644
  1 +import { Pipe, PipeTransform } from '@angular/core';
  2 +
  3 +import { ListItem } from './multiselect.model';
  4 +
  5 +@Pipe({
  6 + name: 'listFilter',
  7 + pure: false
  8 +})
  9 +export class ListFilterPipe implements PipeTransform {
  10 + transform(items: ListItem[], filter: ListItem): ListItem[] {
  11 + if (!items || !filter) {
  12 + return items;
  13 + }
  14 + // filter items array, items which match and return true will be kept, false will be filtered out
  15 + return items.filter((item: ListItem) => this.applyFilter(item, filter));
  16 + }
  17 +
  18 + /**
  19 + * Perform the filtering.
  20 + *
  21 + * @param {Book} book The book to compare to the filter.
  22 + * @param {Book} filter The filter to apply.
  23 + * @return {boolean} True if book satisfies filters, false if not.
  24 + */
  25 + applyFilter(item: ListItem, filter: ListItem): boolean {
  26 + if (filter.itemName && item.itemName.toLowerCase().indexOf(filter.itemName.toLowerCase()) === -1) {
  27 + return false;
  28 + }
  29 + return true;
  30 + }
  31 +}
0 32 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/src/app/angular2-multiselect-dropdown/multiselect.component.html 0 โ†’ 100644
  1 +<div class="cuppa-dropdown" (clickOutside)="closeDropdown()">
  2 + <div class="selected-list">
  3 + <button class="c-btn" (click)="toggleDropdown()">
  4 + <span style="font-weight:bold">{{settings.text}}</span>
  5 + <!-- <span *ngIf="selectedItems.length == 0">{{settings.text}}</span> -->
  6 + <!-- <span *ngIf="settings.singleSelection"> -->
  7 + <!-- <span *ngFor="let item of selectedItems;trackBy: trackByFn;"> -->
  8 + <!-- {{item.itemName}} -->
  9 + <!-- </span> -->
  10 + <!-- </span> -->
  11 + <!-- <div class="c-list" *ngIf="selectedItems.length > 0 && !settings.singleSelection"> -->
  12 + <!-- <div class="c-token" *ngFor="let item of selectedItems;trackBy: trackByFn;let k = index" [hidden]="k > settings.badgeShowLimit-1"> -->
  13 + <!-- <span class="c-label">{{item.itemName}}</span> -->
  14 + <!-- <span class="fa fa-remove" (click)="onItemClick(item)"></span> -->
  15 + <!-- </div> -->
  16 + <!-- </div> -->
  17 + <span *ngIf="selectedItems.length > settings.badgeShowLimit">+{{selectedItems.length - settings.badgeShowLimit }}</span>
  18 + <span class="fa" [ngClass]="{'fa-angle-down': !isActive,'fa-angle-up':isActive}"></span>
  19 + </button>
  20 + </div>
  21 + <div class="dropdown-list" [hidden]="!isActive">
  22 + <div class="arrow-up"></div>
  23 + <div class="list-area">
  24 + <div class="pure-checkbox select-all" *ngIf="settings.enableCheckAll && !settings.singleSelection && !settings.limitSelection" (click)="toggleSelectAll()">
  25 + <input type="checkbox" [checked]="isSelectAll" [disabled]="settings.limitSelection == selectedItems.length"/>
  26 + <label style="font-weight:normal">
  27 + <span [hidden]="isSelectAll">{{settings.selectAllText}}</span>
  28 + <span [hidden]="!isSelectAll">{{settings.unSelectAllText}}</span>
  29 + </label>
  30 + </div>
  31 + <div class="list-filter" *ngIf="settings.enableSearchFilter">
  32 + <span class="fa fa-search"></span>
  33 + <input type="text" placeholder="Search" [(ngModel)]="filter.itemName">
  34 + </div>
  35 + <ul [style.maxHeight] = "settings.maxHeight+'px'" style="position:relative">
  36 + <li *ngFor="let item of data | listFilter:filter; let i = index;" (click)="onItemClick(item,i)" class="pure-checkbox">
  37 + <input type="checkbox" [checked]="isSelected(item)" [disabled]="settings.limitSelection == selectedItems.length && !isSelected(item)"/>
  38 + <label style="font-weight:normal">{{item.itemName}}</label>
  39 + </li>
  40 + </ul>
  41 + </div>
  42 + </div>
  43 +</div>
0 44 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/src/app/angular2-multiselect-dropdown/multiselect.component.scss 0 โ†’ 100644
  1 +
  2 +$base-color: #0079FE;
  3 +
  4 +.cuppa-dropdown{
  5 + position: relative;
  6 +}
  7 +.c-btn{
  8 + display: inline-block;
  9 + background: #fff;
  10 + border: 1px solid #ccc;
  11 + border-radius: 3px;
  12 + font-size: 14px;
  13 + color: #333;
  14 +}
  15 +.c-btn:focus{
  16 + outline: none;
  17 + }
  18 +.selected-list{
  19 + .c-list{
  20 + float: left;
  21 + padding: 0px;
  22 + margin: 0px;
  23 + .c-token{
  24 + list-style: none;
  25 + padding: 0px 5px;
  26 + background: $base-color;
  27 + color: #fff;
  28 + border-radius: 2px;
  29 + margin-right: 4px;
  30 + float: left;
  31 + .c-label{
  32 + display: block;
  33 + float: left;
  34 + /*width: 50px;
  35 + white-space: nowrap;
  36 + text-overflow: ellipsis;
  37 + overflow: hidden;*/
  38 + }
  39 + .fa-remove{
  40 + margin-left: 1px;
  41 + font-size: 12px;
  42 + }
  43 + }
  44 + }
  45 + .fa-angle-down, .fa-angle-up{
  46 + font-size: 15pt;
  47 + position: absolute;
  48 + right: 10px;
  49 + top: 25%;
  50 + }
  51 + button{
  52 + width: 100%;
  53 + box-shadow: 0px 1px 5px #959595;
  54 + padding: 10px;
  55 + }
  56 +}
  57 +.dropdown-list{
  58 + position: absolute;
  59 + padding-top: 14px;
  60 + width: 100%;
  61 + z-index: 9999;
  62 + ul{
  63 + padding: 0px;
  64 + list-style: none;
  65 + overflow: auto;
  66 + margin: 0px;
  67 + li{
  68 + padding: 10px 10px;
  69 + cursor: pointer;
  70 + text-align: left;
  71 + }
  72 + li:first-child{
  73 + padding-top: 10px;
  74 + }
  75 + li:last-child{
  76 + padding-bottom: 10px;
  77 + }
  78 + li:hover{
  79 + background: #f5f5f5;
  80 + }
  81 + }
  82 + ul::-webkit-scrollbar{
  83 + width: 8px;
  84 + }
  85 + ul::-webkit-scrollbar-thumb{
  86 + background: #cccccc;
  87 + border-radius: 5px;
  88 + }
  89 + ul::-webkit-scrollbar-track{
  90 + background: #f2f2f2;
  91 + }
  92 +}
  93 +.arrow-up {
  94 + width: 0;
  95 + height: 0;
  96 + border-left: 13px solid transparent;
  97 + border-right: 13px solid transparent;
  98 + border-bottom: 15px solid #fff;
  99 + margin-left: 15px;
  100 + position: absolute;
  101 + top: 0;
  102 +}
  103 +.list-area{
  104 + border: 1px solid #ccc;
  105 + border-radius: 3px;
  106 + background: #fff;
  107 + margin: 0px;
  108 + box-shadow: 0px 1px 5px #959595;
  109 +}
  110 +.select-all{
  111 + padding: 10px;
  112 + border-bottom: 1px solid #ccc;
  113 + text-align: left;
  114 +}
  115 +.list-filter{
  116 + border-bottom: 1px solid #ccc;
  117 + position: relative;
  118 + input{
  119 + border: 0px;
  120 + width: 100%;
  121 + height: 35px;
  122 + padding: 0px 0px 0px 35px;
  123 + }
  124 + input:focus{
  125 + outline: none;
  126 + }
  127 + .fa{
  128 + position: absolute;
  129 + top: 10px;
  130 + left: 13px;
  131 + color: #888;
  132 + }
  133 +}
  134 +.pure-checkbox input[type="checkbox"] {
  135 + border: 0;
  136 + clip: rect(0 0 0 0);
  137 + height: 1px;
  138 + margin: -1px;
  139 + overflow: hidden;
  140 + padding: 0;
  141 + position: absolute;
  142 + width: 1px;
  143 +}
  144 +.pure-checkbox input[type="checkbox"]:focus + label:before,
  145 +.pure-checkbox input[type="checkbox"]:hover + label:before
  146 + {
  147 + border-color: $base-color;
  148 + background-color: #f2f2f2;
  149 +}
  150 +.pure-checkbox input[type="checkbox"]:active + label:before {
  151 + transition-duration: 0s;
  152 +}
  153 +.pure-checkbox input[type="checkbox"] + label{
  154 + position: relative;
  155 + padding-left: 2em;
  156 + vertical-align: middle;
  157 + user-select: none;
  158 + cursor: pointer;
  159 + margin: 0px;
  160 + color: #000;
  161 +}
  162 +.pure-checkbox input[type="checkbox"] + label:before{
  163 + box-sizing: content-box;
  164 + content: '';
  165 + color: $base-color;
  166 + position: absolute;
  167 + top: 50%;
  168 + left: 0;
  169 + width: 14px;
  170 + height: 14px;
  171 + margin-top: -9px;
  172 + border: 2px solid $base-color;
  173 + text-align: center;
  174 + transition: all 0.4s ease;
  175 +}
  176 +.pure-checkbox input[type="checkbox"] + label:after{
  177 + box-sizing: content-box;
  178 + content: '';
  179 + background-color: $base-color;
  180 + position: absolute;
  181 + top: 50%;
  182 + left: 4px;
  183 + width: 10px;
  184 + height: 10px;
  185 + margin-top: -5px;
  186 + transform: scale(0);
  187 + transform-origin: 50%;
  188 + transition: transform 200ms ease-out;
  189 +}
  190 +.pure-checkbox input[type="checkbox"]:disabled + label:before{
  191 + border-color: #cccccc;
  192 +}
  193 +.pure-checkbox input[type="checkbox"]:disabled:focus + label:before
  194 +.pure-checkbox input[type="checkbox"]:disabled:hover + label:before{
  195 + background-color: inherit;
  196 +}
  197 +.pure-checkbox input[type="checkbox"]:disabled:checked + label:before{
  198 + background-color: #cccccc;
  199 +}
  200 +.pure-checkbox input[type="checkbox"] + label:after{
  201 + background-color: transparent;
  202 + top: 50%;
  203 + left: 4px;
  204 + width: 8px;
  205 + height: 3px;
  206 + margin-top: -4px;
  207 + border-style: solid;
  208 + border-color: #ffffff;
  209 + border-width: 0 0 3px 3px;
  210 + border-image: none;
  211 + transform: rotate(-45deg) scale(0);
  212 +}
  213 +.pure-checkbox input[type="checkbox"]:checked + label:after{
  214 + content: '';
  215 + transform: rotate(-45deg) scale(1);
  216 + transition: transform 200ms ease-out;
  217 +}
  218 +.pure-checkbox input[type="radio"]:checked + label:before{
  219 + animation: borderscale 300ms ease-in;
  220 + background-color: white;
  221 +}
  222 +.pure-checkbox input[type="radio"]:checked + label:after{
  223 + transform: scale(1);
  224 +}
  225 +.pure-checkbox input[type="radio"] + label:before{
  226 + border-radius: 50%;
  227 +}
  228 +.pure-checkbox input[type="checkbox"]:checked + label:before{
  229 + animation: borderscale 200ms ease-in;
  230 + background: $base-color;
  231 +}
  232 +.pure-checkbox input[type="checkbox"]:checked + label:after{
  233 + transform: rotate(-45deg) scale(1);
  234 +}
  235 +@keyframes borderscale {
  236 + 50% {
  237 + box-shadow: 0 0 0 2px $base-color;
  238 + }
  239 +}
0 240 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/src/app/angular2-multiselect-dropdown/multiselect.component.ts 0 โ†’ 100644
  1 +import { Component, OnInit, NgModule, OnChanges, ViewEncapsulation,forwardRef, Input, Output, EventEmitter, ElementRef, AfterViewInit, Pipe, PipeTransform } from '@angular/core';
  2 +import { FormsModule, NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
  3 +import { CommonModule } from '@angular/common';
  4 +import { ListItem , MyException} from './multiselect.model';
  5 +import { DropdownSettings } from './multiselect.interface';
  6 +import { ClickOutsideDirective } from './clickOutside';
  7 +import { ListFilterPipe } from './list-filter';
  8 +
  9 +export const DROPDOWN_CONTROL_VALUE_ACCESSOR: any = {
  10 + provide: NG_VALUE_ACCESSOR,
  11 + useExisting: forwardRef(() => AngularMultiSelect),
  12 + multi: true
  13 +};
  14 +const noop = () => {
  15 +};
  16 +
  17 +@Component({
  18 + selector:'angular2-multiselect',
  19 + templateUrl: './multiselect.component.html',
  20 + host: { '[class]' : 'defaultSettings.classes' },
  21 + styleUrls:['./multiselect.component.scss'],
  22 + providers: [DROPDOWN_CONTROL_VALUE_ACCESSOR]
  23 +})
  24 +
  25 +export class AngularMultiSelect implements OnInit, ControlValueAccessor {
  26 +
  27 + @Input()
  28 + data: Array<ListItem>;
  29 +
  30 + @Input()
  31 + settings:DropdownSettings;
  32 +
  33 + @Output('onSelect')
  34 + onSelect: EventEmitter<ListItem> = new EventEmitter<ListItem>();
  35 +
  36 + @Output('onDeSelect')
  37 + onDeSelect: EventEmitter<ListItem> = new EventEmitter<ListItem>();
  38 +
  39 + @Output('onSelectAll')
  40 + onSelectAll: EventEmitter<Array<ListItem>> = new EventEmitter<Array<ListItem>>();
  41 +
  42 + @Output('onDeSelectAll')
  43 + onDeSelectAll: EventEmitter<Array<ListItem>> = new EventEmitter<Array<ListItem>>();
  44 +
  45 + @Input()
  46 + selectedItems: Array<ListItem>;
  47 +
  48 + public isActive: boolean = false;
  49 + public isSelectAll: boolean = false;
  50 + filter: ListItem = new ListItem();
  51 + defaultSettings:DropdownSettings = {
  52 + singleSelection: false,
  53 + text:'Select',
  54 + enableCheckAll: true,
  55 + selectAllText: 'Select All',
  56 + unSelectAllText: 'UnSelect All',
  57 + enableSearchFilter: false,
  58 + maxHeight: 300,
  59 + badgeShowLimit: 999999999999,
  60 + classes:''
  61 + }
  62 + constructor(){
  63 +
  64 + }
  65 + ngOnInit(){
  66 + this.settings = Object.assign(this.defaultSettings, this.settings);
  67 + /* this.selectedItems = [];
  68 + for(var t=0;t<this.data.length;t++){
  69 + if(this.data[t]){
  70 + this.selectedItems.push(this.data[t]);
  71 + }
  72 + }*/
  73 +
  74 + }
  75 + onItemClick(item: ListItem,index){
  76 +
  77 + let found = this.isSelected(item);
  78 + let limit = this.selectedItems.length < this.settings.limitSelection ? true : false;
  79 +
  80 + if(!found){
  81 + if(this.settings.limitSelection){
  82 + if(limit){
  83 + this.addSelected(item);
  84 + this.onSelect.emit(item);
  85 + }
  86 + }
  87 + else{
  88 + this.addSelected(item);
  89 + this.onSelect.emit(item);
  90 + }
  91 +
  92 + }
  93 + else{
  94 + this.removeSelected(item);
  95 + this.onDeSelect.emit(item);
  96 + }
  97 + if(this.isSelectAll || this.data.length > this.selectedItems.length){
  98 + this.isSelectAll = false;
  99 + }
  100 + if(this.data.length == this.selectedItems.length){
  101 + this.isSelectAll = true;
  102 + }
  103 + }
  104 + private onTouchedCallback: () => void = noop;
  105 + private onChangeCallback: (_: any) => void = noop;
  106 +
  107 + writeValue(value: any) {
  108 + if (value !== undefined && value !== null) {
  109 + if(this.settings.singleSelection){
  110 + try{
  111 +
  112 + if(value.length > 1){
  113 + this.selectedItems = [value[0]];
  114 + throw new MyException(404, { "msg": "Single Selection Mode, Selected Items cannot have more than one item." });
  115 + }
  116 + else
  117 + this.selectedItems = value;
  118 + }
  119 + catch(e){
  120 + console.error(e.body.msg);
  121 + }
  122 +
  123 + }
  124 + else{
  125 + if(this.settings.limitSelection){
  126 + this.selectedItems = value.splice(0,this.settings.limitSelection);
  127 + }
  128 + else{
  129 + this.selectedItems = value;
  130 + }
  131 + }
  132 + } else {
  133 + this.selectedItems = [];
  134 + }
  135 + }
  136 +
  137 + //From ControlValueAccessor interface
  138 + registerOnChange(fn: any) {
  139 + this.onChangeCallback = fn;
  140 + }
  141 +
  142 + //From ControlValueAccessor interface
  143 + registerOnTouched(fn: any) {
  144 + this.onTouchedCallback = fn;
  145 + }
  146 + trackByFn(index,item){
  147 + return item.id;
  148 + }
  149 + isSelected(clickedItem:ListItem){
  150 + let found = false;
  151 + this.selectedItems.forEach(item => {
  152 + if(clickedItem.id === item.id){
  153 + found = true;
  154 + }
  155 + });
  156 + return found;
  157 + }
  158 + addSelected(item: ListItem){
  159 + if(this.settings.singleSelection){
  160 + this.selectedItems = [];
  161 + this.selectedItems.push(item);
  162 + }
  163 + else
  164 + this.selectedItems.push(item);
  165 + this.onChangeCallback(this.selectedItems);
  166 + }
  167 + removeSelected(clickedItem: ListItem){
  168 + this.selectedItems.forEach(item => {
  169 + if(clickedItem.id === item.id){
  170 + this.selectedItems.splice(this.selectedItems.indexOf(item),1);
  171 + }
  172 + });
  173 + this.onChangeCallback(this.selectedItems);
  174 + }
  175 + toggleDropdown(){
  176 + this.isActive = !this.isActive;
  177 + //date 8th july2021 :birendra
  178 + if(this.data.length == this.selectedItems.length){
  179 + this.isSelectAll = true;
  180 + }
  181 + if(this.isActive)
  182 + {
  183 + $('#courseDiv').css("height","340px");
  184 + }
  185 + else
  186 + {
  187 + $('#courseDiv').css("height","40px");
  188 + }
  189 +
  190 + }
  191 + closeDropdown(){
  192 + this.isActive = false;
  193 + $('#courseDiv').css("height","40px");
  194 + }
  195 + toggleSelectAll(){
  196 + if(!this.isSelectAll){
  197 + this.selectedItems = [];
  198 + this.selectedItems = this.data.slice();
  199 + this.isSelectAll = true;
  200 + this.onChangeCallback(this.selectedItems);
  201 + this.onSelectAll.emit(this.selectedItems);
  202 + }
  203 + else{
  204 + this.selectedItems = [];
  205 + this.isSelectAll = false;
  206 + this.onChangeCallback(this.selectedItems);
  207 + this.onDeSelectAll.emit(this.selectedItems);
  208 + }
  209 + }
  210 +}
  211 +
  212 +@NgModule({
  213 + imports: [ CommonModule,FormsModule ],
  214 + declarations: [AngularMultiSelect, ClickOutsideDirective, ListFilterPipe],
  215 + exports: [AngularMultiSelect, ClickOutsideDirective, ListFilterPipe]
  216 +})
  217 +export class AngularMultiSelectModule { }
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/src/app/angular2-multiselect-dropdown/multiselect.interface.ts 0 โ†’ 100644
  1 +export interface DropdownSettings{
  2 + singleSelection: Boolean;
  3 + text: String;
  4 + enableCheckAll : Boolean;
  5 + selectAllText: String;
  6 + unSelectAllText: String;
  7 + enableSearchFilter: Boolean;
  8 + maxHeight: Number;
  9 + badgeShowLimit: Number;
  10 + classes: String;
  11 + limitSelection?: Number;
  12 +}
0 13 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/src/app/angular2-multiselect-dropdown/multiselect.model.ts 0 โ†’ 100644
  1 +export class ListItem{
  2 + id: Number;
  3 + itemName: String
  4 +}
  5 +export class MyException {
  6 + status : number;
  7 + body : any;
  8 + constructor(status : number, body : any) {
  9 + this.status = status;
  10 + this.body = body;
  11 + }
  12 +
  13 +}
0 14 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/angular2-multiselect-checkbox-dropdown/tsconfig.json 0 โ†’ 100644
  1 +{
  2 + "compileOnSave": false,
  3 + "compilerOptions": {
  4 + "outDir": "./dist/out-tsc",
  5 + "baseUrl": "src",
  6 + "sourceMap": true,
  7 + "declaration": false,
  8 + "moduleResolution": "node",
  9 + "emitDecoratorMetadata": true,
  10 + "experimentalDecorators": true,
  11 + "target": "es5",
  12 + "typeRoots": [
  13 + "node_modules/@types"
  14 + ],
  15 + "lib": [
  16 + "es2016",
  17 + "dom"
  18 + ]
  19 + }
  20 +}
... ...
400-SOURCECODE/Admin/src/app/app.component.html
... ... @@ -57,7 +57,7 @@
57 57 <!-- navigation -->
58 58 <div class="clearfix"></div>
59 59 <div class="row">
60   - <router-outlet>
  60 + <router-outlet (activate)="changeOfRoutes()">
61 61 <modal-confirm></modal-confirm>
62 62 </router-outlet>
63 63 </div>
... ...
400-SOURCECODE/Admin/src/app/app.component.ts
... ... @@ -142,7 +142,8 @@ export class AppComponent implements OnInit {
142 142 userId: this.global.UserId,
143 143 tagName: tagname,
144 144 SessionId:this.global.SessionId,
145   - isSiteUser:this.global.isSiteUser
  145 + isSiteUser:this.global.isSiteUser,
  146 + isAdmin:this.global.isAdmin
146 147 }).subscribe(status => {
147 148 //console.log(status);
148 149 if(status=='False')
... ... @@ -178,4 +179,13 @@ export class AppComponent implements OnInit {
178 179 //this.router.navigate([this.global.LiveURL]);
179 180 }
180 181  
  182 + changeOfRoutes()
  183 + {
  184 + //used to hide nevigation on ipad device while nevigate to page
  185 +
  186 + $('#navbar').removeClass('navbar-collapse collapse in');
  187 + $('#navbar').addClass('navbar-collapse collapse');
  188 +
  189 + }
  190 +
181 191 }
... ...
400-SOURCECODE/Admin/src/app/app.module.ts
... ... @@ -16,6 +16,8 @@ import { BsDatepickerModule, ModalModule } from &#39;ngx-bootstrap&#39;;
16 16 import { BsModalService } from 'ngx-bootstrap/modal';
17 17 import { BsDropdownModule } from 'ngx-bootstrap';
18 18 import { Ng2OrderModule } from 'ng2-order-pipe'; //importing the module
  19 +import { AngularMultiSelectModule } from './angular2-multiselect-checkbox-dropdown/angular2-multiselect-dropdown';
  20 +
19 21  
20 22 //import { ModalModule } from 'ngx-bootstrap/modal';
21 23 import { UpdateUserProfile } from './components/userentity/updateuserprofile.component';
... ... @@ -86,7 +88,7 @@ import { MyFilterPipe } from &#39;./shared/my-filter.pipe&#39;;
86 88 MyFilterPipe
87 89 ],
88 90 imports: [
89   - BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule,
  91 + BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule,AngularMultiSelectModule,
90 92 BsDatepickerModule.forRoot(), ModalModule.forRoot(), BsDropdownModule.forRoot(), Ng2OrderModule,MomentModule,NgIdleKeepaliveModule.forRoot()
91 93 //ModalModule.forRoot()
92 94 // , AngularFireModule.initializeApp(firebaseConfig),
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts
... ... @@ -120,6 +120,11 @@ export class LicenseService{
120 120 .map(this.extractData)
121 121 .catch((res: Response) => this.handleError(res));
122 122 }
  123 + GetLicenseAodCourse(licenseId: number) {
  124 + return this.http.get(this.commonService.resourceBaseUrl + "License/GetLicenseAodCourse?LicenseId=" + licenseId)
  125 + .map(this.extractData)
  126 + .catch((res: Response) => this.handleError(res));
  127 + }
123 128  
124 129 InsertLicense(obj: any) {
125 130 //let options = new RequestOptions({ headers: this.headers });
... ... @@ -266,19 +271,35 @@ export class LicenseService{
266 271 .catch((res: Response) => this.handleError(res));
267 272 }
268 273  
269   - UpdateLicenseModulesStatus(jsonObj: any) {
  274 + UpdateLicenseModulesStatus(jsonObj: any,isAodOn:boolean,CourseList:any) {
270 275 //let options = new RequestOptions({ headers: this.headers });
271 276 var moduleStatusText = '';
  277 + var CourseListText = '';
272 278 jsonObj.lstModuleStatus.forEach(element => {
273 279 moduleStatusText += element.m_Item1 + '-' + element.m_Item2 + '|';
274 280 });
275 281 if(moduleStatusText != '') {
276 282 moduleStatusText = moduleStatusText.substr(0, moduleStatusText.length - 1);
277 283 }
  284 +
  285 + if(isAodOn)
  286 + {
  287 + CourseList.forEach(element => {
  288 + CourseListText += element.CourseId + ',' + element.Status + '|';
  289 + });
  290 + if(CourseListText != '') {
  291 + CourseListText = CourseListText.substr(0, CourseListText.length - 1);
  292 + }
  293 +
  294 + }
  295 +
278 296 var jsonData = {
279 297 'licenseId': jsonObj.licenseId,
280   - 'moduleStatusText': moduleStatusText
  298 + 'moduleStatusText': moduleStatusText,
  299 + 'isAodOn':isAodOn,
  300 + 'CourseListText':CourseListText
281 301 };
  302 +
282 303 var headers = new Headers({
283 304 'Content-Type': 'application/json'
284 305 });
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.html
... ... @@ -43,41 +43,52 @@
43 43 </div>
44 44 </div>
45 45  
46   - <div class="col-sm-12 padd-left0 padd-right0">
  46 + <div class="col-sm-12 padd-left0 padd-right0" style="height:720px">
47 47  
48 48 <div class="well">
49 49 <div class="row">
50   - <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
  50 + <div class="col-sm-12 col-sm-offset-0 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1">
51 51 <div class="panel-body">
52 52 <!-- form -->
53   - <form class="form-horizontal" [formGroup]="updateModuleSettingsFrm" (submit)="UpdateLicenseModulesStatus(templatesuccess)">
  53 + <form class="form-horizontal" [formGroup]="updateModuleSettingsFrm">
54 54 <div class="form-group" *ngIf="lstModuleStatus!=null">
55   - <label for="inputPassword3" class="col-sm-3 control-label">Module :</label>
56   - <div class="col-sm-9">
  55 + <label for="inputPassword3" class="col-sm-2 col-md-2 col-lg-3 control-label">Module :</label>
  56 + <div class="col-sm-10 col-md-8 col-lg-5">
57 57 <div class="row" *ngFor="let item of this.updateModuleSettingsFrm.controls['lstModuleStatus'].value; let i = index">
58   - <div class="col-sm-6">
  58 + <div class="col-sm-7 col-md-8 col-lg-8">
59 59 <span class="help-block">{{item.m_Item3}}</span>
60 60 </div>
61   -
62   - <div class="col-sm-6">
  61 + <div class="col-sm-3 col-md-3 col-lg-3">
63 62 <label class="radio-inline">
64   - <input name="{{item.m_Item3}}" [value]="true" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> On
  63 + <input name="{{item.m_Item3}}" [value]="true" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}" (change)="handleChange(item.m_Item3,item.m_Item2)"> On
65 64 </label>
66 65 <label class="radio-inline">
67   - <input name="{{item.m_Item3}}" [value]="false" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> Off
  66 + <input name="{{item.m_Item3}}" [value]="false" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}" (change)="handleChange(item.m_Item3,item.m_Item2)"> Off
68 67 </label>
69 68 </div>
  69 + <div id="courseDiv" class="col-sm-10 col-sm-offset-0 col-md-11 col-md-offset-0 col-lg-10 col-lg-offset-0" *ngIf="item.m_Item2==true && item.m_Item1==17">
  70 + <!-- multiselect.component.html page customized from node module 'angular2-multiselect-checkbox-dropdown'-->
  71 + <angular2-multiselect [data]="dropdownList" [(ngModel)]="selectedItems" formControlName="courselist"
  72 + [settings]="dropdownSettings"
  73 + (onSelect)="onItemSelect($event)"
  74 + (onDeSelect)="OnItemDeSelect($event)"
  75 + (onSelectAll)="onSelectAll($event)"
  76 + (onDeSelectAll)="onDeSelectAll($event)">
  77 + </angular2-multiselect>
  78 + </div>
70 79 </div>
71 80 </div>
72   - </div>
73   -
  81 +
  82 + </div>
  83 +
74 84 <div class="row">
75   - <div class="col-sm-12 marginTop20 text-center">
76   - <button type="submit" class="btn btn-primary btn-sm" [disabled]="LicenseId == 0"><i class="fa fa-check"></i> Save</button>
  85 + <div class="col-sm-12 col-md-12 col-lg-12 marginTop20 text-center">
  86 + <button (click)="UpdateLicenseModulesStatus(templatesuccess)" class="btn btn-primary btn-sm" [disabled]="LicenseId == 0"><i class="fa fa-check"></i> Update</button>
77 87 </div>
78 88 </div>
79 89 </form>
80 90 <!-- form -->
  91 +
81 92 </div>
82 93 </div>
83 94  
... ...
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.ts
... ... @@ -25,6 +25,11 @@ export class LicenseModuleSettings implements OnInit {
25 25 modalRef: BsModalRef;
26 26 LicenseId:number=0;
27 27 AccountNumber:string='';
  28 + aodModuleStatus: boolean;
  29 + aodAllCourseList=[];
  30 + dropdownList = [];
  31 + selectedItems = [];
  32 + dropdownSettings = {};
28 33  
29 34 constructor(private _loadingService: LoadingService, private licenseService: LicenseService,
30 35 public globalService: GlobalService,
... ... @@ -32,8 +37,10 @@ export class LicenseModuleSettings implements OnInit {
32 37 private modalService: BsModalService, private _confirmService: ConfirmService) { }
33 38  
34 39 ngOnInit(): void {
  40 + this.aodModuleStatus=false;
  41 +
35 42 this._loadingService.ShowLoading("global-loading");
36   - $('#accountSelect').chosen({allow_single_deselect:true,width:'200px',placeholder_text_single:'Select Account',search_contains:true });
  43 + $('#accountSelect').chosen({allow_single_deselect:true,width:'250px',placeholder_text_single:'Select Account',search_contains:true });
37 44  
38 45 this.license = new License();
39 46 this.alerts = '';
... ... @@ -41,6 +48,7 @@ export class LicenseModuleSettings implements OnInit {
41 48 licenseId: [0],
42 49 accountNumber: [''],
43 50 lstModuleStatus: [this.fb.array([])],
  51 + courselist: []
44 52 });
45 53  
46 54 if (this.globalService.UserType > 2) {
... ... @@ -65,9 +73,9 @@ export class LicenseModuleSettings implements OnInit {
65 73 var selectedText= $(".chosen-single span" ).text();
66 74 this.AccountNumberChanged(selectedValue,selectedText);
67 75 });
68   -
  76 +
69 77 }
70   -
  78 +
71 79 openModal(template: TemplateRef<any>) {
72 80 this.modalRef = this.modalService.show(template);
73 81 }
... ... @@ -91,8 +99,20 @@ export class LicenseModuleSettings implements OnInit {
91 99 this.licenseService.GetLicenseModulesStatus(this.LicenseId)
92 100 .subscribe(st => {
93 101 this.lstModuleStatus = st;
  102 + var aod= st.filter(item => item.m_Item1 ==17); //aod module
  103 + if(aod[0].m_Item2)
  104 + {
  105 + this.aodModuleStatus=true;
  106 + }
  107 +
94 108 this.updateModuleSettingsFrm.setControl('lstModuleStatus', this.fb.array(this.lstModuleStatus));
95 109 this._loadingService.HideLoading("global-loading");
  110 +
  111 + if(this.aodModuleStatus)
  112 + {
  113 + this.LoadAODCourseList();
  114 + }
  115 +
96 116 }, error => this.error = <any>error);
97 117 }
98 118  
... ... @@ -101,6 +121,8 @@ export class LicenseModuleSettings implements OnInit {
101 121 this.lstModuleStatus = null;
102 122 this.LicenseId=LicenseId;
103 123 this.AccountNumber=AccountNumber;
  124 + this.aodModuleStatus=false;
  125 + this.aodAllCourseList=[];
104 126  
105 127 this.updateModuleSettingsFrm.controls['licenseId'].setValue(LicenseId);
106 128 this.updateModuleSettingsFrm.controls['accountNumber'].setValue(AccountNumber);
... ... @@ -108,6 +130,96 @@ export class LicenseModuleSettings implements OnInit {
108 130  
109 131 }
110 132  
  133 + LoadAODCourseList()
  134 + {
  135 + this._loadingService.ShowLoading("global-loading");
  136 + this.aodAllCourseList=[];
  137 + this.dropdownList = [];
  138 + this.selectedItems = [];
  139 + this.dropdownSettings = {
  140 + singleSelection: false,
  141 + text:"AOD Courses List",
  142 + selectAllText:'Select All',
  143 + unSelectAllText:'UnSelect All',
  144 + enableSearchFilter: true,
  145 + maxHeight:200,
  146 + classes:"myclass custom-class"
  147 + };
  148 +
  149 + this.licenseService.GetLicenseAodCourse(this.LicenseId)
  150 + .subscribe(courselist => {
  151 + this.aodAllCourseList = courselist;
  152 + var selectedCourse= courselist.filter(item => item.Status ==true); //aod module
  153 +
  154 + for(var i=0;i<this.aodAllCourseList.length;i++)
  155 + {
  156 + this.dropdownList.push(
  157 + {"id":this.aodAllCourseList[i].CourseId.trim(),
  158 + "itemName":this.aodAllCourseList[i].CourseName
  159 + })
  160 + }
  161 + for(var i=0;i<selectedCourse.length;i++)
  162 + {
  163 + this.selectedItems.push(
  164 + {"id":selectedCourse[i].CourseId.trim(),
  165 + "itemName":selectedCourse[i].CourseName
  166 + })
  167 + }
  168 +
  169 + this._loadingService.HideLoading("global-loading");
  170 +
  171 + }, error => this.error = <any>error);
  172 +
  173 + }
  174 + updateAodCourseItemList(ischached:any,id:any)
  175 + {
  176 + let itemIndex = this.aodAllCourseList.findIndex(item => item.CourseId ==id);
  177 + this.aodAllCourseList[itemIndex].Status = ischached;
  178 + }
  179 + onItemSelect(item:any){
  180 + // console.log(item);
  181 + // console.log(this.selectedItems);
  182 + this.updateAodCourseItemList(true,item.id);
  183 + }
  184 + OnItemDeSelect(item:any){
  185 + // console.log(item);
  186 + this.updateAodCourseItemList(false,item.id);
  187 + }
  188 + onSelectAll(items: any){
  189 + //console.log(items);
  190 + //console.log(this.selectedItems);
  191 + for(var ind=0;ind<items.length;ind++)
  192 + {
  193 + this.updateAodCourseItemList(true,items[ind].id);
  194 + }
  195 +
  196 + }
  197 + onDeSelectAll(items: any){
  198 + //console.log(items);
  199 + //console.log(this.selectedItems);
  200 + // console.log(this.dropdownList);
  201 + for(var ind=0;ind<this.dropdownList.length;ind++)
  202 + {
  203 + this.updateAodCourseItemList(false,this.dropdownList[ind].id);
  204 + }
  205 + }
  206 + handleChange(evmoduleName,moduleValue) {
  207 + if (evmoduleName=='A.D.A.M. OnDemand') {
  208 + if(moduleValue==true)
  209 + {
  210 + this.aodModuleStatus=true;
  211 + if(this.aodAllCourseList.length==0)
  212 + {
  213 + this.LoadAODCourseList();
  214 + }
  215 + }
  216 + else
  217 + {
  218 + this.aodModuleStatus=false;
  219 + }
  220 + }
  221 + }
  222 +
111 223 AfterUpdateData(data, template) {
112 224 if (data.Status == "false") {
113 225 this.alerts = "<span>License module status update unsuccessfull</span>";
... ... @@ -117,15 +229,24 @@ export class LicenseModuleSettings implements OnInit {
117 229 this._loadingService.HideLoading("global-loading");
118 230 }
119 231  
  232 + ErrorUpdateData(Error:any, template) {
  233 + this._confirmService.activate("License module update failed.", "alertMsg");
  234 + this._loadingService.HideLoading("global-loading");
  235 + }
  236 +
120 237 UpdateLicenseModulesStatus(template: TemplateRef<any>) {
121 238 this.alerts = '';
122 239 if (this.alerts == '') {
123 240 this._loadingService.ShowLoading("global-loading");
124 241 var obj = this.updateModuleSettingsFrm.value;
125   - return this.licenseService.UpdateLicenseModulesStatus(obj)
  242 + return this.licenseService.UpdateLicenseModulesStatus(obj,this.aodModuleStatus,this.aodAllCourseList)
126 243 .subscribe(
127   - n => (this.AfterUpdateData(n, template)),
128   - error => this.error = <any>error);
  244 + n =>{
  245 + this.AfterUpdateData(n, template)
  246 + },
  247 + error =>{
  248 + this.ErrorUpdateData(error, template)
  249 + });
129 250 }
130 251 }
131 252  
... ...
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,'isSiteUser': obj.isSiteUser };
  59 + var jsonData = { 'userId': obj.userId, 'tagName': obj.tagName,'SessionId': obj.SessionId,'isSiteUser': obj.isSiteUser,'isAdmin': obj.isAdmin };
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.ts
... ... @@ -408,7 +408,9 @@ export class UsersList implements OnInit, AfterViewChecked {
408 408 this.userservice.ManageUserLoginStatus({
409 409 userId: this.selectedId,
410 410 tagName: 'adminlogout',
411   - SessionId:this.global.SessionId
  411 + SessionId:this.global.SessionId,
  412 + isSiteUser:this.global.isSiteUser,
  413 + isAdmin:this.global.isAdmin
412 414 }).subscribe(x => {
413 415 console.log(x);
414 416 this.EditbuttonStatus=undefined;
... ...
400-SOURCECODE/Admin/src/app/shared/global.ts
... ... @@ -29,6 +29,7 @@ export class GlobalService {
29 29 aiaPingInterval:number=0;
30 30 SessionId:number=0;
31 31 isSiteUser:boolean=false;
  32 + isAdmin:boolean=false;
32 33 RemoveColumns: Array<string> = ["Serial_No", "LicenseId","RowNum"]
33 34 error;
34 35 public href: string = "";
... ... @@ -41,7 +42,7 @@ export class GlobalService {
41 42 var newsessionid = date.getTime();//timestamp is the number of milliseconds that have passed since January 1, 1970
42 43 localStorage.setItem('loggedInUserDetails', JSON.stringify(
43 44 {
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 + "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,"isAdmin":true, "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 }));
46 47 }
47 48  
... ... @@ -57,6 +58,7 @@ export class GlobalService {
57 58 this.aiaPingInterval=this.loggedInUser.aiaPingInterval;
58 59 this.SessionId=this.loggedInUser.SessionId;
59 60 this.isSiteUser=this.loggedInUser.isSiteUser;
  61 + this.isAdmin=this.loggedInUser.LicenseId==0?true:false;;
60 62  
61 63 }
62 64  
... ...