From 3705d19ff2d4604c1c42cd673fc5a6a7f5955170 Mon Sep 17 00:00:00 2001 From: Birendra Date: Sat, 2 Oct 2021 20:17:13 +0530 Subject: [PATCH] fix lexicon in AA module --- 400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs | 4 ++-- 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs | 8 ++++++-- 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx | 2 ++ 400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs | 2 +- 400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs | 3 ++- 400-SOURCECODE/AIAHTML5.API/Models/Users.cs | 17 ++++++++++++----- 400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js | 46 ++++++++++++++++++++++++---------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js | 77 ++++++++++++++++++++++++++++++++++------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js | 55 +++++++++++++++++++++++-------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js | 71 +++++++++++++++++++++++++++++++---------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js | 66 +++++++++++++++++++++++++++++------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js | 66 +++++++++++++++++++++++++++++++++++++++++------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 307 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js | 55 +++++++++++++++++++++++++++---------------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js | 40 ++++++++++++++++++++-------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js | 30 +++++++++++++++--------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 1385 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html | 40 ++++++++++++++++++++++++++-------------- 400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html | 11 ++++++++++- 400-SOURCECODE/AIAHTML5.Web/content/images/mult-annotation.png | Bin 566 -> 0 bytes 400-SOURCECODE/AIAHTML5.Web/index.aspx | 86 ++++++++++++++++++++++++++++++++++++++++---------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/index.aspx.cs | 2 ++ 400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css | 2 +- 400-SOURCECODE/Admin/src/app/components/Reports/report.service.ts | 2 ++ 400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.html | 14 ++++++++++++++ 400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts | 3 ++- 400-SOURCECODE/Admin/src/index.html | 3 +++ 30 files changed, 1640 insertions(+), 903 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs index 6c1f3e4..fe97ff7 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs @@ -88,12 +88,12 @@ namespace AIAHTML5.ADMIN.API.Controllers [Route("GetSiteLicenseUsageReport")] [HttpGet] - public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition, int pageNo, int pageLength) + public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition, int iloginTypeId, int pageNo, int pageLength) { try { var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); - var lstSiteLicenseUsageReport = dbContext.usp_GetSiteLicenseUsageReports(sFromDate, sToDate, sAccountNumber, (byte)iEdition, pageNo, pageLength, spRecordCount).ToList(); + var lstSiteLicenseUsageReport = dbContext.usp_GetSiteLicenseUsageReports(sFromDate, sToDate, sAccountNumber, (byte)iEdition, (byte)iloginTypeId, pageNo, pageLength, spRecordCount).ToList(); return Ok(new { SiteLicenseUsageList = lstSiteLicenseUsageReport, RecordCount = spRecordCount.Value }); } catch (Exception ex) diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs index 3a68d29..d486a00 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs @@ -4259,7 +4259,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, pageNoParameter, pageLengthParameter, recordCount); } - public virtual ObjectResult usp_GetSiteLicenseUsageReports(string sFromDate, string sToDate, string sAccoutNumber, Nullable iEditionId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) + public virtual ObjectResult usp_GetSiteLicenseUsageReports(string sFromDate, string sToDate, string sAccoutNumber, Nullable iEditionId, Nullable iloginTypeId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFromDateParameter = sFromDate != null ? new ObjectParameter("sFromDate", sFromDate) : @@ -4277,6 +4277,10 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iEditionId", iEditionId) : new ObjectParameter("iEditionId", typeof(byte)); + var iloginTypeIdParameter = iloginTypeId.HasValue ? + new ObjectParameter("iloginTypeId", iloginTypeId) : + new ObjectParameter("iloginTypeId", typeof(byte)); + var pageNoParameter = pageNo.HasValue ? new ObjectParameter("pageNo", pageNo) : new ObjectParameter("pageNo", typeof(int)); @@ -4285,7 +4289,7 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("pageLength", pageLength) : new ObjectParameter("pageLength", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetSiteLicenseUsageReports", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, pageNoParameter, pageLengthParameter, recordCount); + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetSiteLicenseUsageReports", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, iloginTypeIdParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult usp_GetSubscribedLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx index 4fed988..9527612 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx @@ -1177,6 +1177,7 @@ + @@ -2813,6 +2814,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs index e33f313..4748f95 100644 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs +++ b/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs @@ -494,7 +494,7 @@ namespace AIAHTML5.API.Controllers } [HttpPost] - [Route("api/ByPassLoginToOpenModule")] + [Route("api/ByPassLoginToOpenModule")]//now using UrlLoginController public HttpResponseMessage ByPassLoginToOpenModule([FromBody]JObject sitedetail) { // note:created new UrlLoginController for bypass login diff --git a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs index 4b5a14e..f7aceb7 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs @@ -1427,7 +1427,7 @@ namespace AIAHTML5.API.Models return dt; } - internal int InsertSiteLoginDetails(String strAcccountNumber, String strUrlReferer, string strEdition) + internal int InsertSiteLoginDetails(String strAcccountNumber, String strUrlReferer, string strEdition,int loginTypeId) { int result = 0; SqlConnection conn = null; @@ -1443,6 +1443,7 @@ namespace AIAHTML5.API.Models cmd.Parameters.AddWithValue("@nvReferalUrl", strUrlReferer); cmd.Parameters.AddWithValue("@nvEdition", strEdition); cmd.Parameters.AddWithValue("@nvHttpReferer", null); + cmd.Parameters.AddWithValue("@nvLoginTypeId", loginTypeId); result = cmd.ExecuteNonQuery(); } catch (SqlException ex) diff --git a/400-SOURCECODE/AIAHTML5.API/Models/Users.cs b/400-SOURCECODE/AIAHTML5.API/Models/Users.cs index 244f28b..c5827c5 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/Users.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/Users.cs @@ -691,8 +691,9 @@ namespace AIAHTML5.API.Models // get exported image detail userInfo.UserExportImageDetail = getExportedImageDetail(userInfo.LicenseId); - // insert login details - objDBModel.InsertSiteLoginDetails(strAcccountNumber, strSiteIP, strEdition); + // insert login details + //pass 1 for Site login + objDBModel.InsertSiteLoginDetails(strAcccountNumber, strSiteIP, strEdition,1); } @@ -749,6 +750,8 @@ namespace AIAHTML5.API.Models string expirationDate = null; bool isLicenseExpired = false; + DBModel objDBModel = new DBModel(); + // validate license start date string startDate = null; bool isSubscriptionNotStart = false; @@ -822,10 +825,14 @@ namespace AIAHTML5.API.Models userInfo.userSelectedSkintone = null; userInfo.userLexicon = null; - // get only CA module + // get only CA module - userInfo.Modules = getModuleListBySlug(licId,slug); - + userInfo.Modules = getModuleListBySlug(licId,slug); + + // insert site url login details in sitelicense table UserLoginLog + //pass 2 for CA login + objDBModel.InsertSiteLoginDetails(strAcccountNumber, "", intEditionId.ToString(),2); + } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js index 05ccf81..309f360 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js @@ -79,14 +79,15 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } } - $scope.DisableUI = function () { - - var caImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < caImagePanelConetent.length; i++) { - caImagePanelConetent[i].style.pointerEvents = "none"; - caImagePanelConetent[i].style.opacity = "0.7"; + $scope.Disable3DUI = function (windowviewid) { + var modulePanel = $("#ThreeDImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -95,14 +96,14 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $('#HomeContainerDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { + $scope.Enable3DUI = function (windowviewid) { - var caImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < caImagePanelConetent.length; i++) { - caImagePanelConetent[i].style.pointerEvents = "auto"; - caImagePanelConetent[i].style.opacity = "1"; + var modulePanel = $("#ThreeDImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } - $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); // CB module enable all @@ -145,7 +146,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $scope.initialize3DWindowData($rootScope.MULTI_VIEW_ID, true, undefined); - $scope.DisableUI(); + $scope.Disable3DUI($rootScope.MULTI_VIEW_ID); if ($rootScope.refreshcheck == null) { $location.path('/'); @@ -207,10 +208,10 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location }); - $timeout(function () { $scope.EnableUI(); }, 200); + $timeout(function () { $scope.Enable3DUI(windowviewid); }, 200); }, function (error) { - $scope.EnableUI(); + $scope.Enable3DUI(windowviewid); // handle errors here console.log(' $scope.threeDAnatomyData = ' + error.statusText); } @@ -275,7 +276,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location if ($rootScope.isCallFromOtherModule) { $scope.ThreeDModuleData = ModuleService.getModuleData("THREE_D_ANATOMY"); if($scope.ThreeDModuleData.length<1) return; - $scope.DisableUI(); + $scope.Disable3DUI(); $scope.readyToLoad = true; $rootScope.ThreeDWindowLoadComplete = false; $scope.wincount = 1; @@ -313,20 +314,19 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } else { - $scope.DisableUI(); $scope.Open3DModelBody(null); } } $scope.Open3DModelBody = function (ThreeDModuleData) { - $scope.DisableUI(); - if ($rootScope.isCallFromOtherModule == true) { $scope.ThreeDOpenInOtherModules = ThreeDModuleData; $rootScope.MULTI_VIEW_ID += 1; var windowviewid = $rootScope.MULTI_VIEW_ID; + $scope.Disable3DUI(windowviewid); + $scope.initialize3DWindowData(windowviewid, false, $scope.ThreeDOpenInOtherModules.currentWindowId); var moduleName = $scope.ThreeDOpenInOtherModules.mType; @@ -381,7 +381,9 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location ); } - else { + else + { + $scope.Disable3DUI($rootScope.MULTI_VIEW_ID); $scope.Set3DwindowStoreData($rootScope.MULTI_VIEW_ID, 'parentSlugName', '3d-anatomy-list'); $scope.load3DAnimation($rootScope.MULTI_VIEW_ID); } @@ -578,14 +580,14 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } $scope.AnimationOnLoad = function (windowviewid) { - $scope.EnableUI(); - + if ($rootScope.isCallFromOtherModule) { $rootScope.ThreeDWindowLoadComplete = true; } $scope.JsPanelMouseEnter(windowviewid); + $scope.Enable3DUI(windowviewid); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js index 7a3b2ae..889375d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js @@ -152,14 +152,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $scope.DisableUI = function () { - - var aiImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < aiImagePanelConetent.length; i++) { - aiImagePanelConetent[i].style.pointerEvents = "none"; - aiImagePanelConetent[i].style.opacity = "0.7"; + $scope.DisableAIUI = function (windowviewid) { + var modulePanel = $("#aiImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -169,12 +170,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } - $scope.EnableUI = function () { + $scope.EnableAIUI = function (windowviewid) { - var aiImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < aiImagePanelConetent.length; i++) { - aiImagePanelConetent[i].style.pointerEvents = "auto"; - aiImagePanelConetent[i].style.opacity = "1"; + var modulePanel = $("#aiImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } $rootScope.isLoading = false; @@ -223,7 +225,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.setActiveTab = function (tabToSet, inderectCall, windowviewid) { if (windowviewid == undefined) windowviewid = $rootScope.MULTI_VIEW_ID; - $scope.DisableUI(); + $scope.DisableAIUI(windowviewid); if(tabToSet=="" ||tabToSet==undefined) { @@ -334,7 +336,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.isCallFromOtherModule = undefined; $rootScope.MULTI_VIEW_ID += 1; - $scope.DisableUI(); + $scope.DisableAIUI($rootScope.MULTI_VIEW_ID); // store exist module in module service var ExistData = ModuleService.getModuleData("ADAM_IMAGES"); @@ -477,7 +479,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, function (error) { - $scope.EnableUI(); + $scope.EnableAIUI(windowviewid); // handle errors here console.log(' $scope.IllustrationData = ' + error.statusText); } @@ -518,7 +520,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, 100); $timeout(function () { - $scope.EnableUI(); + $scope.EnableAIUI(windowviewid); $rootScope.ResetGridListLength(); }, 500); @@ -526,25 +528,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.ResetGridListLength=function() - { - var $ua = navigator.userAgent; - - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-132; - var listheight=screen.height-srchHeight-356; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } - else - { - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-281; - var listheight=screen.height-srchHeight-504; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } + { + var innerheight =$(window).innerHeight(); + + var srchHeight=$('.breadcrumb').height(); + var gridheight=innerheight-srchHeight-140; + var listheight=innerheight-srchHeight-365; + $('#grid-view').css({"height":gridheight,"overflow":"auto","min-height":"160px"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto","min-height":"100px"}); } $scope.IsVisible = function () { $scope.scroll(); @@ -656,7 +647,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.filterstring = false; $scope.currentPage = 1; - $scope.DisableUI(); + $scope.DisableAIUI(windowviewid); $scope.loadAllAI(ImageCount, windowviewid); } @@ -666,7 +657,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.currentPage = 1; windowviewid = $rootScope.MULTI_VIEW_ID; } - $scope.DisableUI(); + $scope.DisableAIUI(windowviewid); var currentSearchtext = $rootScope.getLocalStorageValue("SearchText"); //localStorage.setItem("SearchText", ''); @@ -685,7 +676,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($scope.query.SearchText == "undefined" || ($scope.query.SearchText == null || $scope.query.SearchText == "")) { $('#errorMessage').text(AIAConstants.PLEASE_ENTER_SEARCH_TEXT); $("#messageModal").modal('show'); - $scope.EnableUI(); + $scope.EnableAIUI(windowviewid); return false; } } @@ -782,7 +773,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $timeout(function () { - $scope.EnableUI(); + $scope.EnableAIUI(windowviewid); $rootScope.ResetGridListLength(); }, 500); @@ -834,7 +825,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#txtSerachInput').val(""); $scope.idSelected = ''; $scope.hiderow = false; - $scope.DisableUI(); + $scope.DisableAIUI(windowviewid); $('ul li span').removeAttr("style"); $('#' + $rootScope.SearchTextByAlphabet).css({ "color": "white", "background-color": "#1B92D0" }); $scope.filterstring = true; @@ -926,7 +917,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $timeout(function () { - $scope.EnableUI(); + $scope.EnableAIUI(windowviewid); $rootScope.ResetGridListLength(); }, 500); } @@ -1015,7 +1006,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($rootScope.isCallFromOtherModule) { $scope.AIModuleData = ModuleService.getModuleData("ADAM_IMAGES"); if($scope.AIModuleData.length<1) return; - $scope.DisableUI(); + $scope.DisableAIUI(); $scope.readyToLoad = true; $rootScope.AIWindowLoadComplete = false; $scope.wincount = 1; @@ -1054,7 +1045,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - $scope.DisableUI(); + $scope.DisableAIUI(); $scope.OpenAdamImageView(null); } } @@ -1377,7 +1368,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } - $scope.EnableUI(); + $scope.EnableAIUI(windowviewid); $rootScope.AIWindowLoadComplete = true; }; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js index a1139a5..d752229 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js @@ -64,14 +64,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $scope.DisableUI = function () { - - var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < aniImagePanelConetent.length; i++) { - aniImagePanelConetent[i].style.pointerEvents = "none"; - aniImagePanelConetent[i].style.opacity = "0.7"; + $scope.DisableAODUI = function (windowviewid) { + var modulePanel = $("#aodImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -80,12 +81,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#HomeContainerDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { + $scope.EnableAODUI = function (windowviewid) { - var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < aniImagePanelConetent.length; i++) { - aniImagePanelConetent[i].style.pointerEvents = "auto"; - aniImagePanelConetent[i].style.opacity = "1"; + var modulePanel = $("#aodImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } $rootScope.isLoading = false; @@ -150,7 +152,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.initializeAODWindowData($rootScope.MULTI_VIEW_ID, true, undefined); - $scope.DisableUI(); + $scope.DisableAODUI($rootScope.MULTI_VIEW_ID); if ($rootScope.refreshcheck == null) { $location.path('/'); @@ -187,12 +189,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout { $('#errorMessage').text(AIAConstants.NO_COURSE_FOUND_MESSAGE); $("#messageModal").modal('show'); - $scope.EnableUI(); + $scope.EnableAODUI(windowviewid); } }, function (error) { - $scope.EnableUI(); + $scope.EnableAODUI(windowviewid); }) }; @@ -232,28 +234,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { - $scope.EnableUI(); + $scope.EnableAODUI(windowviewid); $rootScope.ResetGridListLength(); }, 400); } $rootScope.ResetGridListLength=function() { - var $ua = navigator.userAgent; - - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - - var gridheight=screen.height-107; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - - } - else - { - var gridheight=screen.height-252; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - - } + var innerheight =$(window).innerHeight(); + var gridheight=innerheight-115; + $('#grid-view').css({"height":gridheight,"overflow":"auto","min-height":"200px"}); } $scope.openView = function ($event) { @@ -295,7 +286,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $scope.loadAdamVideo = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableAODUI(windowviewid); $scope.jsPanelID = 'aodImagePanel' + '_' + windowviewid; var tittle = $scope.GetAODwindowStoreData(windowviewid, 'currentViewTitle'); @@ -393,8 +384,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.MyAODvideoOnLoad = function (windowviewid) { - $scope.EnableUI(); - $scope.JsPanelMouseEnter(windowviewid); + $scope.JsPanelMouseEnter(windowviewid); + $scope.EnableAODUI(windowviewid); } $scope.JsPanelMouseEnter = function (windowviewid) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 78b0d13..bf421db 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -126,14 +126,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $scope.DisableUI = function () { - - var caImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < caImagePanelConetent.length; i++) { - caImagePanelConetent[i].style.pointerEvents = "none"; - caImagePanelConetent[i].style.opacity = "0.7"; + $scope.DisableCAUI = function (windowviewid) { + var modulePanel = $("#caImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -142,12 +143,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#HomeContainerDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { + $scope.EnableCAUI = function (windowviewid) { - var caImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < caImagePanelConetent.length; i++) { - caImagePanelConetent[i].style.pointerEvents = "auto"; - caImagePanelConetent[i].style.opacity = "1"; + var modulePanel = $("#caImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } $rootScope.isLoading = false; @@ -227,7 +229,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } }, function (error) { - $scope.EnableUI(); + $scope.EnableCAUI(); // handle errors here console.log(' $scope.AnimationData = ' + error.statusText); }); @@ -277,7 +279,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.initializeCAWindowData($rootScope.MULTI_VIEW_ID, true, undefined); - $scope.DisableUI(); + $scope.DisableCAUI($rootScope.MULTI_VIEW_ID); if ($rootScope.refreshcheck == null) { $location.path('/'); @@ -419,7 +421,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, function (error) { - $scope.EnableUI(); + $scope.EnableCAUI(windowviewid); // handle errors here console.log(' $scope.AnimationData = ' + error.statusText); }); @@ -485,7 +487,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { - $scope.EnableUI(); + $scope.EnableCAUI(windowviewid); $rootScope.ResetGridListLength(); }, 400); @@ -549,7 +551,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if (windowviewid == undefined) // call from also home controller list manager windowviewid = $rootScope.MULTI_VIEW_ID; - $scope.DisableUI(); + $scope.DisableCAUI(windowviewid); query.selectedbodyregion = ""; query.selectedbodysystem = ""; @@ -583,11 +585,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } - $scope.ApplySearch = function (query, windowviewid) { - $scope.DisableUI(); + $scope.ApplySearch = function (query, windowviewid) { if (windowviewid == undefined) { windowviewid = $rootScope.MULTI_VIEW_ID; } + $scope.DisableCAUI(windowviewid); setTimeout(function(){ $scope.FilterSearch(query, windowviewid) @@ -743,31 +745,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $timeout(function () { - $scope.EnableUI(); + $scope.EnableCAUI(windowviewid); $rootScope.ResetGridListLength(); }, 500); } $rootScope.ResetGridListLength=function() { - var $ua = navigator.userAgent; - - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { + var innerheight =$(window).innerHeight(); - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-128; - var listheight=screen.height-srchHeight-352; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } - else - { - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-276; - var listheight=screen.height-srchHeight-500; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } + var srchHeight=$('.breadcrumb').height(); + var gridheight=innerheight-srchHeight-135; + var listheight=innerheight-srchHeight-358; + $('#grid-view').css({"height":gridheight,"overflow":"auto","min-height":"160px"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto","min-height":"100px"}); } $scope.scroll = function () { $("html,body").scrollTop(0); @@ -857,7 +848,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($rootScope.isCallFromOtherModule) { $scope.CAModuleData = ModuleService.getModuleData("CLINICAL_ANIMATIONS"); if($scope.CAModuleData.length<1) return; - $scope.DisableUI(); + $scope.DisableCAUI(); $scope.readyToLoad = true; $rootScope.CAWindowLoadComplete = false; $scope.wincount = 1; @@ -895,7 +886,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - $scope.DisableUI(); + $scope.DisableCAUI(); $scope.openBodyView(null); } } @@ -990,7 +981,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $location.path('/'); } - $scope.DisableUI(); + $scope.DisableCAUI(windowviewid); // $scope.jsPanelID = 'caVideoPanel' + '_' + windowviewid; //changes to find the id by partail match @@ -1294,7 +1285,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.videoOnLoad = function (windowviewid) { - $scope.EnableUI(); + $scope.EnableCAUI(windowviewid); if ($rootScope.isCallFromOtherModule) { //$scope.JsPanelclick(windowviewid); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index 99f1015..8a55286 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -149,14 +149,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $scope.DisableUI = function () { - - var ciImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < ciImagePanelConetent.length; i++) { - ciImagePanelConetent[i].style.pointerEvents = "none"; - ciImagePanelConetent[i].style.opacity = "0.7"; + $scope.DisableCIUI = function (windowviewid) { + var modulePanel = $("#ciImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -165,12 +166,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#HomeContainerDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { + $scope.EnableCIUI = function (windowviewid) { - var ciImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < ciImagePanelConetent.length; i++) { - ciImagePanelConetent[i].style.pointerEvents = "auto"; - ciImagePanelConetent[i].style.opacity = "1"; + var modulePanel = $("#ciImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } $rootScope.isLoading = false; @@ -215,7 +217,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.initializeCIWindowData($rootScope.MULTI_VIEW_ID, true, undefined); - $scope.DisableUI(); + $scope.DisableCIUI($rootScope.MULTI_VIEW_ID); if ($rootScope.refreshcheck == null) { $location.path('/'); @@ -360,7 +362,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }, function (error) { - $scope.EnableUI(); + $scope.EnableCIUI(windowviewid); // handle errors here console.log(' $scope.IllustrationData = ' + error.statusText); } @@ -396,7 +398,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $timeout(function () { - $scope.EnableUI(); + $scope.EnableCIUI(windowviewid); $rootScope.ResetGridListLength(); }, 400); @@ -460,7 +462,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if (windowviewid == undefined) // call from also home controller list manager windowviewid = $rootScope.MULTI_VIEW_ID; - $scope.DisableUI(); + $scope.DisableCIUI(windowviewid); query.selectedbodyregion = ""; query.selectedbodysystem = ""; @@ -494,10 +496,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $scope.ApplySearch = function (query, windowviewid) { - $scope.DisableUI(); + if (windowviewid == undefined) { windowviewid = $rootScope.MULTI_VIEW_ID; } + $scope.DisableCIUI(windowviewid); setTimeout(function(){ $scope.FilterSearch(query, windowviewid) @@ -687,31 +690,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $timeout(function () { - $scope.EnableUI(); + $scope.EnableCIUI(windowviewid); $rootScope.ResetGridListLength(); }, 400); } $rootScope.ResetGridListLength=function() { - var $ua = navigator.userAgent; + var innerheight =$(window).innerHeight(); - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-128; - var listheight=screen.height-srchHeight-352; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } - else - { - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-276; - var listheight=screen.height-srchHeight-500; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } + var srchHeight=$('.breadcrumb').height(); + var gridheight=innerheight-srchHeight-135; + var listheight=innerheight-srchHeight-358; + $('#grid-view').css({"height":gridheight,"overflow":"auto","min-height":"160px"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto","min-height":"100px"}); } $scope.scroll = function () { @@ -793,7 +785,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($rootScope.isCallFromOtherModule) { $scope.CIModuleData = ModuleService.getModuleData("CLINICAL_ILLUSTRATIONS"); if($scope.CIModuleData.length<1) return; - $scope.DisableUI(); + $scope.DisableCIUI(); $scope.readyToLoad = true; $rootScope.CIWindowLoadComplete = false; $scope.wincount = 1; @@ -831,7 +823,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - $scope.DisableUI(); + $scope.DisableCIUI(); $scope.openBodyView(null); } } @@ -1186,7 +1178,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $scope.EnableUI(); + $scope.EnableCIUI(windowviewid); $rootScope.CIWindowLoadComplete = true; }; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index dbb851f..beb8ecd 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -16,6 +16,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $rootScope.closeAfterSaveCurriculum = false; $rootScope.UnsaveCurriculum = $rootScope.isnewcurriculum == true? true:false; $scope.SectionContentForExportCB=[]; + $rootScope.firstSelectedNodeId = null; $scope.IsVisible = function () { $scope.scroll(); } @@ -29,18 +30,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } angular.element(document).ready(function (e) { - - var $ua = navigator.userAgent; - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - $("#treecontent").css('height',screen.height-130); - $("#cbdivarea").css('height',screen.height-60); - } - else - { - $("#treecontent").css('height',screen.height-270); - $("#cbdivarea").css('height',screen.height-200); - } - $('#sidebar-wrapper').unbind('click'); $("#sidebar-wrapper").on('click', function (event) { @@ -79,6 +68,18 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ }); + $rootScope.ResetCBHeight=function() + { + var innerheight =$(window).innerHeight(); + $("#treecontent").css('height',innerheight-125); + $("#cbdivarea").css('height',innerheight-57); + + } + $rootScope.ResetCBListHeight=function() + { + var innerheight =$(window).innerHeight(); + $("#cblist").css('height',innerheight-110); + } $scope.CBDisableUI = function () { $rootScope.isLoading = true; @@ -155,13 +156,14 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } - $rootScope.firstSelectedNodeId = null; + //load json data $scope.loadCurriculumBuiderData = function () { if ($rootScope.refreshcheck == null) { $location.path('/'); - } + } + $rootScope.ResetCBListHeight(); //get current path var currentURL = $location.path(); var selectedModuleName = ''; @@ -700,7 +702,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.openCBJsPanel = function () { $scope.CBDisableUI(); $rootScope.isnewcurriculum = false; - + $rootScope.ResetCBHeight(); $('#jstree').empty(); var $e1 = $('
  • ' + '{{cbTreeFirstLabel}}' @@ -720,7 +722,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.openCBEditorPanel = function () { var jsContentURL = 'app/views/CBuild/curriculum-builder-TinyMCEjspanel.html'; - $.jsPanel({ + $scope.jsPanelCB = $.jsPanel({ id: 'CBTinyMCEPanel', selector: '.CBBodyView', theme: 'success', @@ -738,20 +740,34 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ draggable: "disabled", controls: { buttons: 'closeonly' }, size: { width: 820, height: 450 }, + onnormalized:function (panel) { + var canvasDIvHeight = $("#CBTinyMCEPanel .jsPanel-content").height(); + $("#cbEditorRightSideBar").css('height',canvasDIvHeight-35); + $(".tox-tinymce").css('height',canvasDIvHeight-52); + }, + resizable: { + minWidth: 610, + minHeight: 400, + start:function(event, ui) + { + $("#CBTextArea_ifr").css("display", "block"); + }, + stop: function (event, ui) { + var canvasDIvHeight = $("#CBTinyMCEPanel .jsPanel-content").height(); + $("#cbEditorRightSideBar").css('height',canvasDIvHeight-35); + $(".tox-tinymce").css('height',canvasDIvHeight-52); + + } + }, }); + $timeout(function () { - $rootScope.resetMenuOptionOnClick("CBTinyMCEPanel"); - $("#CBTinyMCEPanel").resize(function(){ - $("#CBTextArea_ifr").css("display", "block"); - }); - - // $('#CBTinyMCEPanel').draggable({ containment: '#cbdivarea', scroll: false }); - + $scope.jsPanelCB.normalize(); + $rootScope.resetMenuOptionOnClick("CBTinyMCEPanel"); }, 200); - } $scope.myeditorclick = function () { @@ -783,7 +799,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } - $scope.openTinyMCE = function (nodeid) { + $scope.openTinyMCE = function (nodeid) { if ($scope.Currentselectednodeid == undefined || $scope.Currentselectednodeid != nodeid) { $scope.CBDisableUI(); console.log("instance create for id : " + nodeid); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 75f1cb5..b921075 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -151,7 +151,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l 'totalstructureLm': 0, 'intervalObject': null, 'isannotationReload': false, - 'isCanvasReset': false + 'isCanvasReset': false, + 'keyctrl': false, }; return windata; @@ -409,20 +410,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }; - $scope.DisableUI = function () { + $scope.DisableDAUI = function (windowviewid) { //enable daBodyViewDiv which was disabled on thumbnail click so need not bother where to enable //as jspanel disable/enable is working for all features document.getElementById('daBodyview').style.pointerEvents = "auto"; document.getElementById('daBodyview').style.opacity = "1"; - - - var daImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < daImagePanelConetent.length; i++) { - daImagePanelConetent[i].style.pointerEvents = "none"; - daImagePanelConetent[i].style.opacity = "0.7"; - + var modulePanel = $("#daImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -432,25 +431,26 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#HomeContainerDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { + $scope.EnableDAUI = function (windowviewid) { document.getElementById('index').style.pointerEvents = "auto"; document.getElementById('index').style.opacity = "1"; - var daImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < daImagePanelConetent.length; i++) { - var dapanal=daImagePanelConetent[i].parentElement; - var panelpointevent = $("#"+ dapanal.id).css('pointer-events'); + var modulePanel = $("#daImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + var panelpointevent = $("#daImagePanel_"+windowviewid).css('pointer-events'); if(panelpointevent=="none") { //using for slide lock in cb - daImagePanelConetent[i].style.pointerEvents = "none"; + modulePanel[0].style.pointerEvents="none"; } else { - daImagePanelConetent[i].style.pointerEvents = "auto"; + modulePanel[0].style.pointerEvents="auto"; } - daImagePanelConetent[i].style.opacity = "1"; + + modulePanel[0].style.opacity="1"; } $rootScope.isLoading = false; @@ -531,7 +531,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { - $scope.EnableUI(); + $scope.EnableDAUI($rootScope.MULTI_VIEW_ID); $rootScope.disableAnnotationTB = false; $rootScope.MenuModuleName = "DA"; $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'currentViewTitle',$event.currentTarget.textContent); @@ -659,7 +659,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } ) - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); //push the details of open module in array $rootScope.openModules $rootScope.openModules.push({ "ModuleId": 1 }); } @@ -671,7 +671,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.DAModuleData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY"); if($scope.DAModuleData.length<1) return; $scope.ScopeVariablesDeclare(); - $scope.DisableUI(); + $scope.DisableDAUI(); $scope.readyToLoad=true; $rootScope.DAWindowLoadComplete = false; $scope.wincount=1; @@ -715,7 +715,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { $scope.ScopeVariablesDeclare(); - $scope.DisableUI(); + $scope.DisableDAUI(); $scope.openBodyView(null); } @@ -996,7 +996,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'maximised',true); $scope.SetwindowStoreData(windowviewid, 'minimised',false); - var extraheight=$('#dastickeyarea').height()+10; + var extraheight=$('#dastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -1030,7 +1030,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'minimised',false); $scope.SetwindowStoreData(windowviewid, 'maximised',false); - var extraheight=$('#dastickeyarea').height()+10; + var extraheight=$('#dastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -1056,7 +1056,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var pnlName=event.currentTarget.id; var len = (pnlName).split("_").length; var windowviewid = (pnlName).split("_")[len - 1]; - var extraheight=$('#dastickeyarea').height()+10; + var extraheight=$('#dastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height(); var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -1237,7 +1237,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } // we are loading most of alll data used in DA by this function so that at the time of any functionality delay in data laod will not happened. $scope.loadView = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); if (document.getElementById('daViewDA_'+windowviewid) != null) { $scope.loadDAView(bodyViewId, windowviewid); @@ -1481,13 +1481,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var la; var rootScope = angular.element(document.getElementById("bo")).scope(); rootScope.$apply(function () { - $scope.DisableUI(); + $scope.DisableDAUI(windviewid); }) var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); scope.$apply(function () { if ($scope.GetwindowStoreData(windviewid,'isTransparencyActivated')) { - $scope.EnableUI(); + $scope.EnableDAUI(windviewid); } la =$scope.GetwindowStoreData(windviewid,'totalLayers'); var slideVal = la - ui.value; @@ -1619,6 +1619,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $("#btnStrutureBox").attr("id", "btnStrutureBox_" + windowviewid); $scope.btnStrutureBoxID = "btnStrutureBox_" + windowviewid; + $("#multiannotation").attr("id", "multiannotation_" + windowviewid); + $("#typedTermName").attr("id", "typedTermName_" + windowviewid); $scope.typedTermNameID = "typedTermName_" + windowviewid; @@ -1798,7 +1800,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } } - $scope.EnableUI(); + $scope.EnableDAUI(e.data.winId); } @@ -2012,7 +2014,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l // Function to call CB term data $scope.loadDAonCBSlideChange = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.SetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem',false); $scope.SetwindowStoreData(windowviewid,'isbodySystemHighlight',false); @@ -2173,7 +2175,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //DA > Annotation's Line should not displayed. $('#bord_'+windowviewid).css("display", "none"); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); //redraw body of respective layer var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); @@ -2216,7 +2218,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //calculate coordinates for body region images $scope.CalculateImageCordinates = function (viewOrientationId,windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); // $scope.layerInfoForModesty = []; $scope.SetwindowStoreData(windowviewid,'layerInfoForModesty',[]); @@ -2239,7 +2241,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.BodyRegionCordinatesData = []; // create an empty array $scope.SetwindowStoreData(windowviewid,'BodyRegionCordinatesData',[]); - var extraheight=$('#dastickeyarea').height()+10; + var extraheight=$('#dastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -2500,7 +2502,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#canvasDivDA_' + windowviewid).scrollTop(50); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); //Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top. // #4976 :While changing gender male to female scroll bar is going on top. var canvasDiv = document.getElementById('canvasDivDA_' + windowviewid); @@ -2801,7 +2803,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var touchdragging = false; $scope.DrawMirroredImage = function (h, w, x, y, src, bodyRegionId, isMaskImage, windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var FlipedImgCanvas = document.createElement('canvas'); FlipedImgCanvas.height = h; @@ -2985,7 +2987,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var isHighLight=$scope.GetwindowStoreData(windowviewid,'isHighLight'); var isGenderChnage = $scope.GetwindowStoreData(windowviewid,'isGenderChnage'); @@ -3000,14 +3002,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else if ($scope.GetwindowStoreData(windowviewid, 'isExtract') == true) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.highLightBody(windowviewid); } else if (isHighLight == true || (isListManagerSelected == true) || ((isGenderChnage == true) && (isHighLight == true)) || ((isViewChange == true) && (isHighLight == true)) || isHighlightBodyByBodySystem == true) { $scope.SetwindowStoreData(windowviewid, 'isHighLight', true); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.highLightBody(windowviewid); if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true && isLexiconReload==false) { $scope.CalculateDimensionsAndDrawTBox(windowviewid); @@ -3023,7 +3025,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } //This block is executed when normal body is created and no further process like highlight,extract, etc - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } } @@ -3069,8 +3071,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#typedTermName_' + windowviewid).val(''); $("#typedTermName_" + windowviewid).attr("name", '0'); //birendra + var iskeyctrlActive= $scope.GetwindowStoreData(windowviewid, 'keyctrl');//for iPad // for mac os Command key use for multi selection - if (evt.ctrlKey || evt.metaKey) { + if (evt.ctrlKey || evt.metaKey || iskeyctrlActive) { $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',true); } else @@ -3271,7 +3274,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage, windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var imgCanvas = document.createElement('canvas'); @@ -3483,7 +3486,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var isHighLight=$scope.GetwindowStoreData(windowviewid,'isHighLight'); var isGenderChnage = $scope.GetwindowStoreData(windowviewid,'isGenderChnage'); @@ -3498,7 +3501,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else if (isExtract == true) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.highLightBody(windowviewid); } @@ -3507,7 +3510,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid,'isHighLight',true); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.highLightBody(windowviewid); if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true && isLexiconReload==false) { @@ -3524,7 +3527,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.ShowCBDataBodyView(windowviewid); } //This block is executed when normal body is created and no further process like highlight,extract, etc - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } } @@ -3568,8 +3571,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#typedTermName_' + windowviewid).val(''); $("#typedTermName_" + windowviewid).attr("name", '0'); //birendra + var iskeyctrlActive= $scope.GetwindowStoreData(windowviewid, 'keyctrl');//for iPad // for mac os Command key use for multi selection - if (evt.ctrlKey || evt.metaKey) { + if (evt.ctrlKey || evt.metaKey ||iskeyctrlActive) { $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',true); console.log('CTRL ON') @@ -4116,7 +4120,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'CanvasDivLeftPosition', $("#canvasDivDA_" + windowviewid).scrollLeft()); } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); ReturnMasData=[]; ExtractMasData=[]; @@ -4284,7 +4288,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }); } else { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } worker.onmessage = function (e) { @@ -4365,11 +4369,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#canvasDivDA_' + windowviewid).scrollLeft($scope.imageHorizontlScrollPosition); } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } else if (isHighlightBodyByBodySystem == true || isListManagerSelected == true) { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } else { @@ -4393,7 +4397,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); // terminate extract and term-number worker instances if ($scope.runningWorkers != null || $scope.runningWorkers != undefined) { @@ -4424,7 +4428,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l termSelectedName = "Skin"; } if (document.getElementById('txtLayerNumberDA_'+windowviewid).value == "Skin" || termSelectedName == "Skin") { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } }, 100); @@ -4436,7 +4440,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.isScrolledToHighlightedBR = false; //disable the background till the system gets highlighted. - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('disable'); @@ -4472,7 +4476,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.removeCurrentHighlightedBodySystem(windowviewid); $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); $rootScope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE; @@ -4678,13 +4682,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } } else { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); } }); $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } } @@ -4692,7 +4696,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l function (error) { console.log(' Error in getting term data = ' + error); $("#layerChangeSliderDA_" + windowviewid + '.vert_slider').slider('enable'); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); //remove existing data and draw fresh data $scope.removeCurrentHighlightedBodySystem(windowviewid); @@ -4750,7 +4754,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $timeout(function () { $scope.HighlightBodyByTermList(multiTermList,windowviewid); }, 50); } else { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } } @@ -4869,7 +4873,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //layer change function $scope.LayerChange = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $rootScope.CloseListManager(); $scope.isLayerChange = true; @@ -5007,7 +5011,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } }) @@ -5026,7 +5030,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid,'currentLayerNumber',parseInt($('#txtLayerNumberDA_' + windowviewid).val())); } - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var canDiv = document.getElementById('canvasDivDA_' + windowviewid); if($rootScope.globalSetting.onLayerChange) { @@ -5143,7 +5147,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } $('layerChangeSlider').slider().on('slideStop', function (ev) { @@ -5165,6 +5169,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationNotForTBox, tipx, tipy,windowviewid, termNumber) { var termNumber=parseInt(termNumber); + var iskeyctrlActive= $scope.GetwindowStoreData(windowviewid, 'keyctrl');//for iPad if (isAnnotationNotForTBox == true) { if ($scope.MultiLanguageAnnationArray.length > 1) { $scope.longestAnnotation = $scope.MultiLanguageAnnationArray.reduce(function (firstAnnotation, seconAnnotation) { return firstAnnotation.length > seconAnnotation.length ? firstAnnotation : seconAnnotation; }); @@ -5176,8 +5181,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //1. In transparency box we shows two annotation at a time, so we need to decide the max length of annotation in btween two annotation because based on that // we decide the size of speech bubble //2. - - if (event.ctrlKey || event.metaKey || event == "CBAnnotation") { + + if (event.ctrlKey || event.metaKey || event == "CBAnnotation" || iskeyctrlActive) { console.log('ctrl pressed'); $scope.SetwindowStoreData(windowviewid,'multiAnnotationIsON',true); //2.1 create unique speech bubbles @@ -5454,7 +5459,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l else { $scope.longest_annotationT1 = $scope.annotationTextArrayT1.reduce(function (a, b) { return a.length > b.length ? a : b; }); $scope.longest_annotationT2 = $scope.annotationTextArrayT2.reduce(function (a, b) { return a.length > b.length ? a : b; }); - if (event.ctrlKey || event.metaKey || event == "CBAnnotation") { + if (event.ctrlKey || event.metaKey || event == "CBAnnotation" ||iskeyctrlActive) { $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true); @@ -6410,7 +6415,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $('#btnTranparency_' + windowviewid).removeClass('btn-black'); $('#btnTranparency_' + windowviewid).addClass('tButtonActive'); @@ -6742,7 +6747,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l else { //when user draw TB outside body than no bodyRegion //is covred and nothing is drawn so the function is not called in which we are enabling UI - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } }) @@ -7019,7 +7024,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l else { //when user draw TB outside body than no bodyRegion //is covred and nothing is drawn so the function is not called in which we are enabling UI - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } }) @@ -7833,7 +7838,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', true); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); $scope.SetwindowStoreData(windowviewid, 'isZoomed',false); } @@ -8153,8 +8158,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var windowviewid = (evt.currentTarget.id).split("_")[len-1]; var pixelData; var pixelDataTrans; - - if (evt.ctrlKey || evt.metaKey) { + var iskeyctrlActive= $scope.GetwindowStoreData(windowviewid, 'keyctrl');//for iPad + if (evt.ctrlKey || evt.metaKey || iskeyctrlActive) { $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true); } else @@ -8375,7 +8380,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.UnsaveCurriculum = true; var len= (evt.target.id).split("_").length; var windowviewid = (evt.target.id).split("_")[len-1]; - if (evt.ctrlKey || evt.metaKey) { + var iskeyctrlActive= $scope.GetwindowStoreData(windowviewid, 'keyctrl');//for iPad + if (evt.ctrlKey || evt.metaKey ||iskeyctrlActive) { $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON', true); } else @@ -9207,10 +9213,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.enableZoom = function (event) { - $scope.DisableUI(); $rootScope.UnsaveCurriculum = true; var len = (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len-1]; + var windowviewid = (event.currentTarget.id).split("_")[len-1]; + $scope.DisableDAUI(windowviewid); $("#OnIdentify").removeClass("annotationtoolbartab"); $("#DrawMode").removeClass("annotationtoolbartab"); $('.btnCursor').removeClass('activebtncolor'); @@ -9259,12 +9265,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid,'zoomInOut',25); $('#zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut')); } + $('#canvasDA_' + windowviewid).removeLayers();//remove all old shape + //var sktch = $("#canvasPaintDA_" + windowviewid).sketch(); + $("#canvasPaintDA_" + windowviewid).sketch().actions = [];//remove old paint data var canDiv = document.getElementById('canvasDivDA_' + windowviewid); var canDivChildCount = canDiv.childElementCount; if (canDivChildCount > 0) { canDiv.innerHTML = ''; } + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); @@ -9285,7 +9295,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.flushCanvas = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); var endIndex = 0; var startIndex = 0; @@ -9362,7 +9372,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid, 'mode', "HIGHLIGHT"); $scope.SetwindowStoreData(windowviewid, 'isHighlightlBtnClicked', true); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $('#btnTranparency_' + windowviewid).removeAttr('disabled', 'disabled'); @@ -9426,7 +9436,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#canvasDivDA_' + windowviewid).scrollTop(CanvasDivTopPosition); $('#canvasDivDA_' + windowviewid).scrollLeft(CanvasDivLeftPosition); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } $scope.enableNormalMode = function (windowviewid) { @@ -9520,9 +9530,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.enableExtract = function (isCalledFromButton,windowviewid) { $scope.SetwindowStoreData(windowviewid, 'mode', "EXTRACT"); - $scope.DisableUI(); - - console.log('isCalledFromButton= ' + isCalledFromButton); + $scope.DisableDAUI(windowviewid); var CanvasDivLeftPosition = $scope.GetwindowStoreData(windowviewid, 'CanvasDivLeftPosition'); var CanvasDivTopPosition = $scope.GetwindowStoreData(windowviewid, 'CanvasDivTopPosition'); @@ -9605,7 +9613,26 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); + } + + $scope.MultipleAnnotation = function (event) { + var len= (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len-1]; + + //set true to false or vice versa + var iskeyctrlActive= $scope.GetwindowStoreData(windowviewid, 'keyctrl'); + + if(iskeyctrlActive) + { + $("#multiannotation_"+windowviewid).addClass("disableMultiAnnotationText"); + } + else + { + $("#multiannotation_"+windowviewid).removeClass("disableMultiAnnotationText"); + } + + $scope.SetwindowStoreData(windowviewid, 'keyctrl', !iskeyctrlActive); } $scope.enableShowHideStructureBox = function (event) { @@ -9767,7 +9794,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if (colorMode != undefined || colorMode != null) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var zeroPoint = new Point(); DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); @@ -9873,13 +9900,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var isListManagerAlreadySelected = $scope.GetwindowStoreData(windowviewid, 'isListManagerAlreadySelected'); var isLexiconReload= $scope.GetwindowStoreData(windowviewid, 'isannotationReload'); if (((isHighlightBodyByBodySystem == true)) || (isbodySystemHighlight == true && isHighLight == true)) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $timeout(function () { $scope.HighlightBodyByTermListForBodySystem(null, windowviewid) }, 100); } else if (($rootScope.isCallFromOtherModule == true)||isLexiconReload==true || (isListManagerSelected == true) || (previousHighlightList != null && previousHighlightList.length > 0) && (isGenderChnage == true || isViewChange == true) || isListManagerAlreadySelected == true) { $timeout(function () { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); if (AllTerms != undefined && AllTerms.length > 0) { $scope.HighlightBodyByTermList(AllTerms, windowviewid); } @@ -9897,7 +9924,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.createTermListByPreviousTermsAndHighlight(windowviewid); } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } }, 500); @@ -9909,7 +9936,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //for highlight when highlight button is clicked the ui got disabled, //now highlight is completed so enalbe UI - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } @@ -9928,7 +9955,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l console.log('1. $rootScope.isExtract=true and previousHighlightList != null') $timeout(function () { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.HighlightBodyOnExtract(windowviewid) }, 50); } @@ -9936,7 +9963,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') $timeout(function () { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.HighlightBodyOnExtract(windowviewid) }, 50); @@ -9945,7 +9972,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.HighlightBodyByTermListForBodySystem(null, windowviewid); } else { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } } } @@ -10021,7 +10048,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l console.log('colorMode inside else = ' + colorMode); if (colorMode != undefined || colorMode != null) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var zeroPoint = new Point(); DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); @@ -10089,7 +10116,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l console.log('2. $rootScope.isExtract=true and previousHighlightList != null, previousHighlightList.length= ' + previousHighlightList.length) $timeout(function () { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.HighlightBodyOnExtract(windowviewid) }, 50); @@ -10097,7 +10124,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l else if (isListManagerSelected == true) { console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') $timeout(function () { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.HighlightBodyOnExtract(windowviewid) }, 50); @@ -10107,12 +10134,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else if ($rootScope.isCallFromOtherModule && AllTerms.length > 0) { $timeout(function () { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.HighlightBodyOnExtract(windowviewid) }, 50); } else { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } } @@ -10223,7 +10250,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l return; } - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $rootScope.UnsaveCurriculum = true; var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid); $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; @@ -10253,12 +10280,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $rootScope.CloseListManager(); + $('#canvasDA_' + windowviewid).removeLayers();//remove all old shape + //var sktch = $("#canvasPaintDA_" + windowviewid).sketch(); + $("#canvasPaintDA_" + windowviewid).sketch().actions = [];//remove old paint data + var canDiv = document.getElementById('canvasDivDA_' + windowviewid); var canDivChildCount = canDiv.childElementCount; if (canDivChildCount > 0) { canDiv.innerHTML = ''; } - + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); //canvas is clear in search term,layer change,viewchange here. so annotationData should also clear $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); @@ -10292,7 +10323,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //2 first update the currentbodyviewid in local storage localStorage.setItem("currentBodyViewId", currentBodyViewId); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); //3. update gender local storage if (!$rootScope.isCallFromOtherModule) { localStorage.setItem("currentGenderValue", 'Male'); @@ -10329,7 +10360,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //2. first update the currentbodyviewid in local storage localStorage.setItem("currentBodyViewId", currentBodyViewId); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); //3. update gender local storage if (!$rootScope.isCallFromOtherModule) { @@ -10376,7 +10407,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.loadBodyViewChangedBySetting = function (windowviewid, isLexiconChange) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.LoadImageToExport(windowviewid); var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); var timeintval=$scope.GetwindowStoreData(windowviewid,'intervalObject'); @@ -10394,7 +10425,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if (vocabTermDataArray!=null) { var intval=$scope.GetwindowStoreData(panid,'intervalObject'); $scope.stopVocab(intval); - $scope.langSearchLoad(windowviewid); + $scope.langSearchLoad(panid); //loading da for selected panel $scope.CalculateImageCordinates(viewOrientationId, panid); @@ -10404,13 +10435,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var winid = (selectedPanel).split("_")[1]; if(winid==panid) { - $scope.DisableUI(); + $scope.DisableDAUI(panid); $rootScope.dalistManagerEvent(panid); } } if ($scope.GetwindowStoreData(panid,'isSearchClicked')) { - $scope.DisableUI(); + $scope.DisableDAUI(panid); if ($('#searchTermListUl_' + panid).html() != "") { $('#searchTermListUl_' + panid).empty(); } @@ -10452,12 +10483,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.loadSelectedBodyView(currentBodyViewId,windowviewid); $timeout(function () { if ($rootScope.isListManagerMenuSelected) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $rootScope.dalistManagerEvent(windowviewid) } if ($scope.GetwindowStoreData(windowviewid,'isSearchClicked')) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); if ($('#searchTermListUl_' + windowviewid).html() != "") { $('#searchTermListUl_' + windowviewid).empty(); } @@ -10568,7 +10599,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]); } $rootScope.UnsaveCurriculum = true; - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.SetwindowStoreData(windowviewid,'isViewChange',true); var canvasDiv = document.getElementById("canvasDivDA_" + windowviewid); @@ -10618,12 +10649,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $("#btnHighLight_" + windowviewid).addClass("btn-primary"); } + $('#canvasDA_' + windowviewid).removeLayers();//remove all old shape + //var sktch = $("#canvasPaintDA_" + windowviewid).sketch(); + $("#canvasPaintDA_" + windowviewid).sketch().actions = [];//remove old paint data + //remove existing body view var canDiv = document.getElementById("canvasDivDA_" + windowviewid); var canDivChildCount = canDiv.childElementCount; if (canDivChildCount > 0) { canDiv.innerHTML = ''; } + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); //canvas is clear in search term,layer change,viewchange here. so annotationData should also clear $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); @@ -10641,7 +10677,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else $scope.SetwindowStoreData(windowviewid,'voId',selectedViewId); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var bodyVid= $scope.GetwindowStoreData(windowviewid,'voId') @@ -10672,7 +10708,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l selectedViewId = $scope.correspondingBodyViewIds[selectedViewId]; if ($scope.GetwindowStoreData(windowviewid,'voId') != selectedViewId) { $scope.SetwindowStoreData(windowviewid,'voId',selectedViewId); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); //1. @@ -10722,7 +10758,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //Reload DA controller Body View after setting Change $rootScope.reloadDABodyViewEvent = function (bodyViewId,isLexiconChange, windowviewid) { - //console.log('reloadDABodyViewEvent'); $scope.SetwindowStoreData(windowviewid,'isGlobalSettingChanged',true); if ($rootScope.isSettingEventAlredayDispachted == true) { $rootScope.isSettingEventAlredayDispachted = false; // define at home controller @@ -10854,7 +10889,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); $scope.SetwindowStoreData(windowviewid,'isExtract',false); $("#structureDropdownDA_" + windowviewid).toggle(); - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $scope.SetwindowStoreData(windowviewid,'isListManagerSelected',false); $rootScope.CloseListManager(); @@ -10868,7 +10903,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.removeCurrentHighlightedBodySystem(windowviewid); $scope.SetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem',false); $scope.SetwindowStoreData(windowviewid,'isbodySystemHighlight',false); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } else { @@ -10906,7 +10941,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } var isHighlightBodyByBodySystem=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem'); if (($scope.isAlreadyHighlighted == true && isHighlightBodyByBodySystem == true)) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $timeout(function () { $scope.HighlightBodyByTermListForBodySystem(null, windowviewid) }, 100); } } @@ -11153,7 +11188,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //event remove it fire multiple time $rootScope.dalistManagerEvent = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $('#bodySystems').empty(); $("#bodySystems").css("display", "block"); $("#AABodySystems").css("display", "none"); @@ -11199,14 +11234,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l // primar language var lanName=languageArray[0].language; $scope.loadListManger(windowviewid,lanName,totalstructure); - - $rootScope.islistManagerEventAlredayDispachted = false; - $scope.EnableUI(); - } $rootScope.changeLanguageLmEvent = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $('#termList').empty(); var totalstructure=0; $scope.SetwindowStoreData(windowviewid,'totalstructure',0); @@ -11246,7 +11277,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $rootScope.LoadMoreLmEvent = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); var langId = $("#selectLanguageLm option:selected").val(); var totalstructure = $scope.GetwindowStoreData(windowviewid, 'totalstructureLm'); @@ -11326,15 +11357,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#btlLoadMoreLm').attr('disabled', 'disabled'); } - $scope.EnableUI(); - + $scope.EnableDAUI(windowviewid); } $rootScope.refreshTermListOnSystemSelection = function (selectedBodysystemId) { var windowviewid = (selectedBodysystemId).split("_")[1]; var bodysystemId = (selectedBodysystemId).split("_")[0]; - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $("#bodySystems").find("option:not(:disabled)").css({ "background-color": "#ffffff", "color": "#000000" }); $("#bodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); @@ -11462,7 +11492,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } @@ -11490,10 +11520,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l // Terms search in the Search list should be disable in the List Manager and Vice-Versa. var prevId=$scope.GetwindowStoreData(windowviewid,'prevId'); if (prevId == actualTermNumber) { - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } else { - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); // clear previousHighlightList and Terms and false multiAnnotation $scope.SetwindowStoreData(windowviewid, 'fullTermlist', []); @@ -11633,13 +11663,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#layerChangeSliderDA_' + windowviewid).slider("option", "value", sliderVal); + $('#canvasDA_' + windowviewid).removeLayers();//remove all old shape + //var sktch = $("#canvasPaintDA_" + windowviewid).sketch(); + $("#canvasPaintDA_" + windowviewid).sketch().actions = [];//remove old paint data + //remove existing body view var canDiv = document.getElementById('canvasDivDA_' + windowviewid); var canDivChildCount = canDiv.childElementCount; if (canDivChildCount > 0) { canDiv.innerHTML = ''; } - + + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); //9. //canvas is clear in search term,layer change,viewchange here. so annotationData should also clear $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); @@ -11656,7 +11691,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#dot_'+windowviewid).css("display", "none"); //DA > Annotation's Line should not displayed. $('#bord_'+windowviewid).css("display", "none"); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); //redraw body of respective layer var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); @@ -11789,7 +11824,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.SetwindowStoreData(windowviewid,'CanvasDivLeftPosition',$('#canvasDivDA_' + windowviewid).scrollLeft()); $scope.SetwindowStoreData(windowviewid,'CanvasDivTopPosition',$('#canvasDivDA_' + windowviewid).scrollTop()); - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } $scope.scaleValue = function (nValue, nNewZoom, nExistingZoom) { @@ -12047,7 +12082,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var len= (event.currentTarget.id).split("_").length; var windowviewid = (event.currentTarget.id).split("_")[len-1]; - $scope.DisableUI(); + $scope.DisableDAUI(windowviewid); $('#searchedTermListPopUp_' + windowviewid).css({ 'background': '#fff', 'border-radius': '3px', @@ -12131,9 +12166,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.changeLanguageList = function (event) { - $scope.DisableUI(); var len= (event.currentTarget.id).split("_").length; var windowviewid = (event.currentTarget.id).split("_")[len-1]; + + $scope.DisableDAUI(windowviewid); if ($('#searchTermListUl_' + windowviewid).html() != "") { $('#searchTermListUl_' + windowviewid).empty(); } @@ -12168,9 +12204,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.LoadMore = function (event) { - $scope.DisableUI(); var len= (event.currentTarget.id).split("_").length; var windowviewid = (event.currentTarget.id).split("_")[len-1]; + + $scope.DisableDAUI(windowviewid); var totalstructure = $scope.GetwindowStoreData(windowviewid, 'totalstructure'); setTimeout(function () { @@ -12250,7 +12287,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }); } - $scope.EnableUI(); + $scope.EnableDAUI(windowviewid); } @@ -12346,6 +12383,14 @@ function enableShowHideStructureBox(event) { }); } +function keyControlDAActive(event) { + console.log('OnBodySystem chnaged is called outside '); + var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); + scope.$apply(function () { + scope.MultipleAnnotation(event); + }); +} + function OnSearch(event) { console.log('Show Search is called outside '); @@ -12445,9 +12490,9 @@ function onDrawingCanvasTouchMove(event) { function OnZoom(event) { var scope = angular.element(document.getElementsByClassName("daBodyView")).scope(); - scope.DisableUI(); var len= (event.currentTarget.id).split("_").length; var windowviewid = (event.currentTarget.id).split("_")[len-1]; + scope.DisableDAUI(windowviewid); if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928 $(".btn-annotation").removeClass("activebtncolor"); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 2625421..5a037b5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -41,7 +41,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $rootScope.isModestyOn; $rootScope.isModestyOff; - $rootScope.SetSettingActiveTab; $("#annotationButton").addClass("disableMenuoption"); $("#Menuoptionid").addClass("disableMenuoption"); $rootScope.menuLabExer; @@ -299,18 +298,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data parentslag = "lab-exercise-view"; openNewlink = "lab-exercises"; } - var newpanelWidth=0; - var newpanelHeight=0; - var newpanelLeft=0; - var $ua = navigator.userAgent; - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { - newpanelWidth=screen.width; - newpanelHeight=screen.height; - } - else{ - newpanelWidth=screen.width-10; - newpanelHeight=screen.height-185; - } + var innerWidth =$(window).innerWidth()-10; + var innerheight =$(window).innerHeight()-40; + $.jsPanel({ id: 'dvOpenResourcePanel', selector: '#dvOpenResoucePanel', @@ -318,7 +308,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data currentController: 'HomeController', parentSlug: parentslag, content: '
    ' + - '', + '', title: "", position: { top: 1, @@ -328,8 +318,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data draggable: "disabled", size: { - width: newpanelWidth, - height: newpanelHeight + width: innerWidth, + height: innerheight + }, + resizable: { + minWidth: 770, + minHeight: 770, + start:function(event, ui) + { + $("#OpenModuleInCB").css("display", "block"); + }, + stop: function (event, ui) { + // var canvasDIvHeight = $("#CBTinyMCEPanel .jsPanel-content").height(); + + } }, }); @@ -367,9 +369,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $(head).append(css); // $(head).append(storefunc); - var canvasDIvHeight = $("#dvOpenResourcePanel .jsPanel-content").height(); - $('#OpenModuleInCB').css('height', canvasDIvHeight); - $timeout(function () { console.log('frame content loding delayed......'); $scope.loadopenresourceContent(head, iframe); @@ -2567,6 +2566,24 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } } } + $rootScope.openresourcePanelPosition=function() + { + if(document.getElementById("dvOpenResourcePanel") ) { + var innerWidth =$(window).innerWidth()-10; + var innerheight =$(window).innerHeight()-40; + + $("#OpenModuleInCB").css('height',innerheight); + $("#dvOpenResourcePanel .jsPanel-hdr .jsPanel-title").css('width','300px'); + + $("#dvOpenResourcePanel").css('height',innerheight); + $("#dvOpenResourcePanel").css('width',innerWidth); + + $("#dvOpenResourcePanel .jsPanel-content").css('height',innerheight); + $("#dvOpenResourcePanel .jsPanel-content").css('width',innerWidth); + + } + + } $(document).ready(function () { @@ -2581,6 +2598,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data clearTimeout(window.resizedFinished); window.resizedFinished = setTimeout(function(){ console.log('Resized finished.'); + $rootScope.openresourcePanelPosition(); if($location.url()!= "/curriculum-builder-detail") { var moduleImagePanel = $("div[id*='ImagePanel']"); @@ -2606,6 +2624,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data if(($location.url()== "/tile-view-list") ||($location.url()== "/clinical-illustrations")||($location.url()== "/clinical-animations")||($location.url()== "/ADAM-images")||($location.url()== "/ADAM-on-demand")) { $rootScope.ResetGridListLength(); } + + if($location.url()== "/curriculum-builder") + { + $rootScope.ResetCBListHeight(); + } + else if($location.url()== "/curriculum-builder-detail" ) + { + $rootScope.ResetCBHeight(); + } }, 300); } @@ -2732,7 +2759,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data else if ($location.url() == "/module-item-view") { $("#annotationButton").removeClass("disableMenuoption"); $("#Menuoptionid").removeClass("disableMenuoption"); - $("#optiontSetting").addClass("disableSubMenu"); + // $("#optiontSetting").addClass("disableSubMenu"); $("#labExPdfOption").addClass("disableSubMenu"); $("#annotationToolBarOptions").removeClass("disableSubMenu"); $("#fileMenuAnchor").removeClass("disableFileMenu"); @@ -3463,6 +3490,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $("#annotationButton").removeClass("disableMenuoption"); $("#Menuoptionid").removeClass("disableMenuoption"); $("#annotationToolBarOptions").removeClass("disableSubMenu"); + $("#optiontSetting").removeClass("disableSubMenu"); $("#listManagerBody *").prop('disabled',false); @@ -4292,6 +4320,40 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data // Dissectible Anatomy > Settings should be disable if Annotation is Open. $rootScope.ShowSettingWindow = function () { + + $('#tabdissectible').removeAttr('disabled'); + var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); + if (modulePanel != undefined && modulePanel.length>0) { + var isdapanel=false; + var isaapanel=false; + for (var index = 0 ; index < modulePanel.length; index++) { + var paneld = modulePanel[index].id; + if(paneld.match("daImagePanel")) + { + isdapanel=true; + } + else if(paneld.match("AAImagePanel")) + { + isaapanel=true; + } + } + + if(isdapanel && isaapanel) + { + $rootScope.SettingsTab = 2; + } + else if(isdapanel) + { + $rootScope.SettingsTab = 3; + } + else if(isaapanel) + { + $('#tabdissectible').attr('disabled', 'disabled'); + $rootScope.SettingsTab = 2; + } + + } + if ($("#annotationTollbar").css("display") == "block") { $('#modal-settings').css("display", "none"); $("#modelsettingsbackground").css("display", "none"); @@ -4302,7 +4364,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $('#modal-settings').css("display", "block"); $("#modelsettingsbackground").css("display", "block"); } - + $rootScope.lexiconLanguageArrayLength = $rootScope.lexiconLanguageArray.length; $rootScope.lexiconPrimaryLanguage = $("#primarylaxican").val(); $rootScope.primaryLangID = $('#primarylaxican').attr("name"); @@ -8802,7 +8864,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } else if(selectedPanel.match("AAImagePanel")) { - onSearchItemSelection($('#termList option[selected="selected"]').attr("id")); + onSearchItemSelection($('#termList option[selected="selected"]').attr("id"),true); } } @@ -8863,7 +8925,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data $("#langaugeDivLm").css("display", "none"); $rootScope.aalistManagerEvent(windowviewid); - $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onSearchItemSelection(this.options[this.selectedIndex].id)"); + $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onSearchItemSelection(this.options[this.selectedIndex].id,true)"); } var modulePanel = $("#HomeContainerDiv").find("div[id*='daImagePanel']"); if (modulePanel != undefined && modulePanel.length>0) { @@ -8932,6 +8994,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data { var windowviewid=selectedPanel.split('_')[1]; $rootScope.changeLanguageLmEvent(windowviewid); + } + else if(selectedPanel.match("AAImagePanel")) + { + var windowviewid=selectedPanel.split('_')[1]; + $rootScope.changeLanguageLmEventAA(windowviewid); } } @@ -8942,23 +9009,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data { var windowviewid=selectedPanel.split('_')[1]; $rootScope.LoadMoreLmEvent(windowviewid); - } - } - - - function fillListManagerTerms() { - - var len = $rootScope.openModules.length; - var openViewLen = $rootScope.openViews.length; - - var currentOpenModuleId = $rootScope.openModules[len - 1].ModuleId; - var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId; - if (currentOpenModuleId == 1) { - } - + else if(selectedPanel.match("AAImagePanel")) + { + var windowviewid=selectedPanel.split('_')[1]; + $rootScope.LoadMoreLmEventAA(windowviewid); + } } + //setrtings $rootScope.SetSettingActiveTab = function (tabToSet) { $rootScope.SettingsTab = tabToSet; @@ -9011,6 +9070,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data //4. $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity); + //disable appreance tab still no use of it + $('#tabappearance').attr('disabled', 'disabled'); + }; @@ -9381,6 +9443,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data var currentOpenViewId=$rootScope.GetDAwindowData(MultiWinId,"voId"); $rootScope.reloadDABodyViewEvent(currentOpenViewId,isLexiconChange,MultiWinId); } + if(paneld.match("AAImagePanel")) + { + var len = (paneld).split("_").length; + var MultiWinId = (paneld).split("_")[len - 1]; + $rootScope.reloadAABodyViewEvent(isLexiconChange,MultiWinId); + } } } }; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js index 233d8ac..ea1b814 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js @@ -103,14 +103,15 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, } } - $scope.DisableUI = function () { - - var leImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < leImagePanelConetent.length; i++) { - leImagePanelConetent[i].style.pointerEvents = "none"; - leImagePanelConetent[i].style.opacity = "0.7"; + $scope.DisableLabUI = function (windowviewid) { + var modulePanel = $("#labImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -119,12 +120,12 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $('#HomeContainerDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { - - var leImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < leImagePanelConetent.length; i++) { - leImagePanelConetent[i].style.pointerEvents = "auto"; - leImagePanelConetent[i].style.opacity = "1"; + $scope.EnableLabUI = function (windowviewid) { + var modulePanel = $("#labImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } $rootScope.isLoading = false; @@ -167,7 +168,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $scope.initializeLEWindowData($rootScope.MULTI_VIEW_ID, true, undefined); - $scope.DisableUI(); + $scope.DisableLabUI($rootScope.MULTI_VIEW_ID); //get current path var currentURL = $location.path(); @@ -204,10 +205,10 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, function (result) { $scope.LabExerciseModulesList = result; $scope.SetLEwindowStoreData(windowviewid, 'LabExerciseModulesList', result); - $scope.EnableUI(); + $scope.EnableLabUI(windowviewid); }, function (error) { - $scope.EnableUI(); + $scope.EnableLabUI(windowviewid); console.log(error.statusText) } ) @@ -255,7 +256,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, if ($rootScope.isCallFromOtherModule) { $scope.LEModuleData = ModuleService.getModuleData("LAB_EXERCISE"); if($scope.LEModuleData.length<1) return; - $scope.DisableUI(); + $scope.DisableLabUI(); $scope.readyToLoad = true; $rootScope.LEWindowLoadComplete = false; $scope.wincount = 1; @@ -293,7 +294,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, } else { - $scope.DisableUI(); + $scope.DisableLabUI(); $scope.InitializeLabExercise(null); } } @@ -547,14 +548,14 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, else { $scope.GetQuizByTopic(windowviewid); } - $scope.DisableUI(); + $scope.DisableLabUI(windowviewid); },300) }, function (error) { console.log('error in getting save ddata'); - $scope.DisableUI(); + $scope.DisableLabUI(windowviewid); } ) @@ -705,7 +706,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $scope.GetQuizByTopic = function (windowviewid) { - $scope.DisableUI(); + $scope.DisableLabUI(windowviewid); $('.jsPanel-content').css('font-size', '14px'); @@ -850,7 +851,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $scope.SetLEwindowStoreData(windowviewid, 'isResetClicked', false); } } - $scope.EnableUI(); + $scope.EnableLabUI(windowviewid); if ($rootScope.isCallFromOtherModule) { $rootScope.LEWindowLoadComplete = true; } @@ -1577,7 +1578,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $rootScope.UnsaveCurriculum = true; } - $scope.DisableUI(); + $scope.DisableLabUI(windowviewid); var quiznumber = $scope.GetLEwindowStoreData(windowviewid, 'quiznumber'); $scope.CreateLabExerciseDataToSave(windowviewid, quiznumber); @@ -1600,7 +1601,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, LabExerciseService.saveLabExerciseAttempt(labExerciseAttempt) .then( function (result) { - $scope.EnableUI(); + $scope.EnableLabUI(windowviewid); $scope.SetLEwindowStoreData(windowviewid, 'isLabExChanged', false); //saved successfully.variable name is not correct but errorMessage represnts message if (!$rootScope.isCallFromOtherModule) { @@ -1611,9 +1612,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, }, function (error) { - - $scope.EnableUI(); - + $scope.EnableLabUI(windowviewid); console.log(' Error in saving lab exercise = ' + error.statusText); $rootScope.isVisibleLogin = true; $('#errorMessage').text(error); @@ -2097,7 +2096,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, else { $("#imgdiv_" + windowviewid).css("position", "relative"); } - $scope.EnableUI(); + $scope.EnableLabUI(windowviewid); }, 500); } @@ -2120,7 +2119,7 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, $("#quizSubmitBtn_" + windowviewid).css("display", "none"); } - $scope.EnableUI(); + $scope.EnableLabUI(windowviewid); } $scope.SendLabEXMailToUser = function ($event) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js index 787c4d5..9df39d6 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js @@ -80,13 +80,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $scope.DisableUI = function () { - - var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < aniImagePanelConetent.length; i++) { - aniImagePanelConetent[i].style.pointerEvents = "none"; - aniImagePanelConetent[i].style.opacity = "0.7"; - + $scope.DisableVideoUI = function (windowviewid) { + var modulePanel = $("#vidImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -96,12 +95,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#HomeContainerDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { - - var aniImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < aniImagePanelConetent.length; i++) { - aniImagePanelConetent[i].style.pointerEvents = "auto"; - aniImagePanelConetent[i].style.opacity = "1"; + $scope.EnableVideoUI = function (windowviewid) { + var modulePanel = $("#vidImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } $rootScope.isLoading = false; @@ -159,7 +158,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($rootScope.isCallFromOtherModule) { $scope.VideoModuleData = ModuleService.getModuleData("MY_ANIMATIONS"); if($scope.VideoModuleData.length<1) return; - $scope.DisableUI(); $scope.readyToLoad = true; $rootScope.VideoLoadComplete = false; $scope.wincount = 1; @@ -203,6 +201,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.VidOpenInOtherModules = vidModuleData; $rootScope.MULTI_VIEW_ID += 1; var windowviewid = $rootScope.MULTI_VIEW_ID; + $scope.DisableVideoUI(windowviewid); $scope.initializeVideoWindowData(windowviewid, false, $scope.VidOpenInOtherModules.currentWindowId); @@ -244,7 +243,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $scope.loadMyAnimation = function (windowviewid) { - $scope.DisableUI(); $scope.jsPanelID = 'vidImagePanel' + '_' + windowviewid; var tittle = $scope.GetVideowindowStoreData(windowviewid, 'currentViewTitle'); var animationSource = $scope.GetVideowindowStoreData(windowviewid, 'videoSource'); @@ -446,11 +444,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.MyvideoOnLoad = function (windowviewid) { - $scope.EnableUI(); - if ($rootScope.isCallFromOtherModule) { - $rootScope.VideoLoadComplete = true; - } - $scope.JsPanelclick(windowviewid); + + if ($rootScope.isCallFromOtherModule) { + $rootScope.VideoLoadComplete = true; + } + $scope.JsPanelclick(windowviewid); + + $scope.EnableVideoUI(windowviewid); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js index 2c81dcd..92faff6 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js @@ -94,14 +94,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } } - $scope.DisableUI = function () { - - var myImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < myImagePanelConetent.length; i++) { - myImagePanelConetent[i].style.pointerEvents = "none"; - myImagePanelConetent[i].style.opacity = "0.7"; + $scope.DisablePicUI = function (windowviewid) { + var modulePanel = $("#picImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -110,14 +111,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#CBDetailPageDiv').css('opacity', '0.7'); } - $scope.EnableUI = function () { + $scope.EnablePicUI = function (windowviewid) { - var myImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < myImagePanelConetent.length; i++) { - myImagePanelConetent[i].style.pointerEvents = "auto"; - myImagePanelConetent[i].style.opacity = "1"; + var modulePanel = $("#picImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } - $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); // CB module enable all @@ -164,7 +165,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($rootScope.isCallFromOtherModule) { $scope.PicModuleData = ModuleService.getModuleData("MY_PICTURES"); if($scope.PicModuleData.length<1) return; - $scope.DisableUI(); $scope.readyToLoad = true; $rootScope.PicLoadComplete = false; $scope.wincount = 1; @@ -205,10 +205,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $scope.OpenPictureView = function (picModuleData) { - $scope.picOpenInOtherModules = picModuleData; $rootScope.MULTI_VIEW_ID += 1; var windowviewid = $rootScope.MULTI_VIEW_ID; + $scope.DisablePicUI(windowviewid); $scope.initializePICWindowData(windowviewid, false, $scope.picOpenInOtherModules.currentWindowId); @@ -474,7 +474,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData); } } - $scope.EnableUI(); + $scope.EnablePicUI(windowviewid); $rootScope.PicLoadComplete = true; } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 86ba36c..1df8726 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -1,7 +1,7 @@ 'use strict'; -AIA.controller("TileViewListController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "DataService", "ModuleService","$interval", -function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, BodyRegions, BodySystems, ViewOrientations, ImageTypes, DataService, ModuleService, $interval) { +AIA.controller("TileViewListController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "BodyRegions", "BodySystems", "ViewOrientations", "ImageTypes", "DataService", "ModuleService","$interval","$filter", +function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, BodyRegions, BodySystems, ViewOrientations, ImageTypes, DataService, ModuleService, $interval, $filter) { $scope.AllBodyRegion = []; $scope.AllBodySystem = []; @@ -105,6 +105,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou 'navigatorImage':"", 'showHideAnnotations': 'showAnnotationText', 'annotationData':{shapeStates:[],paintCanvasState:[]}, + 'totalstructure': 0, + 'totalstructureLm': 0, + 'intervalObject': null, + 'SearchTimeStampValue': 0, + 'keyctrl': false, }; return windata; @@ -182,30 +187,33 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } } - $scope.DisableUI = function () { - - var daImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < daImagePanelConetent.length; i++) { - daImagePanelConetent[i].style.pointerEvents = "none"; - daImagePanelConetent[i].style.opacity = "0.7"; + $scope.DisableAAUI = function (windowviewid) { + var modulePanel = $("#AAImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="none"; + modulePanel[0].style.opacity="0.7"; } + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); // CB module disable all $('#HomeContainerDiv').css('pointer-events', 'none'); $('#HomeContainerDiv').css('opacity', '0.7'); + } - $scope.EnableUI = function () { + $scope.EnableAAUI = function (windowviewid) { - var daImagePanelConetent = document.getElementsByClassName("jsPanel-content"); - for (var i = 0; i < daImagePanelConetent.length; i++) { - daImagePanelConetent[i].style.pointerEvents = "auto"; - daImagePanelConetent[i].style.opacity = "1"; + var modulePanel = $("#AAImagePanel_"+windowviewid).find(" .jsPanel-content"); + if(modulePanel.length>0) + { + modulePanel[0].style.pointerEvents="auto"; + modulePanel[0].style.opacity="1"; } - + $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); // CB module enable all @@ -213,11 +221,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#HomeContainerDiv').css('opacity', '1'); } - $scope.loadForModuleById = function (moduleId) { - $scope.DisableUI(); - + $scope.loadForModuleById = function (moduleId) { $rootScope.isCallFromOtherModule = undefined; $rootScope.MULTI_VIEW_ID += 1 + $scope.DisableAAUI($rootScope.MULTI_VIEW_ID); // store exist module in module service var ExistData = ModuleService.getModuleData("ATLAS_ANATOMY"); @@ -422,7 +429,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if ($rootScope.isCallFromOtherModule) { $scope.AAModuleData = ModuleService.getModuleData("ATLAS_ANATOMY"); if($scope.AAModuleData.length<1) return; - $scope.DisableUI(); + $scope.DisableAAUI(); $scope.readyToLoad=true; $rootScope.AAWindowLoadComplete = false; $scope.wincount=1; @@ -463,7 +470,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } else { - $scope.DisableUI(); + $scope.DisableAAUI(); $scope.openModuleItem(null); } } @@ -577,7 +584,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.loadAAIllustration = function (windowviewid) { //0.4 for Opening module item, load it into image - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); if ($rootScope.refreshcheck == null) { $location.path('/'); @@ -670,7 +677,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.SetAAwindowStoreData(windowviewid, 'maximised',true); $scope.SetAAwindowStoreData(windowviewid, 'minimised',false); - var extraheight=$('#aastickeyarea').height()+15; + var extraheight=$('#aastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -694,7 +701,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.SetAAwindowStoreData(windowviewid, 'minimised',false); $scope.SetAAwindowStoreData(windowviewid, 'maximised',false); - var extraheight=$('#aastickeyarea').height()+15; + var extraheight=$('#aastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -719,7 +726,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var len = (pnlName).split("_").length; var windowviewid = (pnlName).split("_")[len - 1]; - var extraheight=$('#aastickeyarea').height()+15; + var extraheight=$('#aastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height(); var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -816,7 +823,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.loadAAModule = function (windowviewid) { - var extraheight=$('#aastickeyarea').height()+15; + var extraheight=$('#aastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -858,8 +865,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var demoData= {shapeStates:[],paintCanvasState:[]}; $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData); - - $timeout(function () { + $scope.JsPanelclick(windowviewid); + + $timeout(function () { + $scope.loadAllPinFirstTime(windowviewid); //call time interval function until load pin data //load search/vocab data @@ -876,8 +885,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou //7. Highlight all system body list in left side $scope.highlightBodySystemList(windowviewid); $scope.loadbtnNavigator(windowviewid); - $scope.JsPanelclick(windowviewid); - + if ($rootScope.isCallFromOtherModule) { $scope.loadAAonCBData(windowviewid); @@ -1014,9 +1022,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#navigatorBtn").attr("id", "navigatorBtn_" + windowviewid); $("#navigatorDiv").attr("id", "navigatorDiv_" + windowviewid); $("#comment-box").attr("id", "comment-box_" + windowviewid); + $("#multiannotation").attr("id", "multiannotation_" + windowviewid); $("#selectedTermName").attr("id", "selectedTermName_" + windowviewid); + $("#searchListDivAA").attr("id", "searchListDivAA_" + windowviewid); + $("#searchlangaugeDiv").attr("id", "searchlangaugeDiv_" + windowviewid); $("#termlistfilter").attr("id", "termlistfilter_" + windowviewid); $("#btnSearchAA").attr("id", "btnSearchAA_" + windowviewid); + $("#modItemImage").attr("id", "modItemImage_" + windowviewid); } @@ -1045,6 +1057,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou // $("#AAImagePanel_" + windowviewid).off("click"); $("#AAImagePanel_" + windowviewid).on('click', function (event) { + $timeout(function () { + $scope.IsSearchVisible=false; + + }, 200); + var pnlName=event.currentTarget.id; $rootScope.resetMenuOptionOnClick(pnlName); @@ -1054,8 +1071,89 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.StoreTitleName(currentViewTitle); $rootScope.StoreOrgImageName(imageName); }); + + //hide search data + $("#topMenuBar .dropdown-toggle").on('click', function (event) { + + $timeout(function () { + $scope.IsSearchVisible=false; + + }, 200); + }); + + //hide search data + $("#termlistfilter_"+windowviewid).scroll(function (event) { + + $("#termlistfilter_"+windowviewid).focus(); + $scope.IsSearchVisible=true; + }); + // register event for search list manager + $(document).on("mouseover", "#termlistfilter_"+windowviewid+ " option", function (e) { + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').removeAttr("style"); + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("selected", false); + $(this).css("background-color", "#3399FF"); + + $(this).attr("selected", true); + $scope.IsSearchVisible=true; + + }); + + $('#termlistfilter_'+windowviewid).unbind('keyup'); + $('#termlistfilter_'+windowviewid).on('keyup', function (event) { + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').removeAttr("style"); + $('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("selected", false); + $(this.selectedOptions[0]).attr("selected", true); + $scope.IsSearchVisible=true; + }); + + $('#termlistfilter_'+windowviewid).unbind('keypress'); + $('#termlistfilter_'+windowviewid).on('keypress', function (e) { + if ($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id") == "undefined") { + return false; + } + else { + if ($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id")) { + if (e.keyCode == 13) { + onSearchItemSelection($('#termlistfilter_'+windowviewid+ ' option[selected="selected"]').attr("id"),false); + } + } + } + }); + + // set search for language input + $scope.langSearchLoad(windowviewid); } + + $scope.langSearchLoad= function(windowviewid) + { + $('#searchlangaugeDiv_'+windowviewid).empty(); + $('#searchlangaugeDiv_'+windowviewid).css("display","none"); + var languageArray = $rootScope.lexiconLanguageArray; + + $("#btnSearchAA_"+windowviewid).parent().css("margin-right", "10px"); + + if(languageArray.length>1) + { + $("#btnSearchAA_"+windowviewid).parent().css("margin-right", "-10px"); + $('#searchlangaugeDiv_'+windowviewid).css("display","block"); + var option=''; + for (var i = 0; i <= languageArray.length - 1; i++) { + option=option+''; + } + var $all = $('#searchlangaugeDiv_'+windowviewid).append( + '
    '+ + ''+ + '
    ' + ) + $compile($all)($scope); + + } + + $scope.changeSearchText(windowviewid) + } $scope.setPreClickBtnCss = function (windowviewid) { if ($scope.aaOpenInOtherModules.showAllPins != undefined && $scope.aaOpenInOtherModules.showAllPins) { @@ -1118,7 +1216,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#' + canvasDraw).removeLayers();//remove all old shape $("#" + canvasPaint).sketch().actions = [];//remove old paint data - var extraheight=$('#aastickeyarea').height()+15; + var extraheight=$('#aastickeyarea').height()+5; var extrawidth=$('.tools').width()+15; var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; @@ -1169,6 +1267,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou scope.showAllPins(windowviewid,true); break; } + + //redraw annotation + $scope.SetAAwindowStoreData(windowviewid,'isShowBodyWithCBPinData',true); + $scope.ShowCBAnnotation(windowviewid); // } }); } @@ -1229,19 +1331,20 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou selectedPins = $scope.GetAAwindowStoreData(windowviewid, 'selectedPins'); var pinid = $scope.aaOpenInOtherModules.selectedPins[i]; - - selectedPins.push(pinid); - + var pinvalue = 'PinArc_' + pinid; var isFound = jQuery.inArray(pinvalue, activePinArray) if (isFound == -1) { activePinArray.push(pinvalue); clickedPins.push({ 'id': pinid }); + + if (selectedPins != undefined) { + selectedPins.push(pinid); + $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins); + } } } - if (selectedPins != undefined) { - $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins); - } + } if ($scope.aaOpenInOtherModules.selectedCallouts != undefined) { @@ -1400,7 +1503,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } - $scope.SetAAwindowStoreData(windowviewid,'isShowBodyWithCBPinData',false); $rootScope.AAWindowLoadComplete=true; @@ -1522,7 +1624,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.activePinOnSliderChange(windowviewid); } - $scope.EnableUI(); + $scope.EnableAAUI(windowviewid); } } @@ -1545,13 +1647,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } }, function (error) { - $scope.EnableUI(); + $scope.EnableAAUI(windowviewid); console.log(' error in showAllPins: ' + error.statusText); }) } $scope.FilterByImage = function (moduleId, query,windowviewid) { - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); if (windowviewid == undefined) { windowviewid = $rootScope.MULTI_VIEW_ID; } @@ -1719,12 +1821,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $timeout(function () { - $scope.EnableUI(); + $scope.EnableAAUI(windowviewid); $rootScope.ResetGridListLength(); }, 500); }, function (error) { - $timeout(function () { $scope.EnableUI(); }, 500); + $timeout(function () { $scope.EnableAAUI(windowviewid); }, 500); console.log(' error: ' + error.statusText); } ) @@ -1732,29 +1834,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.ResetGridListLength=function() { - var $ua = navigator.userAgent; - - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { + var innerheight =$(window).innerHeight(); - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-128; - var listheight=screen.height-srchHeight-352; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } - else - { - var srchHeight=$('.breadcrumb').height(); - var gridheight=screen.height-srchHeight-276; - var listheight=screen.height-srchHeight-500; - $('#grid-view').css({"height":gridheight,"overflow":"auto"}); - $('#ListViewDiv').css({"height":listheight,"overflow":"auto"}); - } - + var srchHeight=$('.breadcrumb').height(); + var gridheight=innerheight-srchHeight-135; + var listheight=innerheight-srchHeight-358; + $('#grid-view').css({"height":gridheight,"overflow":"auto","min-height":"160px"}); + $('#ListViewDiv').css({"height":listheight,"overflow":"auto","min-height":"100px"}); + } $scope.Reset = function (moduleId, query,windowviewid) { - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); if(windowviewid==undefined) // call from also home controller list manager windowviewid= $rootScope.MULTI_VIEW_ID; @@ -1791,6 +1882,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if (typeof event == "object") { var len= (event.target.parentElement.parentElement.id).split("_").length; var windowviewid = (event.target.parentElement.parentElement.id).split("_")[len-1]; + + $('#selectedTermName_' + windowviewid).val(''); + $("#selectedTermName_" + windowviewid).attr("name", '0'); if (event.currentTarget.title == $("#bodySystemList_" + windowviewid + " li.activeAASystemSelect a").attr("title")) { } @@ -1808,6 +1902,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.SetAAwindowStoreData(windowviewid, 'activePinArray', []); $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); $scope.SetAAwindowStoreData(windowviewid, 'SelectedSystemID', id); + $scope.SetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate', []); } var isHidePinBtnClicked=$scope.GetAAwindowStoreData(windowviewid,'isHidePinBtnClicked'); @@ -1826,7 +1921,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $(bodySystemListObj[i].parentElement).addClass("activeAASystemSelect"); } } - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); $scope.removeSpeechBubble(windowviewid); if (SelectedSystemID == "0") { @@ -1923,7 +2018,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var SelectedSystemTitle = $("#bodySystemList_" + windowviewid + " li.activeAASystemSelect a").attr("title"); - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); var isHidePinBtnClicked=$scope.GetAAwindowStoreData(windowviewid,'isHidePinBtnClicked'); $scope.removeSpeechBubble(windowviewid); @@ -1956,6 +2051,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.SetAAwindowStoreData(windowviewid, 'activePinArray', []); $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); $scope.SetAAwindowStoreData(windowviewid, 'SelectedSystemID', SelectedSystemID); + $scope.SetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate', []); } var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); if(clickedPins.length>0) @@ -2034,16 +2130,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou .select(); - var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray'); - for (var i = 0; i <= pinDataWithFirstTermNumber.length - 1; i++) { - var pinvalue='PinArc_' + pinDataWithFirstTermNumber[i]._PinId; - var isFound = jQuery.inArray(pinvalue, activePinArray) - if (isFound == -1) { - activePinArray.push('PinArc_' + pinDataWithFirstTermNumber[i]._PinId); - } - - } - $scope.MultiLanguageAnnationArray = []; $scope.GetAnnotationBasedOnActualTermNo(pinTermNumber,windowviewid); @@ -2101,29 +2187,25 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if (pinDataWithFirstTermNumber.length > 1) { isSameTermWithMultiPin = true; } - var selectedPins=$scope.GetAAwindowStoreData(windowviewid,'selectedPins'); var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); + var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray'); + var selectedPins=$scope.GetAAwindowStoreData(windowviewid,'selectedPins'); + angular.forEach(pinDataWithFirstTermNumber, function (value, key) { - if (isBodySystemSelected == true) { - - clickedPins.push({ 'id': value._PinId }); - //selectedPins.push(value._PinId); + if (isBodySystemSelected == true) { $scope.SetAAwindowStoreData(windowviewid,'isBodySystemSelected',false); } var headX = (parseInt(value._HeadX)); var headY = (parseInt(value._HeadY)); - $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10,0,0, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin,windowviewid); - - // remove annotation/speechBubble while resize - if(isResize) - { - $scope.removeSpeechBubble(windowviewid); - } - - //Save Cordinate for show annotation as per Pin - - if ($rootScope.isCallFromOtherModule) { - + + var pinvalue='PinArc_' + value._PinId; + var isFound = jQuery.inArray(pinvalue, activePinArray) + if (isFound == -1) { + activePinArray.push(pinvalue); + clickedPins.push({ 'id': value._PinId }); + selectedPins.push(value._PinId); + + //Save Cordinate for show annotation as per Pin var CBselectedpinCordinate = $scope.GetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate'); CBselectedpinCordinate.push( { @@ -2133,12 +2215,24 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou "lx": headX+30, "pinId": value._PinId }); + } + + // remove annotation/speechBubble while resize + if(isResize) + { + $scope.removeSpeechBubble(windowviewid); + } + else + { + $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10,0,0, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin,windowviewid); + + } }) } - $scope.EnableUI(); + $scope.EnableAAUI(windowviewid); } @@ -2277,6 +2371,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou // $scope.ShowHideAnnotationText(windowviewid); + if ($("#hidePinBtn_" + windowviewid).hasClass("btn-primary")) { + + $scope.hideSpeechBubble(windowviewid); + } + } $scope.createSpeechBubbleBasedOnAnnotationLength = function (x, y, lx, ly, PinId, windowviewid) { @@ -2473,20 +2572,17 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var windowviewid = (clickedSpeechBubbleId).split("_")[len - 1]; var sppechBubbleId = $(this).attr("id").substring(12); var PinId = sppechBubbleId.split("_")[0]; + $rootScope.UnsaveCurriculum = true; + $timeout(function () { + var CBselectedpinCordinate = $scope.GetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate'); + var BubleObj = document.getElementById(clickedSpeechBubbleId); + var CBselectedpinCordinate = new jinqJs() + .from(CBselectedpinCordinate) + .update(function (coll, index) { coll[index].lx = BubleObj.offsetLeft; coll[index].ly = BubleObj.offsetTop; }) + .at("pinId == " + PinId); - if ($rootScope.isCallFromOtherModule) { - $rootScope.UnsaveCurriculum = true; - $timeout(function () { - var CBselectedpinCordinate = $scope.GetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate'); - var BubleObj = document.getElementById(clickedSpeechBubbleId); - var CBselectedpinCordinate = new jinqJs() - .from(CBselectedpinCordinate) - .update(function (coll, index) { coll[index].lx = BubleObj.offsetLeft; coll[index].ly = BubleObj.offsetTop; }) - .at("pinId == " + PinId); - - }, 100); + }, 100); - } } }); @@ -2502,17 +2598,29 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#speechBubble' + pinId+'_'+windowviewid).remove(); $("#speechBubbleDraggedLine" + pinId+'_'+windowviewid).remove(); $("#speechBubbleLine" + pinId + '_' + windowviewid).remove(); + var CBselectedpinCordinate = []; + CBselectedpinCordinate = $scope.GetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate'); + CBselectedpinCordinate = new jinqJs() + .from(CBselectedpinCordinate) + .delete().at("pinId == " + pinId).select(); - if ($rootScope.isCallFromOtherModule) { - var CBselectedpinCordinate = []; - CBselectedpinCordinate = $scope.GetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate'); - CBselectedpinCordinate = new jinqJs() - .from(CBselectedpinCordinate) - .delete().at("pinId == " + pinId).select(); + $scope.SetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate', CBselectedpinCordinate); + + var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); + clickedPins = new jinqJs() + .from(clickedPins) + .delete().at("id == " + pinId).select(); - $scope.SetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate', CBselectedpinCordinate); - $rootScope.UnsaveCurriculum = true; + $scope.SetAAwindowStoreData(windowviewid, 'clickedPins', clickedPins); + + var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray'); + + const index = activePinArray.indexOf("PinArc_"+pinId); + if (index > -1) { + activePinArray.splice(index, 1); } + $scope.GetAAwindowStoreData(windowviewid,'activePinArray',activePinArray); + $rootScope.UnsaveCurriculum = true; }); @@ -2627,92 +2735,118 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou click: function (clickedPin) { $rootScope.UnsaveCurriculum =true; + $('#selectedTermName_' + windowviewid).val(''); + $("#selectedTermName_" + windowviewid).attr("name", '0'); //birendra + var iskeyctrlActive= $scope.GetAAwindowStoreData(windowviewid, 'keyctrl');//for iPad // for mac os Command key use for multi selection - if (clickedPin.event.ctrlKey == false && clickedPin.event.metaKey == false) { + if (clickedPin.event.ctrlKey == false && clickedPin.event.metaKey == false && !iskeyctrlActive) { $scope.SetAAwindowStoreData(windowviewid, 'clickedPins', []); $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); $scope.SetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate', []); + $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]); } - var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); - var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); - var pinData = new jinqJs() - .from(aaPinData) - .where("_PinId == " + pinID) - .select(); - - - var pinTermNumber = pinData[0]._TermId; - - var pinWithSameTerm = new jinqJs() - - .from(aaPinData) - .where("_TermId == " + pinTermNumber) - .select(); - if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) { - var selectedPins = $scope.GetAAwindowStoreData(windowviewid, 'selectedPins'); - var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); - for (var i = 0; i < pinWithSameTerm.length; i++) { - clickedPins.push({ 'id': pinWithSameTerm[i]._PinId }); - selectedPins.push(pinWithSameTerm[i]._PinId); - } - } - - $scope.SetAAwindowStoreData(windowviewid,'isSelectedPinBtnClickedAftrSliderCange',false); - var selectedPinData = new jinqJs() - .from(aaPinData) - .where("_PinId == " + pinID) - .select(); - + var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray'); - if (clickedPin.event.ctrlKey == true||clickedPin.event.metaKey == true) { - var isFound = jQuery.inArray(clickedPin.name, activePinArray) - if (isFound == -1) { - activePinArray.push(clickedPin.name); - } - var radialAfterClick = $('#aaDetailViewCanvas_' + windowviewid).createGradient({ - x1: 50, y1: 50, - x2: 50, y2: 50, - r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(126, 187, 83)' - }); - clickedPin.fillStyle = radialAfterClick; - $scope.showAnnotation(selectedPinData, true, true, false,false, windowviewid); - } - else { - $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]); - var activePin = []; - activePin.push(clickedPin.name); - $scope.SetAAwindowStoreData(windowviewid,'activePinArray',activePin); - - var radial = $('#aaDetailViewCanvas_' + windowviewid).createGradient({ - x1: 50, y1: 50, - x2: 50, y2: 50, - r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(216, 216, 216)' - }); - - - $('#aaDetailViewCanvas_' + windowviewid).setLayers({ - fillStyle: radial, - }).drawLayers(); - - //change the head color to green - var radialAfterClick = $('#aaDetailViewCanvas_' + windowviewid).createGradient({ - x1: 50, y1: 50, - x2: 50, y2: 50, - r1: 10, r2: 30, - c1: 'rgba(100, 50, 0,0)', - c2: 'rgb(126, 187, 83)' - }); + var isFound = jQuery.inArray(clickedPin.name, activePinArray) + if (isFound == -1) { + activePinArray.push(clickedPin.name); + + var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); + var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); + var pinData = new jinqJs() + .from(aaPinData) + .where("_PinId == " + pinID) + .select(); + + + var pinTermNumber = pinData[0]._TermId; + + var pinWithSameTerm = new jinqJs() + + .from(aaPinData) + .where("_TermId == " + pinTermNumber) + .select(); + if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) { + var selectedPins = $scope.GetAAwindowStoreData(windowviewid, 'selectedPins'); + var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); + for (var i = 0; i < pinWithSameTerm.length; i++) { + clickedPins.push({ 'id': pinWithSameTerm[i]._PinId }); + selectedPins.push(pinWithSameTerm[i]._PinId); + //some time get multiple pinid on selected termid + var pinvalue='PinArc_' + pinWithSameTerm[i]._PinId; + var isFound = jQuery.inArray(pinvalue, activePinArray) + if (isFound == -1) { + activePinArray.push(pinvalue); + } - clickedPin.fillStyle = radialAfterClick; - $scope.showAnnotation(selectedPinData, false, true, false,false, windowviewid); + var headX = (parseInt(pinWithSameTerm[i]._HeadX)); + var headY = (parseInt(pinWithSameTerm[i]._HeadY)); + //Save Cordinate for show annotation as per Pin + var CBselectedpinCordinate = $scope.GetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate'); + CBselectedpinCordinate.push( + { + "hy": headY, + "ly": headY+10, + "hx": headX, + "lx": headX+30, + "pinId": pinWithSameTerm[i]._PinId + }); - } + } + } + + $scope.SetAAwindowStoreData(windowviewid,'isSelectedPinBtnClickedAftrSliderCange',false); + var selectedPinData = new jinqJs() + .from(aaPinData) + .where("_PinId == " + pinID) + .select(); + + if (clickedPin.event.ctrlKey == true||clickedPin.event.metaKey == true ||iskeyctrlActive) { + + var radialAfterClick = $('#aaDetailViewCanvas_' + windowviewid).createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' + }); + clickedPin.fillStyle = radialAfterClick; + $scope.showAnnotation(selectedPinData, true, true, false,false, windowviewid); + } + else + { + var radial = $('#aaDetailViewCanvas_' + windowviewid).createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(216, 216, 216)' + }); + + + $('#aaDetailViewCanvas_' + windowviewid).setLayers({ + fillStyle: radial, + }).drawLayers(); + + //change the head color to green + var radialAfterClick = $('#aaDetailViewCanvas_' + windowviewid).createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' + }); + + clickedPin.fillStyle = radialAfterClick; + $scope.showAnnotation(selectedPinData, false, true, false,false, windowviewid); + + } + + + } + } }).drawLayers(); @@ -2750,77 +2884,87 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } + //Reload Body View after setting Change + $rootScope.reloadAABodyViewEvent = function (isLexiconChange, windowviewid) { + + $scope.loadaaBodyViewChangedBySetting(windowviewid,isLexiconChange); + } + + $scope.loadaaBodyViewChangedBySetting = function (windowviewid, isLexiconChange) { + $scope.DisableAAUI(windowviewid); + + // store image for export while click on panel + var currentViewTitle = $scope.GetAAwindowStoreData(windowviewid, 'currentViewTitle'); + var imageName = $scope.GetAAwindowStoreData(windowviewid, 'imageName'); + + $rootScope.StoreTitleName(currentViewTitle); + $rootScope.StoreOrgImageName(imageName); + + var timeintval=$scope.SetAAwindowStoreData(windowviewid,'intervalObject'); + if(isLexiconChange) + { + // remove first annotation text + $scope.removeSpeechBubble(windowviewid); + + //load term data and also language data + $rootScope.loadPinSearchData(windowviewid); + timeintval = $interval(function(){loadaaBodyViewBySetting(windowviewid)},5); + $scope.SetAAwindowStoreData(windowviewid,'intervalObject',timeintval); + function loadaaBodyViewBySetting(panid) { + var pinTermData = $scope.GetAAwindowStoreData(panid, 'pinTermData'); + if (pinTermData!=null) { + var intval=$scope.GetAAwindowStoreData(panid,'intervalObject'); + $scope.stopVocab(intval); + $scope.langSearchLoad(panid); + $scope.SetAAwindowStoreData(panid,'isShowBodyWithCBPinData',true); + //loading annotation + $scope.ShowCBAnnotation(panid); + + $timeout(function () { + if ($rootScope.isListManagerMenuSelected) { + var selectedPanel = $("#viewName option:selected").val(); + var winid = (selectedPanel).split("_")[1]; + if(winid==panid) + { + $scope.DisableAAUI(panid); + $rootScope.aalistManagerEvent(panid); + } + } + + }, 200); + + $scope.EnableAAUI(panid); + } + else + { + console.log("waiting for search term Data"); + } + } + + $scope.stopVocab = function (intvalobj) { + if (angular.isDefined(intvalobj)) { + $interval.cancel(intvalobj); + intvalobj = undefined; + } + }; + + } + + } + $rootScope.aaloadSearchData = function (windowviewid) { var imageId= $scope.GetAAwindowStoreData(windowviewid,'imageId'); + $scope.SetAAwindowStoreData(windowviewid,'pinTermData',[]); var promise = ModuleService.getTermTextDataForAAImage(imageId) .then( function (response) { var AAPinTermData = response.data.PinTermData.TermData; $scope.SetAAwindowStoreData(windowviewid,'AAPinTermData',AAPinTermData) - $scope.EnableUI(); - - $scope.SetAAwindowStoreData(windowviewid,'pinTermData',[]); + $scope.EnableAAUI(windowviewid); + $rootScope.loadPinSearchData(windowviewid); - var primaryLexicon = $rootScope.lexiconLanguageArray[0].id; - var matchedLanguageTermData = new jinqJs() - .from(AAPinTermData) - .where('_LanguageId == ' + primaryLexicon) - .select(); - var sortedTermTextArray = []; - for (var i = 0; i < matchedLanguageTermData.length; i++) { - sortedTermTextArray.push(matchedLanguageTermData[i]._TermText); - sortedTermTextArray.sort(); - } - - var pinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData'); - - for (var i = 0; i <= sortedTermTextArray.length - 1; i++) { - for (var j = 0; j <= matchedLanguageTermData.length - 1; j++) { - if (matchedLanguageTermData[j]._TermText == sortedTermTextArray[i]) { - pinTermData.push({ "LanguageId": matchedLanguageTermData[j]._LanguageId, "TermNumber": matchedLanguageTermData[j]._TermNumber, "TermTxt": matchedLanguageTermData[j]._TermText }); - break; - } - } - } - - $("#AABodySystems").empty(); - $("#bodySystems").css("display", "none"); - $("#langaugeDivLm").css("display", "none"); - $("#AABodySystems").css("display", "block"); - $("#bodySystemList_" + windowviewid + " li a").each(function (key, value) { - var sysid= $(this).attr('id') + '_' +windowviewid; - - if ($(this).parent().hasClass("disabledSelectedSystem")) { - var $systemOptions = $('').appendTo("#AABodySystems") - $compile($systemOptions)($scope); - } - else{ - var $systemOptions = $('').appendTo("#AABodySystems") - $compile($systemOptions)($scope); - } - - }); - - $scope.$watch('pinTermData', function (newValue, oldValue, scope) { - - $('#termlistfilter_' + windowviewid).empty(); - if (pinTermData.length > 0) { - $timeout(function () { - console.log('pinTermData= ' + pinTermData.length); - $('#termList').empty(); - $('#termlistfilter_' + windowviewid).empty(); - for (var j = 0; j < pinTermData.length; j++) { - var $el = $('
  • ' + pinTermData[j].TermTxt + '
  • ').appendTo('#termlistfilter_' + windowviewid) - $compile($el)($scope); - var $selectedOptions = $('').appendTo('#termList') - - $compile($selectedOptions)($scope); - } - }, 500); - } - }) }, function (error) { // handle errors here @@ -2830,118 +2974,349 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } + $rootScope.loadPinSearchData = function (windowviewid) { + var AAPinTermData= $scope.GetAAwindowStoreData(windowviewid,'AAPinTermData') + for (var i = 0; i <= $rootScope.lexiconLanguageArray.length - 1; i++) { + + var lexiconId = $rootScope.lexiconLanguageArray[i].id; + var matchedLanguageTermData = new jinqJs() + .from(AAPinTermData) + .where('_LanguageId == ' + lexiconId) + .select(); + + if(matchedLanguageTermData.length>0) + { + if(i==0) + { + $scope.SetAAwindowStoreData(windowviewid, 'pinTermData', matchedLanguageTermData); + } + else + { + var pinTermData = $scope.GetAAwindowStoreData(windowviewid, 'pinTermData'); + var result=pinTermData.concat(matchedLanguageTermData); + $scope.SetAAwindowStoreData(windowviewid, 'pinTermData', result); + + } + } + + } + + } + //event remove it fire multiple time $rootScope.aalistManagerEvent=function(windowviewid){ - $scope.DisableUI(); - $rootScope.aaloadSearchData(windowviewid); + $scope.DisableAAUI(windowviewid); + $("#langaugeDivLm").css("display", "none"); + + $("#AABodySystems").empty(); + $("#bodySystems").css("display", "none"); + $("#langaugeDivLm").css("display", "none"); + $("#AABodySystems").css("display", "block"); + $('#termList').empty(); + + var totalstructure=0; + $rootScope.isListManagerMenuSelected = true; + + $scope.SetAAwindowStoreData(windowviewid,'totalstructureLm',0); + var languageArray = $rootScope.lexiconLanguageArray; + + if(languageArray.length>1) + { + $("#langaugeDivLm").css("display", "block"); + $("#selectLanguageLm").empty(); + for (var i = 0; i <= languageArray.length - 1; i++) { + $('#selectLanguageLm').append(''); + } + } + + var $all = $('').appendTo('#AABodySystems'); + $compile($all)($scope); + + $("#bodySystemList_" + windowviewid + " li a").each(function (key, value) { + if($(this).attr('id')!="0") + { + var sysid= $(this).attr('id') + '_' +windowviewid; + + if ($(this).parent().hasClass("disabledSelectedSystem")) { + var $systemOptions = $('').appendTo("#AABodySystems") + $compile($systemOptions)($scope); + } + else{ + var $systemOptions = $('').appendTo("#AABodySystems") + $compile($systemOptions)($scope); + } + } + + }); + + + // primary language + var langId=languageArray[0].id; + $scope.loadaaListManger(windowviewid,langId,totalstructure); + + } + + $rootScope.changeLanguageLmEventAA = function (windowviewid) { + $scope.DisableAAUI(windowviewid); + $('#termList').empty(); + var totalstructure=0; + $scope.SetAAwindowStoreData(windowviewid,'totalstructure',0); + + var langIdvalue = $("#selectLanguageLm option:selected").val(); + + setTimeout(function () { + + if(langIdvalue!=undefined) + { + var selectedLanguage = new jinqJs() + .from( $rootScope.lexiconLanguageArray) + .where('id == ' + langIdvalue) + .select()[0]; + + var langId=selectedLanguage.id; + + } + else + { + var langId=$rootScope.lexiconLanguageArray[0].id; + } + + var sysid = $("#AABodySystems option:selected").attr("id"); + var bodysystemId = (sysid).split("_")[0]; + if(bodysystemId=="0") + { + $scope.loadaaListManger(windowviewid,langId,totalstructure); + } + else + { + $scope.aasystemMatchTermLoad(bodysystemId,windowviewid,langId,totalstructure); + } + + },100) + + } + + $rootScope.LoadMoreLmEventAA = function (windowviewid) { + $scope.DisableAAUI(windowviewid); + var langIdvalue = $("#selectLanguageLm option:selected").val(); + var totalstructure = $scope.GetAAwindowStoreData(windowviewid, 'totalstructureLm'); + + setTimeout(function () { + + if(langIdvalue!=undefined) + { + var selectedLanguage = new jinqJs() + .from( $rootScope.lexiconLanguageArray) + .where('id == ' + langIdvalue) + .select()[0]; + + var langId=selectedLanguage.id; + + } + else + { + var langId=$rootScope.lexiconLanguageArray[0].id; + } + + var sysid = $("#AABodySystems option:selected").attr("id"); + var bodysystemId = (sysid).split("_")[0]; + if(bodysystemId=="0") + { + $scope.loadaaListManger(windowviewid,langId,totalstructure); + } + else + { + $scope.aasystemMatchTermLoad(bodysystemId,windowviewid,langId,totalstructure); + } + + }, 100); + + } + + $scope.loadaaListManger = function (windowviewid,langId,totalstructure) { - $timeout(function () { - $("#totalTermsLm").empty(); - $("#totalTermsLm").html("" + $("#termList option").length + " Structures"); - $scope.EnableUI(); - }, 1000); + var selectedpinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData');//term data for selected language + + var languageTermDataArray = new jinqJs() + .from( selectedpinTermData) + .where('_LanguageId == ' + langId) + .select(); + + var afterskipdata = new jinqJs() + .from(languageTermDataArray) + .skip(totalstructure) + .select(); + + var limitTofilterdata = $filter('limitTo')(afterskipdata, 500); + + var matchTermDataFilter = new jinqJs() + .from(limitTofilterdata) + .distinct('_TermText', '_TermNumber') + .orderBy([{ field: '_TermText', sort: 'asc' }]) + .select('_TermNumber', '_TermText'); + + var option=''; + + angular.forEach(matchTermDataFilter, function (value2, key2) { + totalstructure=totalstructure+1; + option=option+''; + + }) + var $el = $(option).appendTo('#termList') + $compile($el)($scope); + + $scope.SetAAwindowStoreData(windowviewid,'totalstructureLm',totalstructure); + var termsTotal = '' + totalstructure + ' Structures'; + + $("#totalTermsLm").empty(); + $("#totalTermsLm").append(termsTotal); + + if(totalstructure < languageTermDataArray.length) + { + $("#totalTermsLm").append(''); + } + else + { + $("#totalTermsLm").append(''); + $('#btlLoadMoreLm').attr('disabled', 'disabled'); + } + + $scope.EnableAAUI(windowviewid); + } $rootScope.refreshTermListOnAASystemSelection = function (selectedBodysystemId) { var windowviewid = (selectedBodysystemId).split("_")[1]; + var bodysystemId = (selectedBodysystemId).split("_")[0]; $("#AABodySystems").find("option:not(:disabled)").css({ "background-color": "#ffffff", "color": "#000000" }); $("#AABodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); $('#termList').empty(); - var bodySystemName = $("#AABodySystems #" + selectedBodysystemId).val(); + // var bodySystemName = $("#AABodySystems #" + selectedBodysystemId).val(); + + $scope.SetAAwindowStoreData(windowviewid, 'totalstructureLm',0); + var totalstructure = 0; + var langIdvalue = $("#selectLanguageLm option:selected").val(); + if(langIdvalue!=undefined) + { + var selectedLanguage = new jinqJs() + .from( $rootScope.lexiconLanguageArray) + .where('id == ' + langIdvalue) + .select()[0]; - if (bodySystemName == "All") { - var pinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData'); - for (var j = 0; j <= pinTermData.length - 1; j++) { - var $selectedOptions = $('').appendTo("#termList") + var langId=selectedLanguage.id; - $compile($selectedOptions)($scope); } - $("#totalTermsLm").empty(); - $("#totalTermsLm").html("" + $("#termList option").length + " Structures"); - } - else { - var imageId = $scope.GetAAwindowStoreData(windowviewid,'imageId'); - var pinDataUrl = "aa_dat_pinterm_" + imageId; - var bodySystemTermArray = []; - var sortedListArray = []; - var duplicateListArray = []; - $.ajax({ - url: '~/../content/data/json/aa/aa_pinterm/' + pinDataUrl + '.json', - type: 'GET', - dataType: "json", - async: false, - success: function (result) { - $(result.PinTermData.TermData).each(function (key, value) { - bodySystemTermArray.push({ "termNumbr": result.PinTermData.TermData[key]._TermNumber, "text": result.PinTermData.TermData[key]._TermText, "language": result.PinTermData.TermData[key]._LanguageId }); - }); + else + { + var langId=$rootScope.lexiconLanguageArray[0].id; + } - var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); - for (var i = 0; i <= aaPinData.length - 1; i++) { + if(bodysystemId=="0") + { + setTimeout(function () { + $scope.loadaaListManger(windowviewid,langId,totalstructure); + + }, 100); + } + else + { + $scope.aasystemMatchTermLoad(bodysystemId,windowviewid,langId,totalstructure); + } - if (aaPinData[i]._BodySystemName.toLowerCase() == bodySystemName.toLowerCase()) { + } - for (var j = 0 ; j <= bodySystemTermArray.length - 1; j++) { - if (aaPinData[i]._TermId == bodySystemTermArray[j].termNumbr) { - if (bodySystemTermArray[j].language == $rootScope.lexiconLanguageArray[0].id) { - duplicateListArray.push({ "title": bodySystemTermArray[j].text, "id": bodySystemTermArray[j].termNumbr }); - } - } - } - } - } - var temp = []; - for (var i = 0; i <= duplicateListArray.length - 1; i++) { - var termID = duplicateListArray[i].id; - if ($.inArray(termID, temp) == -1) { - temp.push(termID); - sortedListArray.push({ "title": duplicateListArray[i].title, "id": termID }); + $scope.aasystemMatchTermLoad=function(bodysystemId,windowviewid,langId,totalstructure) + { + var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); + var systemMatchedTermList = new jinqJs() + .from(aaPinData) + .where('_BodySystemId == ' + bodysystemId) + .select(); + if (systemMatchedTermList != null || systemMatchedTermList != undefined) { + $scope.refreshTerms(systemMatchedTermList,windowviewid,langId,totalstructure); + } - } - } + } - for (var i = 0; i <= sortedListArray.length - 1; i++) { + + $scope.refreshTerms = function (termList,windowviewid,langId,totalstructure) { + var matchTermData = []; + var selectedpinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData'); - for (j = i + 1; j <= sortedListArray.length - 1; j++) { + var languageTermDataArray = new jinqJs() + .from( selectedpinTermData) + .where('_LanguageId == ' + langId) + .select(); - if (sortedListArray[i].title.substr(0, 1) > sortedListArray[j].title.substr(0, 1)) { + + for (var i = 0; i < termList.length; i++) { - var termText = sortedListArray[i].title; - var termNumbr = sortedListArray[i].id; - var termLanguage = sortedListArray[i].language; + var actulaTerm = new jinqJs() + .from(languageTermDataArray) + .where('_TermNumber == ' + termList[i]._TermId) + .select()[0]; + + if (actulaTerm != null || actulaTerm != undefined) { + matchTermData.push( + { + "_TermNumber": actulaTerm._TermNumber, + "_TermText": actulaTerm._TermText + + }); + } - sortedListArray[i].title = sortedListArray[j].title; - sortedListArray[i].id = sortedListArray[j].id; - sortedListArray[i].language = sortedListArray[j].language; + } - sortedListArray[j].title = termText; - sortedListArray[j].id = termNumbr; - sortedListArray[j].language = termLanguage; - } - } - } - for (var j = 0; j <= sortedListArray.length - 1; j++) { - var $selectedOptions = $('').appendTo("#termList"); + var matchTermDataFilter = new jinqJs() + .from(matchTermData) + .distinct('_TermText', '_TermNumber') + .orderBy([{ field: '_TermText', sort: 'asc' }]) + .select('_TermNumber', '_TermText'); + + var option=''; + if (matchTermDataFilter != null || matchTermDataFilter != undefined) { + + angular.forEach(matchTermDataFilter, function (value2, key2) { + totalstructure=totalstructure+1; + option=option+''; + + }) + var $el = $(option).appendTo('#termList') + $compile($el)($scope); + + $scope.SetAAwindowStoreData(windowviewid,'totalstructureLm',totalstructure); + var termsTotal = '' + totalstructure + ' Structures'; - $compile($selectedOptions)($scope); - } - } - }); $("#totalTermsLm").empty(); - $("#totalTermsLm").html("" + $("#termList option").length + " Structures"); + $("#totalTermsLm").append(termsTotal); + + if(totalstructure < matchTermDataFilter.length) + { + $("#totalTermsLm").append(''); + } + else + { + $("#totalTermsLm").append(''); + $('#btlLoadMoreLm').attr('disabled', 'disabled'); + } + } - } + $scope.EnableAAUI(windowviewid); + + } + $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo,windowviewid) { - var languageArray = $rootScope.lexiconLanguageArray; - var AAPinTermData= $scope.GetAAwindowStoreData(windowviewid,'AAPinTermData'); + var languageArray = $rootScope.lexiconLanguageArray; + var pinTermData = $scope.GetAAwindowStoreData(windowviewid, 'pinTermData'); - if (AAPinTermData != null || AAPinTermData != undefined) { + if (pinTermData != null || pinTermData != undefined) { var matchedTermNoData = new jinqJs() - .from(AAPinTermData) + .from(pinTermData) .where('_TermNumber == ' + actualTermNo) .select(); @@ -2965,7 +3340,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $rootScope.hidePins = function (windowviewid) { $scope.ToolBoxStyle("HidePin",windowviewid); - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); $scope.hideSpeechBubble(windowviewid); $scope.SetAAwindowStoreData(windowviewid, 'isShowSelectedPins', false); $scope.SetAAwindowStoreData(windowviewid, 'isShowAllPins', false); @@ -2985,7 +3360,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou visible: false // set to true instead to show the layer again }).drawLayers(); }) - $scope.EnableUI(); + $scope.EnableAAUI(windowviewid); } @@ -2997,7 +3372,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.ToolBoxStyle("ShowAllPin",windowviewid); - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); $scope.SetAAwindowStoreData(windowviewid, 'isShowAllPins', true); $scope.SetAAwindowStoreData(windowviewid,'isHidePinBtnClicked',false); @@ -3038,17 +3413,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#listManager").css("display", "none"); $("#optionsListManagerTab").removeClass("active"); - $scope.DisableUI(); + $scope.DisableAAUI(windowviewid); - //if ($rootScope.isCallFromOtherModule) { - var isHidePinBtnClicked = $scope.GetAAwindowStoreData(windowviewid, 'isHidePinBtnClicked'); - if (isHidePinBtnClicked) { - $scope.showAllPins(windowviewid); - setTimeout(function () { - $scope.activePinOnSliderChange(windowviewid); - }, 200); - } - //} + var isHidePinBtnClicked = $scope.GetAAwindowStoreData(windowviewid, 'isHidePinBtnClicked'); + if (isHidePinBtnClicked) { + $scope.showAllPins(windowviewid); + setTimeout(function () { + $scope.activePinOnSliderChange(windowviewid); + }, 200); + } + $scope.SetAAwindowStoreData(windowviewid, 'isShowAllPins', false); $scope.SetAAwindowStoreData(windowviewid, 'isHidePinBtnClicked', false); $scope.SetAAwindowStoreData(windowviewid, 'isShowSelectedPins', true); @@ -3151,84 +3525,267 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou }).drawLayers(); }) } - $scope.EnableUI(); + $scope.EnableAAUI(windowviewid); } - $scope.showItemsForSearch = function (event) { - var len= (event.currentTarget.id).split("_").length; - var windowviewid = (event.currentTarget.id).split("_")[len-1]; + $scope.showItemsForSearch = function (windowviewid, isbuttionclick) { + + if ($('#searchListDivAA_' + windowviewid).html() != "") + $('#termlistfilter_'+windowviewid).empty(); + + $scope.IsSearchVisible = true; + // clear time stamp on text box click + $scope.SetAAwindowStoreData(windowviewid, 'SearchTimeStampValue', 0); + + var langIdvalue = $("#searchLanguageLm_"+windowviewid+" option:selected").val(); + if(langIdvalue!=undefined) + { + var selectedLanguage = new jinqJs() + .from( $rootScope.lexiconLanguageArray) + .where('id == ' + langIdvalue) + .select()[0]; + + var langId=selectedLanguage.id; + } + else + { + // get default language + var langId=$rootScope.lexiconLanguageArray[0].id + } - console.log('showItemsForSearch is called'); - //this check is for log only because we are writing length so need to check if its not null or undefined + var selectedpinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData');//term data for selected language + + var languageTermDataArray = new jinqJs() + .from( selectedpinTermData) + .where('_LanguageId == ' + langId) + .select(); - var AAPinTermData=$scope.GetAAwindowStoreData(windowviewid,'AAPinTermData'); - $timeout(function () { - if ((AAPinTermData != null || AAPinTermData != undefined) && (AAPinTermData.length > 0)) { + var searchvalue = $("#selectedTermName_" + windowviewid).val(); + + var searchfilterdata = $filter('filter')(languageTermDataArray, searchvalue); + if(searchvalue.trim()!="") + { + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText.length'); + } + else + { + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText'); + } - $scope.IsSearchVisible = true; - $("#termlistfilter_" + windowviewid).css("display", "block"); + $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 500); - $("#backdrop > #searchListDivAA > #termlistfilter_" + windowviewid + " > li").each(function (key, value) { + $('#termlistfilter_'+windowviewid).css("display", "block"); - if ($(this).find("a").html() == document.getElementById("selectedTermName_"+windowviewid).value) { - $("#termlistfilter_" + windowviewid + " li a").css({ "background-color": "#ffffff", "color": "#000000" }); - $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" }); - } - }); + angular.forEach($scope.limitTofilterdata, function (value2, key2) { + var $el = $('').appendTo('#termlistfilter_' + windowviewid); + $compile($el)($scope); + }) + + var $all = $('#termlistfilter_'+windowviewid).appendTo('#searchListDivAA_' + windowviewid); + $compile($all)($scope); + + if(isbuttionclick) + { + $timeout(function () { + $('#termlistfilter_'+windowviewid).focus(); + }, 200); + } - } - else { - $rootScope.aaloadSearchData(windowviewid); - if (AAPinTermData.length > 0) { - $scope.showItemsForSearch(event); - } - } + } - }, 500); + $scope.resetSearchListView = function (event) { + + var len = (event.target.id).split("_").length; + var windowviewid = (event.target.id).split("_")[len - 1]; + var date = new Date(); + var newtimestamp = date.getTime(); + + var oldtimestamp = $scope.GetAAwindowStoreData(windowviewid, 'SearchTimeStampValue'); + + if ((newtimestamp - oldtimestamp) > 500) { + + $scope.SetAAwindowStoreData(windowviewid, 'SearchTimeStampValue', newtimestamp); + $scope.showFilteredTerms(windowviewid); + } } $scope.HideSearchList = function (event) { var len= (event.currentTarget.id).split("_").length; var windowviewid = (event.currentTarget.id).split("_")[len-1]; + $timeout(function () { + if(!$scope.IsSearchVisible) + { + $("#termlistfilter_" + windowviewid).empty(); + $("#termlistfilter_" + windowviewid).css("display", "none"); + } + + }, 600); + + } + + $scope.showFilteredTerms = function (windowviewid) { + var langIdvalue = $("#searchLanguageLm_"+windowviewid+" option:selected").val(); + if(langIdvalue!=undefined) + { + var selectedLanguage = new jinqJs() + .from( $rootScope.lexiconLanguageArray) + .where('id == ' + langIdvalue) + .select()[0]; + + var langId=selectedLanguage.id; + } + else + { + // get default language + var langId=$rootScope.lexiconLanguageArray[0].id + } + + var selectedpinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData');//term data for selected language + + var languageTermDataArray = new jinqJs() + .from( selectedpinTermData) + .where('_LanguageId == ' + langId) + .select(); + + var searchvalue = $("#selectedTermName_" + windowviewid).val(); + + var searchfilterdata = $filter('filter')(languageTermDataArray, searchvalue); + if(searchvalue.trim()!="") + { + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText.length'); + } + else + { + searchfilterdata = $filter('orderBy')(searchfilterdata, '_TermText'); + } + + $scope.limitTofilterdata = $filter('limitTo')(searchfilterdata, 20); + + $('#termlistfilter_'+windowviewid).css("display", "block"); + $('#termlistfilter_'+windowviewid).empty(); + + angular.forEach($scope.limitTofilterdata, function (value2, key2) { + var $el = $('').appendTo('#termlistfilter_' + windowviewid); + $compile($el)($scope); + }) + + var $all = $('#termlistfilter_'+windowviewid).appendTo('#searchListDivAA_' + windowviewid); + $compile($all)($scope); + + $("#selectedTermName_" + windowviewid).attr("name", "0"); + + }; + + $scope.changeaaSearchLanguage = function (event) { + + var len= (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len-1]; - $("#termlistfilter_"+windowviewid).css("display", "none"); + $scope.changeSearchText(windowviewid); + + } + $scope.changeSearchText = function (windowviewid) { + + setTimeout(function () { + + var term_num = $("#selectedTermName_" + windowviewid).attr("name"); + if(term_num!=undefined && term_num!="0") + { + var langIdvalue = $("#searchLanguageLm_"+windowviewid+" option:selected").val(); + if(langIdvalue!=undefined) + { + var selectedLanguage = new jinqJs() + .from( $rootScope.lexiconLanguageArray) + .where('id == ' + langIdvalue) + .select()[0]; + + var langId=selectedLanguage.id; + + } + else + { + var langId=$rootScope.lexiconLanguageArray[0].id; + } + var selectedpinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData');//term data for selected language + + var languageTermDataArray = new jinqJs() + .from( selectedpinTermData) + .where('_LanguageId == ' + langId) + .select(); + + + var selectedTerm = new jinqJs() + .from( languageTermDataArray) + .where('_TermNumber == '+term_num) + .select()[0]; - }, 500); + + if(selectedTerm!=undefined) + { + + $("#selectedTermName_" + windowviewid).attr("name", selectedTerm._TermNumber); + $("#selectedTermName_" + windowviewid).val(selectedTerm._TermText); + + } + else + { + $("#selectedTermName_" + windowviewid).attr("name", "0"); + $("#selectedTermName_" + windowviewid).val(''); + } + + } + else + { + $("#selectedTermName_" + windowviewid).attr("name", "0"); + $("#selectedTermName_" + windowviewid).val(''); + } + + },100) + } - $scope.highlightPinBasedOnSerachItemEvent = function (termid) { + + + $scope.highlightPinBasedOnSerachItemEvent = function (termid,isTermListOptionClicked) { $rootScope.UnsaveCurriculum = true; - $scope.highlightPinBasedOnSerachItem(termid); + $scope.highlightPinBasedOnSerachItem(termid,isTermListOptionClicked); } - $scope.highlightPinBasedOnSerachItem = function (termid) { + $scope.highlightPinBasedOnSerachItem = function (termid,isTermListOptionClicked) { var windowviewid = (termid).split("_")[1]; - var id=(termid).split("_")[0]; + var TermNumber= termid.split('_')[0]; var currenttermidTxt = $('#' + termid).text(); + $scope.IsSearchVisible=false; + + + if (isTermListOptionClicked == true) { + $('#selectedTermName_' + windowviewid).val(''); + $("#selectedTermName_" + windowviewid).attr("name", '0'); + } + else + { + $('#selectedTermName_' + windowviewid).val(currenttermidTxt); + $("#selectedTermName_" + windowviewid).attr("name", TermNumber); + $("#termlistfilter_" + windowviewid).empty(); + $("#termlistfilter_" + windowviewid).css("display", "none"); + } $scope.showAllPinsAfterHide(windowviewid); - $('#termList option[selected="selected"]').prop("selected", false); - $('#termList option[value="' + currenttermidTxt + '"]').attr("selected", true); $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); - $('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); - - $("#termlistfilter_" + windowviewid + " li").find("a").css({ "background-color": "#ffffff", "color": "#000000" }); - $("#termlistfilter_" + windowviewid + " li").find("a[id=" + termid + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); - - $('#selectedTermName_' + windowviewid).val(currenttermidTxt); - + $("#termList").find("option[id=" + termid + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); + //get data from pindata for this trem var aaPinData = $scope.GetAAwindowStoreData(windowviewid,'aaPinData'); var pinDataForTerm = new jinqJs() .from(aaPinData) - .where("_TermId == " + id) + .where("_TermId == " + TermNumber) .select(); // birendra @@ -3249,23 +3806,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#aaDetailViewCanvas_'+windowviewid).setLayers({ fillStyle: radial, }).drawLayers(); - console.log(pinDataForTerm[0]._PinId); - var pinID = "PinArc_" + pinDataForTerm[0]._PinId; - + $scope.SetAAwindowStoreData(windowviewid,'clickedPins',[]); - var clickpin = []; - clickpin.push({ 'id': pinDataForTerm[0]._PinId }); - $scope.SetAAwindowStoreData(windowviewid, 'clickedPins', clickpin); - $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', []); - var selectedPins = []; - selectedPins.push(pinDataForTerm[0]._PinId); - $scope.SetAAwindowStoreData(windowviewid, 'selectedPins', selectedPins); - - $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]); - var activePin = []; - activePin.push(pinID); - $scope.SetAAwindowStoreData(windowviewid,'activePinArray',activePin); + $scope.SetAAwindowStoreData(windowviewid,'activePinArray',[]); + //clear all cb data + $scope.SetAAwindowStoreData(windowviewid, 'CBselectedpinCordinate', []); $scope.showAnnotation(pinDataForTerm, false, false, true,false,windowviewid); // maintaing scroll position on selection of options in list manager. @@ -3277,6 +3823,25 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } + $scope.MultipleAnnotation = function (event) { + var len= (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len-1]; + + //set true to false or vice versa + var iskeyctrlActive= $scope.GetAAwindowStoreData(windowviewid, 'keyctrl'); + + if(iskeyctrlActive) + { + $("#multiannotation_"+windowviewid).addClass("disableMultiAnnotationText"); + } + else + { + $("#multiannotation_"+windowviewid).removeClass("disableMultiAnnotationText"); + } + + $scope.SetAAwindowStoreData(windowviewid, 'keyctrl', !iskeyctrlActive); + } + $scope.ShowHideAnnotation = function (event) { var len= (event.currentTarget.id).split("_").length; var windowviewid = (event.currentTarget.id).split("_")[len-1]; @@ -3502,10 +4067,28 @@ function onSearchAA(event) { console.log('AA search is called') var scope = angular.element(document.getElementById("aaBodyView")).scope(); scope.$apply(function () { - scope.showItemsForSearch(event); + var len= (event.currentTarget.id).split("_").length; + var windowviewid = (event.currentTarget.id).split("_")[len-1]; + + if((event.currentTarget.id).match('btnSearchAA')) + scope.showItemsForSearch(windowviewid,true); + else + { + scope.showItemsForSearch(windowviewid,false); + } + + }); +} + +function changeaaSearchLanguage(event) { + event.stopPropagation(); + var scope = angular.element(document.getElementsByClassName("aaBodyView")).scope(); + scope.$apply(function () { + scope.changeaaSearchLanguage(event); }); } + function hideSearchList(event) { console.log('AA hide search is called') var scope = angular.element(document.getElementById("aaBodyView")).scope(); @@ -3514,12 +4097,12 @@ function hideSearchList(event) { }); } -function onSearchItemSelection(termid) { +function onSearchItemSelection(termid, isTermListOptionClicked) { console.log('AA hide search is called'); var scope = angular.element(document.getElementById("aaBodyView")).scope(); scope.$apply(function () { - scope.highlightPinBasedOnSerachItemEvent(termid); + scope.highlightPinBasedOnSerachItemEvent(termid,isTermListOptionClicked); }); } @@ -3532,6 +4115,14 @@ function showHideAnnotation(event) { }); } +function keyControlAAActive(event) { + + var scope = angular.element(document.getElementById("aaBodyView")).scope(); + scope.$apply(function () { + scope.MultipleAnnotation(event); + }); +} + function showSelectedPins(event) { console.log('showSelectedPins is called') diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html index 65742b7..eede1d5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html @@ -1,7 +1,7 @@ 
    -
    +
    diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html index f00d63f..f1c04b8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/CBuild-view.html @@ -2,7 +2,7 @@
    -
    +
      diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html index 6c077f1..1d1a676 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html @@ -62,6 +62,12 @@ background: #4b4b4b; border-color: #3f3f3f !important; } + .disableMultiAnnotationText { + background: #4b4b4b; + border-color: #3f3f3f !important; + } + +
      @@ -89,38 +95,45 @@
    • Skeletal
    • Urinary
    - -
    - +
    +
    + +
    +
    +
    -
    +

    Zoom

    -
    +
    diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index 16172d5..ea919d6 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -121,6 +121,11 @@ left: 0; right: 0; } + + .disableMultiAnnotationText { + background: #4b4b4b; + border-color: #3f3f3f !important; + }
    @@ -215,6 +220,10 @@
    +
    + +
    +
    @@ -231,7 +240,7 @@
    -
    +