diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js index 5ac240f..6c93e4d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js @@ -1,9 +1,6 @@ AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile", "$timeout", "ModuleService", "$interval", function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile, $timeout, ModuleService, $interval) { - - // $scope.threeDAnatomyData; - $scope.initialize3DWindowData = function (windowviewid, isOpenWithExistsModule, cbwindowid) { if (isOpenWithExistsModule || cbwindowid == 0) { if ($rootScope.TheeDWindowData != undefined) { @@ -114,6 +111,36 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location $('#CBDetailPageDiv').css('opacity', '1'); } + $scope.PanelActivity = function () { + + $("#" + $scope.jsPanelID).resize(function (event) { + //work on it + // alert('test'); + }); + // close panel + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); + + var len = (panelid).split("_").length; + var windowviewid = (panelid).split("_")[len - 1]; + + // remove old stored data after close panel + for (var index = 0 ; index < $rootScope.TheeDWindowData.length; index++) { + + if ($rootScope.TheeDWindowData[index].multiwinid == windowviewid) { + + if (index != -1) { + // remove module which one is loaded + $scope.TheeDWindowData.splice(index, 1); + $rootScope.resetjsPanelTop(); + } + } + } + + }); + } + $scope.loadAIModuleById = function (moduleId) { $rootScope.isCallFromOtherModule = undefined; @@ -194,41 +221,62 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location ); }; - $scope.Open3DModel = function ($event) { - $rootScope.currentBodyViewId = $event.currentTarget.id; - var windowviewid = $rootScope.MULTI_VIEW_ID; - var selectedThreeDAdata = $scope.Get3DwindowStoreData(windowviewid, 'threeDAnatomyData'); - - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { - var ThreeDTitle = []; - ThreeDTitle = new jinqJs() - .from(selectedThreeDAdata) - .where('_id = ' + $event.currentTarget.id) - .select('_Title', '_3dimagepath'); - - $rootScope.ViewTitle = ThreeDTitle[0]._Title; - } - else { - $rootScope.ViewTitle = $event.currentTarget.textContent; + $scope.Open3DModel = function ($event) { + // open module bu openresource + var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); + if (isopenResourceRequest == "true") { + + //set default module data + var ThreeDopenData = { + "id": $event.currentTarget.id, + "mType": 'THREE_D_ANATOMY', + "windowTitle": $event.currentTarget.textContent, + "size": { height: 600, width: 900 } + }; + + window.parent.AIAModuleOpenResourceInfo(ThreeDopenData); + + window.parent.closeIFrame(); } + else + { + $rootScope.currentBodyViewId = $event.currentTarget.id; + var windowviewid = $rootScope.MULTI_VIEW_ID; + var selectedThreeDAdata = $scope.Get3DwindowStoreData(windowviewid, 'threeDAnatomyData'); - localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); - localStorage.setItem("currentBodyViewId", $event.currentTarget.id); + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { + var ThreeDTitle = []; + ThreeDTitle = new jinqJs() + .from(selectedThreeDAdata) + .where('_id = ' + $event.currentTarget.id) + .select('_Title', '_3dimagepath'); - var ImagePath = ThreeDTitle[0]._3dimagepath; + $rootScope.ViewTitle = ThreeDTitle[0]._Title; + } + else { + $rootScope.ViewTitle = $event.currentTarget.textContent; - $scope.Set3DwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); - $scope.Set3DwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); - $scope.Set3DwindowStoreData(windowviewid, 'ImagePath', ImagePath); + } + + + localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); + localStorage.setItem("currentBodyViewId", $event.currentTarget.id); + + var ImagePath = ThreeDTitle[0]._3dimagepath; - var u = $location.url(); - $location.url('/3d-anatomy-details'); + $scope.Set3DwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); + $scope.Set3DwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); + $scope.Set3DwindowStoreData(windowviewid, 'ImagePath', ImagePath); + + var u = $location.url(); + $location.url('/3d-anatomy-details'); + } } - $scope.Open3DModelBodyMain = function () { + $rootScope.Open3DModelBodyMain = function () { if ($rootScope.isCallFromOtherModule) { $scope.ThreeDModuleData = ModuleService.getModuleData("THREE_D_ANATOMY"); @@ -409,7 +457,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location } - + $scope.PanelActivity(); } $scope.AnimationOnLoad = function (windowviewid) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index e735ca1..18d1e40 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -146,6 +146,36 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#CBDetailPageDiv').css('opacity', '1'); } + $scope.PanelActivity = function () { + + $("#" + $scope.jsPanelID).resize(function (event) { + //work on it + // alert('test'); + }); + // close panel + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); + + var len = (panelid).split("_").length; + var windowviewid = (panelid).split("_")[len - 1]; + + // remove old stored data after close panel + for (var index = 0 ; index < $rootScope.CAWindowData.length; index++) { + + if ($rootScope.CAWindowData[index].multiwinid == windowviewid) { + + if (index != -1) { + // remove module which one is loaded + $scope.CAWindowData.splice(index, 1); + $rootScope.resetjsPanelTop(); + } + } + } + + }); + } + $scope.loadAIModuleById = function (moduleId) { $rootScope.isCallFromOtherModule = undefined; @@ -585,70 +615,89 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $scope.openView = function ($event) { - var windowviewid = $rootScope.MULTI_VIEW_ID; - - $rootScope.disableAnnotationTBFn(); - $rootScope.MenuModuleName = "CA"; - //alert($rootScope.MenuModuleName); - $rootScope.currentBodyViewId = $event.currentTarget.id; - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { - var selectedTileData = []; - selectedTileData = new jinqJs() - .from($scope.selectedCAListViewData) - .where('_id = ' + $event.currentTarget.id) - .select(); + var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); + if (isopenResourceRequest == "true") { + + //set default module data + var CADopenData = { + "id": $event.currentTarget.id, + "mType": 'CLINICAL_ANIMATIONS', + "textVisible": true, + "windowTitle": $event.currentTarget.textContent, + "size": { height: 600, width: 900 } + }; - $rootScope.ViewTitle = selectedTileData[0]._Title; - } - else { - $rootScope.ViewTitle = $event.currentTarget.textContent; + window.parent.AIAModuleOpenResourceInfo(CADopenData); + + window.parent.closeIFrame(); } + else + { + var windowviewid = $rootScope.MULTI_VIEW_ID; - localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); - localStorage.setItem("currentBodyViewId", $event.currentTarget.id); + $rootScope.disableAnnotationTBFn(); + $rootScope.MenuModuleName = "CA"; + //alert($rootScope.MenuModuleName); + $rootScope.currentBodyViewId = $event.currentTarget.id; + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { + var selectedTileData = []; + selectedTileData = new jinqJs() + .from($scope.selectedCAListViewData) + .where('_id = ' + $event.currentTarget.id) + .select(); + + $rootScope.ViewTitle = selectedTileData[0]._Title; + } + else { + $rootScope.ViewTitle = $event.currentTarget.textContent; - $scope.SetCAwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); - $scope.SetCAwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); + } - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') - promise.then( - function (result) { - // $scope.AnimationData = result; - $scope.CAlistViewData = result.root.CAData; - var id = $scope.GetCAwindowStoreData(windowviewid, 'imageId'); - var clickedCAVideoData = []; - clickedCAVideoData = new jinqJs() - .from($scope.CAlistViewData) - .where('_id == ' + id) - .select('_Video', '_LowerSummary', '_HostedFolderId'); - - var clickedCAVideo = clickedCAVideoData[0]._Video; - var clickedCASummary = clickedCAVideoData[0]._LowerSummary; - var hostedFolderId = clickedCAVideoData[0]._HostedFolderId; - - $scope.SetCAwindowStoreData(windowviewid, 'clickedCAVideo', clickedCAVideo); - $scope.SetCAwindowStoreData(windowviewid, 'clickedCASummary', clickedCASummary); - $scope.SetCAwindowStoreData(windowviewid, 'hostedFolderId', hostedFolderId); - - var CAGridViewScrollPosition = $($window).scrollTop(); - localStorage.setItem('CAGridViewScroll', CAGridViewScrollPosition); - var u = $location.url(); - $location.url('/clinical-animations-detail'); + localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); + localStorage.setItem("currentBodyViewId", $event.currentTarget.id); - }, - function (error) { - // handle errors here - console.log(' $scope.AnimationData = ' + error.statusText); - } + $scope.SetCAwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); + $scope.SetCAwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); - ); + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist_mp4link.json') + promise.then( + function (result) { + // $scope.AnimationData = result; + $scope.CAlistViewData = result.root.CAData; + var id = $scope.GetCAwindowStoreData(windowviewid, 'imageId'); + var clickedCAVideoData = []; + clickedCAVideoData = new jinqJs() + .from($scope.CAlistViewData) + .where('_id == ' + id) + .select('_Video', '_LowerSummary', '_HostedFolderId'); + var clickedCAVideo = clickedCAVideoData[0]._Video; + var clickedCASummary = clickedCAVideoData[0]._LowerSummary; + var hostedFolderId = clickedCAVideoData[0]._HostedFolderId; + + $scope.SetCAwindowStoreData(windowviewid, 'clickedCAVideo', clickedCAVideo); + $scope.SetCAwindowStoreData(windowviewid, 'clickedCASummary', clickedCASummary); + $scope.SetCAwindowStoreData(windowviewid, 'hostedFolderId', hostedFolderId); + + var CAGridViewScrollPosition = $($window).scrollTop(); + localStorage.setItem('CAGridViewScroll', CAGridViewScrollPosition); + var u = $location.url(); + $location.url('/clinical-animations-detail'); + + }, + function (error) { + // handle errors here + console.log(' $scope.AnimationData = ' + error.statusText); + } + + ); + } } - $scope.openBodyViewMain = function () { + $rootScope.openCABodyViewMain = function () { if ($rootScope.isCallFromOtherModule) { $scope.CAModuleData = ModuleService.getModuleData("CLINICAL_ANIMATIONS"); @@ -901,6 +950,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } + $scope.PanelActivity(); } $scope.videoOnLoad = function (windowviewid) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index d3d5a65..ffcb661 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -30,14 +30,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }; //************************************ - - - - - - - $scope.setActiveTab = function (tabToSet) { $scope.activeTab = tabToSet; localStorage.setItem("currentCITabView", $scope.activeTab); @@ -159,6 +152,36 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $('#CBDetailPageDiv').css('opacity', '1'); } + $scope.PanelActivity = function () { + + $("#" + $scope.jsPanelID).resize(function (event) { + //work on it + // alert('test'); + }); + // close panel + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); + + var len = (panelid).split("_").length; + var windowviewid = (panelid).split("_")[len - 1]; + + // remove old stored data after close panel + for (var index = 0 ; index < $rootScope.CIWindowData.length; index++) { + + if ($rootScope.CIWindowData[index].multiwinid == windowviewid) { + + if (index != -1) { + // remove module which one is loaded + $scope.CIWindowData.splice(index, 1); + $rootScope.resetjsPanelTop(); + } + } + } + + }); + } + $scope.loadAIModuleById = function (moduleId) { $rootScope.isCallFromOtherModule = undefined; @@ -613,61 +636,79 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } - $scope.openView = function ($event) { - - var windowviewid = $rootScope.MULTI_VIEW_ID; - $rootScope.MenuModuleName = "CI"; - $rootScope.disableAnnotationTB = false; - $rootScope.CIAnotationIdentifyModeOff = true; - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { - var selectedTileData = []; - selectedTileData = new jinqJs() - .from($scope.selectedCIListViewData) - .where('_id = ' + $event.currentTarget.id) - .select(); + $scope.openView = function ($event) { + // open module bu openresource + var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); + if (isopenResourceRequest == "true") { + + //set default module data + var CIDopenData = { + "id": $event.currentTarget.id, + "mType": 'CLINICAL_ILLUSTRATIONS', + "textVisible": true, + "windowTitle": $event.currentTarget.textContent, + "size": { height: 600, width: 900 } + }; + + window.parent.AIAModuleOpenResourceInfo(CIDopenData); + + window.parent.closeIFrame(); - $rootScope.ViewTitle = selectedTileData[0]._Title; } else { - $rootScope.ViewTitle = $event.currentTarget.textContent; + var windowviewid = $rootScope.MULTI_VIEW_ID; + $rootScope.MenuModuleName = "CI"; + $rootScope.disableAnnotationTB = false; + $rootScope.CIAnotationIdentifyModeOff = true; + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { + var selectedTileData = []; + selectedTileData = new jinqJs() + .from($scope.selectedCIListViewData) + .where('_id = ' + $event.currentTarget.id) + .select(); + + $rootScope.ViewTitle = selectedTileData[0]._Title; + } + else { + $rootScope.ViewTitle = $event.currentTarget.textContent; - } - - localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); - localStorage.setItem("currentImageId", $event.currentTarget.id); - - $scope.SetCIwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); - $scope.SetCIwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); + } - var imageName = selectedTileData[0]._contentImage; - - $scope.SetCIwindowStoreData(windowviewid, 'imageName', imageName); + localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); + localStorage.setItem("currentImageId", $event.currentTarget.id); - var imagePath = "~/../content/images/ci/images/" + imageName; + $scope.SetCIwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); + $scope.SetCIwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); - $scope.SetCIwindowStoreData(windowviewid, 'CIImagePath', imagePath); + var imageName = selectedTileData[0]._contentImage; - var selectedImageCISummary = selectedTileData[0]._Summary + $scope.SetCIwindowStoreData(windowviewid, 'imageName', imageName); - $scope.SetCIwindowStoreData(windowviewid, 'ImageSummary', selectedImageCISummary); + var imagePath = "~/../content/images/ci/images/" + imageName; - // store image for export - var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); - $rootScope.StoreTitleName(tittle); - $rootScope.StoreOrgImageName(imageName); + $scope.SetCIwindowStoreData(windowviewid, 'CIImagePath', imagePath); + var selectedImageCISummary = selectedTileData[0]._Summary - //Set the vertical scroll value of the Grid-View. - var y = $($window).scrollTop(); - localStorage.setItem("CIGridViewScroll", y); - var u = $location.url(); - $location.url('/clinical-illustrations-detail'); + $scope.SetCIwindowStoreData(windowviewid, 'ImageSummary', selectedImageCISummary); - + // store image for export + var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); + $rootScope.StoreTitleName(tittle); + $rootScope.StoreOrgImageName(imageName); + + //Set the vertical scroll value of the Grid-View. + var y = $($window).scrollTop(); + localStorage.setItem("CIGridViewScroll", y); + var u = $location.url(); + $location.url('/clinical-illustrations-detail'); + + } + } - $scope.openBodyViewMain = function () { + $rootScope.openCIBodyViewMain = function () { if ($rootScope.isCallFromOtherModule) { $scope.CIModuleData = ModuleService.getModuleData("CLINICAL_ILLUSTRATIONS"); @@ -785,10 +826,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout else { $scope.SetCIwindowStoreData($rootScope.MULTI_VIEW_ID, 'parentSlugName', 'clinical-illustrations'); $scope.loadCIllustration($rootScope.MULTI_VIEW_ID); - } - - - + } } $scope.loadCIllustration = function (windowviewid) { @@ -902,6 +940,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); + $scope.PanelActivity(); } $scope.$on('annotationToolEvent', function (event, data) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index 4d58633..eb121bf 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -1419,35 +1419,90 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ } $scope.load3DAnatomyModule = function (moduleName) { - $rootScope.isCallFromOtherModule = true; - $('#parentcustomDiv').append($('
')); - $e = $('#theeDCustomModuleDiv' + $scope.Slidenumber).append(""); - $compile($e)($scope); + + var ThreeDData = ModuleService.getModuleData(moduleName); + + if (ThreeDData != undefined && ThreeDData.length > 0) { + $rootScope.isCallFromOtherModule = true; + + var threeDSectionExist = document.getElementById('theeDCustomModuleDiv' + $scope.Slidenumber); + + if (threeDSectionExist == null) { + $('#parentcustomDiv').append($('
')); + $e = $('#theeDCustomModuleDiv' + $scope.Slidenumber).append(""); + $compile($e)($scope); + } + else { + // open new 3D panel on same slide by open resource + $rootScope.Open3DModelBodyMain(); + } + + } } $scope.loadClinicalAnimationModule = function (moduleName) { - $rootScope.isCallFromOtherModule = true; - $('#parentcustomDiv').append($('
')); - $e = $('#caCustomModuleDiv' + $scope.Slidenumber).append(""); - $compile($e)($scope); + var CAData = ModuleService.getModuleData(moduleName); + + if (CAData != undefined && CAData.length > 0) { + $rootScope.isCallFromOtherModule = true; + + var caSectionExist = document.getElementById('caCustomModuleDiv' + $scope.Slidenumber); + + if (caSectionExist == null) { + $('#parentcustomDiv').append($('
')); + $e = $('#caCustomModuleDiv' + $scope.Slidenumber).append(""); + $compile($e)($scope); + } + else { + // open new aa panel on same slide by open resource + $rootScope.openCABodyViewMain(); + } + + } + } $scope.loadClinicalIllustrationModule = function (moduleName) { - $rootScope.isCallFromOtherModule = true; - //slide number to terminate last load module on prev slide - // aaCustomModuleDiv new div create for new slide load - $('#parentcustomDiv').append($('
')); - $e = $('#ciCustomModuleDiv' + $scope.Slidenumber).append(""); - $compile($e)($scope); + var CIData = ModuleService.getModuleData(moduleName); + + if (CIData != undefined && CIData.length > 0) { + $rootScope.isCallFromOtherModule = true; + + var ciSectionExist = document.getElementById('ciCustomModuleDiv' + $scope.Slidenumber); + + if (ciSectionExist == null) { + $('#parentcustomDiv').append($('
')); + $e = $('#ciCustomModuleDiv' + $scope.Slidenumber).append(""); + $compile($e)($scope); + } + else { + // open new aa panel on same slide by open resource + $rootScope.openCIBodyViewMain(); + } + + } + } $scope.loadAtlasAnatomyModule = function (moduleName) { - $rootScope.isCallFromOtherModule = true; + var AAData = ModuleService.getModuleData(moduleName); + + if (AAData != undefined && AAData.length > 0) { + $rootScope.isCallFromOtherModule = true; + + var aaSectionExist = document.getElementById('aaCustomModuleDiv' + $scope.Slidenumber); + + if (aaSectionExist == null) { + $('#parentcustomDiv').append($('
')); + $e = $('#aaCustomModuleDiv' + $scope.Slidenumber).append(""); + $compile($e)($scope); + } + else { + // open new aa panel on same slide by open resource + $rootScope.openAAModuleItemMain(); + } + + } - //slide number to terminate last load module on prev slide - // aaCustomModuleDiv new div create for new slide load - $('#parentcustomDiv').append($('
')); - $e = $('#aaCustomModuleDiv' + $scope.Slidenumber).append(""); - $compile($e)($scope); } $scope.loadDissectibleAnatomyModule = function (moduleName) { var DAData = ModuleService.getModuleData(moduleName); @@ -1457,24 +1512,17 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var daSectionExist = document.getElementById('daCustomModuleDiv' + $scope.Slidenumber); - if (daSectionExist==null) - { + if (daSectionExist==null){ $('#parentcustomDiv').append($('
')); - $e = $('#daCustomModuleDiv' + $scope.Slidenumber).append(""); - $compile($e)($scope); - } else { // open new da panel on same slide by open resource $rootScope.openDABodyViewMain(); - } - - + } } - } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index f671a78..34c8250 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -487,12 +487,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.openView = function ($event) { - - $rootScope.disableAnnotationTB = false; - $rootScope.MenuModuleName = "DA"; - $rootScope.isLoading = true; - $('#spinner').css('visibility', 'visible'); - // open module bu openresource var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); @@ -536,15 +530,23 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l window.parent.closeIFrame(); } - else { + else + { + + $rootScope.disableAnnotationTB = false; + $rootScope.MenuModuleName = "DA"; + $rootScope.isLoading = true; + $('#spinner').css('visibility', 'visible'); + $scope.SetwindowStoreData($rootScope.MULTI_VIEW_ID,'currentViewTitle',$event.currentTarget.textContent); localStorage.setItem("currentViewTitle", $event.currentTarget.textContent); // use at home controller localStorage.setItem("currentBodyViewId", $event.currentTarget.id); - $location.url('/da-body-view'); - } - $rootScope.isLoading = false; - $('#spinner').css('visibility', 'hidden'); + $location.url('/da-body-view'); + $rootScope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); + } + } //load json data for body view @@ -942,10 +944,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var bodyViewId=$scope.GetwindowStoreData(windowviewid,'voId'); if (document.getElementById('daViewDA_'+windowviewid) != null) { $scope.loadDAView(bodyViewId, windowviewid); - } - else if (document.getElementById("daViewDA_" + windowviewid) != null) { - $scope.loadDAView(bodyViewId, windowviewid); - } + } else { // this is a work around solution for a bug where DA does not load for long and user need to close the DA partially opened // view, now we are programmatically closing the hung view and when user will reopen the DA view from tile then it will @@ -954,9 +953,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var jsPanelCloseBtnID = $scope.jsPanelID + " " + ".jsglyph-remove" $("#" + jsPanelCloseBtnID).click(); - // console.log('html is compiled in else ' + document.getElementById('daView')) - } + } $scope.loadDAView = function (currentBodyViewId, windowviewid) { @@ -1339,6 +1337,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if (index != -1) { // remove module which one is loaded $scope.DaWindowData.splice(index, 1); + $rootScope.resetjsPanelTop(); } } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index af612f0..a91379a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -141,7 +141,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A currentController: 'HomeController', parentSlug: 'curriculum-builder-detail', content: '
' + - '', + '', title: "Open Module in Curriculum Builder", position: { top: 1, @@ -152,7 +152,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A size: { width: screen.width-10, - height: 600 + height: 610 }, }); @@ -175,7 +175,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A var head = $(innerDoc).contents().find("head"); $scope.loadopenresourceContent(head, iframe); - }, 1000); + }, 500); } } @@ -195,6 +195,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A '#Link\\/complementary-and-alternate-medicine{pointer-events: none; opacity: .3} ' + '#ADAM-images{pointer-events: none; opacity: .3} ' + '#Link\\/bodyguide{pointer-events: none; opacity: .3} ' + + '#Link\\/symptom-navigator{pointer-events: none; opacity: .3} ' + '#Link\\/health-navigator{pointer-events: none; opacity: .3} ' + '#Link\\/wellness-tools{pointer-events: none; opacity: .3} ' + '#Link\\/aod{pointer-events: none; opacity: .3} ' + @@ -202,33 +203,17 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A ''; + var storefunc = ''; + $(header).append(css); - $(iframe).contents().on("mousedown, mouseup, click", function(){ - alert("Click detected inside iframe."); - }); + $(header).append(storefunc); + $timeout(function () { - var elmnt = iframe.contentWindow.document.getElementById("da-view-list"); - // var location1 = iframe.contentWindow.document.location.href; - - // $('#' + elmnt.id).trigger('click'); - // $("#" + elmnt.id).css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); - // iframe.setAttribute("src", location + "/da-view-list"); - //window.location.href = location; - // var currentlocation = iframe.contentWindow.document.location.href; - // iframe.contentWindow.document.locatiom.replace(currentlocation + "da-view-list"); - // document.getElementById("OpenModuleInCB").src = "http://stackoverflow.com"; - // location.replace(elmnt.href); - - // URLUtils.href='/da-body-view'; - // $location.url('/da-body-view'); - // var hrf=iframe.contentWindow.location.href; - // iframe.contentWindow.location.href=hrf+'da-body-view'; - // iframe.onload = null; - - // window.top.location.href = "http://www.example.com"; - // var myframe = iframe; + // var elmnt = iframe.contentWindow.document.getElementById("da-view-list"); + //$('#' + elmnt.id).trigger('click'); + OpenDefaultModule(iframe); - }, 2000); + }, 500); } @@ -266,13 +251,14 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A } $scope.EnableDisableExportImage=function() { - //disable export image for users other than instructors. And for demo user - if (($rootScope.userData.EditionId != 1 && $rootScope.userData.EditionId != 2) || $rootScope.userData.UserTypeId==8) { - $('#exportImageAnchor').parent().addClass('exportImage'); + //enable export image for instructors edition and for superadmin .disable for demo/test user + if ((($rootScope.userData.EditionId == 1) || ($rootScope.userData.EditionId == 2) || ($rootScope.userData.EditionId == 0)) && ($rootScope.userData.UserTypeId != 8)) { + + $('#exportImageAnchor').parent().removeClass('exportImage'); } else { - $('#exportImageAnchor').parent().removeClass('exportImage'); + $('#exportImageAnchor').parent().addClass('exportImage'); } } @@ -1605,25 +1591,57 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A return paneltopPosition; } + // CB: reset panel top position when if any module closed + $rootScope.resetjsPanelTop = function () { + + $timeout(function () { + var firsttopPosition = 680; + var moduleImagePanel = $("div[id*='ImagePanel']"); + + if (moduleImagePanel.length > 0) { + for (var index = 0; index < moduleImagePanel.length; index++) { + + if (index == 0) { + var panel1 = document.getElementById(moduleImagePanel[index].id); + + $("#" + panel1.id).css("top", firsttopPosition + 'px'); + + } + else { + var prevpanel = document.getElementById(moduleImagePanel[index - 1].id); + var lastTop = prevpanel.offsetTop + prevpanel.offsetHeight + 10; + var lastpanel = document.getElementById(moduleImagePanel[index].id); + + $("#" + lastpanel.id).css("top", lastTop + 'px'); + } + + } + } + + }, 500); + + + } $scope.$on("cBEnableDisableMenuOption", function (evt, name) { $rootScope.panelNameWithCb = name; - if (($rootScope.userData.EditionId != 1 && $rootScope.userData.EditionId != 2) || $rootScope.userData.UserTypeId == 8) { - $('#exportImageAnchor').parent().addClass('exportImage'); + //enable export image for instructors edition and for superadmin .disable for demo/test user + if ((($rootScope.userData.EditionId == 1) || ($rootScope.userData.EditionId == 2) || ($rootScope.userData.EditionId == 0)) && ($rootScope.userData.UserTypeId != 8)) { - } - else - { if (name != "") { - $('#exportImageAnchor').parent().removeClass('exportImage'); + $('#exportImageAnchor').parent().removeClass('exportImage'); } else { - $('#exportImageAnchor').parent().addClass('exportImage'); + $('#exportImageAnchor').parent().addClass('exportImage'); } } + else + { + $('#exportImageAnchor').parent().addClass('exportImage'); + } if (name != "") { $('#printAVAnchor').parent().removeClass('PrintViewer'); @@ -6748,7 +6766,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A $rootScope.StoreModuleName = function (moduleName) { - var userid= $rootScope.userData.Id; + var userid = $rootScope.userData.Id; $scope.UpdateUserExportImageData(userid,'ModuleName',moduleName); } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 0b3856f..0aa0761 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -286,61 +286,85 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#list-view').css('display', 'none'); } - $scope.openModuleItemView = function (event) { - var windowviewid= $rootScope.MULTI_VIEW_ID; - $rootScope.MenuModuleName = "AA"; - localStorage.setItem("activeTab", $scope.activeTab); - //0. Get selected Image Id - if ($scope.isListViewButtonClicked == true) { - if ($scope.isOpenBtnClicked == true) { + $scope.openModuleItemView = function ($event) { + // open module bu openresource + var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); + if (isopenResourceRequest == "true") { + + //set default module data + var AAopenData = { + "id": $event.currentTarget.id, + "mType": 'ATLAS_ANATOMY', + "showAllPins":true, + "windowTitle": $event.currentTarget.textContent, + "size": { height: 600, width: 900 } + }; + + window.parent.AIAModuleOpenResourceInfo(AAopenData); + + window.parent.closeIFrame(); + + } + else + { + var windowviewid = $rootScope.MULTI_VIEW_ID; + $rootScope.MenuModuleName = "AA"; + localStorage.setItem("activeTab", $scope.activeTab); - var moduleItemDataToBeSaved = $("#demoText").text().trim(); - $scope.isOpenBtnClicked = false; + //0. Get selected Image Id + if ($scope.isListViewButtonClicked == true) { + if ($scope.isOpenBtnClicked == true) { + + var moduleItemDataToBeSaved = $("#demoText").text().trim(); + $scope.isOpenBtnClicked = false; + } + else { + var moduleItemDataToBeSavedID = $event.currentTarget.id; + localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); + var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); + } } else { - var moduleItemDataToBeSavedID = event.currentTarget.id; - localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); - var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); + var moduleItemDataToBeSaved = $event.target.id; + localStorage.setItem("listViewSelectedID", $event.currentTarget.id); + $scope.isListViewButtonClicked = false; } - } - else { - var moduleItemDataToBeSaved = event.target.id; - localStorage.setItem("listViewSelectedID", event.currentTarget.id); - $scope.isListViewButtonClicked = false; - } - //1.Filter selected module ietem data and get the pushed opened moduile array object - var OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); + //1.Filter selected module ietem data and get the pushed opened moduile array object + var OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); - //2. Pick the image name to create a source to open + //2. Pick the image name to create a source to open - $scope.SetAAwindowStoreData(windowviewid,'imageId',OpenedTileData[0]); + $scope.SetAAwindowStoreData(windowviewid, 'imageId', OpenedTileData[0]); - $scope.SetAAwindowStoreData(windowviewid, 'imageName', OpenedTileData[3]); - var imageName = OpenedTileData[3]; + $scope.SetAAwindowStoreData(windowviewid, 'imageName', OpenedTileData[3]); + var imageName = OpenedTileData[3]; - $scope.SetAAwindowStoreData(windowviewid,'bodySystemName',OpenedTileData[2]); + $scope.SetAAwindowStoreData(windowviewid, 'bodySystemName', OpenedTileData[2]); - var OpenItemImagePath = "../../../content/images/aa/images/" + OpenedTileData[3]; - $scope.SetAAwindowStoreData(windowviewid,'OpenItemImagePath',OpenItemImagePath); + var OpenItemImagePath = "../../../content/images/aa/images/" + OpenedTileData[3]; + $scope.SetAAwindowStoreData(windowviewid, 'OpenItemImagePath', OpenItemImagePath); + + $rootScope.listArray.push({ "imageName": OpenItemImagePath, "text": moduleItemDataToBeSaved }); + //3. set opened module item ti + localStorage.setItem("currentViewTitle", OpenedTileData[6]); + if ($('#grid-view').css("display") == "block") { + localStorage.setItem("AAGridViewScroll", $($window).scrollTop()); + localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); + } + + $scope.SetAAwindowStoreData(windowviewid, 'currentViewTitle', OpenedTileData[6]); + // store image for export + var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); + $rootScope.StoreTitleName(tittle); + $rootScope.StoreOrgImageName(imageName); + + //3. Navigate to the Module-item-view + var u = $location.url(); + $location.url('/module-item-view'); - $rootScope.listArray.push({ "imageName": OpenItemImagePath, "text": moduleItemDataToBeSaved }); - //3. set opened module item ti - localStorage.setItem("currentViewTitle", OpenedTileData[6]); - if ($('#grid-view').css("display") == "block") { - localStorage.setItem("AAGridViewScroll", $($window).scrollTop()); - localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); } - - $scope.SetAAwindowStoreData(windowviewid, 'currentViewTitle', OpenedTileData[6]); - // store image for export - var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); - $rootScope.StoreTitleName(tittle); - $rootScope.StoreOrgImageName(imageName); - - //3. Navigate to the Module-item-view - var u = $location.url(); - $location.url('/module-item-view'); + } @@ -360,7 +384,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#viewList").append("
" + moduleItemDataToBeSaved + "
Open
"); } - $scope.openModuleItemMain = function () { + $rootScope.openAAModuleItemMain = function () { if ($rootScope.isCallFromOtherModule) { $scope.AAModuleData = ModuleService.getModuleData("ATLAS_ANATOMY"); @@ -437,8 +461,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.SetAAwindowStoreData(windowviewid,'currentViewTitle',anatomyTitle); localStorage.setItem("currentViewTitle", anatomyTitle); - var systemId = $scope.aaOpenInOtherModules.selectedBodysystemId; - $scope.SetAAwindowStoreData(windowviewid,'SelectedSystemID',systemId); + if ($scope.aaOpenInOtherModules.selectedBodysystemId != undefined) + { + var systemId = $scope.aaOpenInOtherModules.selectedBodysystemId; + $scope.SetAAwindowStoreData(windowviewid, 'SelectedSystemID', systemId); + } + // note:: in few json like "articulation" imageId as same id // get wrong detail by imageId @@ -845,14 +873,31 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou angular.element(document).ready(function (e) { - $($scope.jsPanelID).resize(function () { + $("#" + $scope.jsPanelID).resize(function () { $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition); $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition); }); // $(document).on("click", "#" + $scope.jsPanelID +" .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function (event) { $(document).on("click", "#" + $scope.jsPanelID +" .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { - // $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); + + var len = (panelid).split("_").length; + var windowviewid = (panelid).split("_")[len - 1]; + + // remove old stored data after close panel + for (var index = 0 ; index < $rootScope.AAWindowData.length; index++) { + + if ($rootScope.AAWindowData[index].multiwinid == windowviewid) { + + if (index != -1) { + // remove module which one is loaded + $scope.AAWindowData.splice(index, 1); + $rootScope.resetjsPanelTop(); + } + } + } + $scope.setActiveTab(parseInt($rootScope.getLocalStorageValue("activeTab"))); $(".tools").css("z-index", "15000"); $rootScope.selectedBodySystemName = 'All'; @@ -873,30 +918,33 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var clickedPins=$scope.GetAAwindowStoreData(windowviewid,'clickedPins'); var activePinArray=$scope.GetAAwindowStoreData(windowviewid,'activePinArray'); - for (var i = 0; i < $scope.aaOpenInOtherModules.selectedPins.length; i++) { - - var pinid=$scope.aaOpenInOtherModules.selectedPins[i]; - var pinvalue='PinArc_' + pinid; + if ($scope.aaOpenInOtherModules.selectedPins != undefined) { + for (var i = 0; i < $scope.aaOpenInOtherModules.selectedPins.length; i++) { + + var pinid = $scope.aaOpenInOtherModules.selectedPins[i]; + var pinvalue = 'PinArc_' + pinid; var isFound = jQuery.inArray(pinvalue, activePinArray) if (isFound == -1) { activePinArray.push(pinvalue); - clickedPins.push({ 'id': pinid}); + clickedPins.push({ 'id': pinid }); } - } + } + } + if ($scope.aaOpenInOtherModules.selectedCallouts != undefined) { for (var i = 0; i < $scope.aaOpenInOtherModules.selectedCallouts.length; i++) { - - CBselectedpinCordinate.push( - { - "hy": $scope.aaOpenInOtherModules.selectedCallouts[i].hy, - "ly": $scope.aaOpenInOtherModules.selectedCallouts[i].ly, - "hx": $scope.aaOpenInOtherModules.selectedCallouts[i].hx, - "lx": $scope.aaOpenInOtherModules.selectedCallouts[i].lx - }); - } + CBselectedpinCordinate.push( + { + "hy": $scope.aaOpenInOtherModules.selectedCallouts[i].hy, + "ly": $scope.aaOpenInOtherModules.selectedCallouts[i].ly, + "hx": $scope.aaOpenInOtherModules.selectedCallouts[i].hx, + "lx": $scope.aaOpenInOtherModules.selectedCallouts[i].lx + }); + } + } if($scope.aaOpenInOtherModules.showSelectedPins!=undefined) { @@ -1830,51 +1878,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { $("#"+speechbubbleDivId).css("min-width", "auto"); $("#"+speechbubbleDivId).css("white-space", "nowrap"); - // if ($scope.longestAnnotation.length <= 10) { - - - // $("#"+speechbubbleDivId).css("width", "100px"); - - // } - - // else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { - - - - // $("#"+speechbubbleDivId).css("width", "140px"); - - // } - // else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { - - - // $("#"+speechbubbleDivId).css("width", "195px"); - - // } - // else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { - - // $("#"+speechbubbleDivId).css("width", "248px"); - - // } - // else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { - - - // $("#"+speechbubbleDivId).css("width", "300px"); - // } - - // else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { - - // $("#"+speechbubbleDivId).css("width", "370px"); - // } - - // else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { - // $("#"+speechbubbleDivId).css("width", "450px"); - // } - // else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { - // $("#"+speechbubbleDivId).css("width", "510px"); - // } - // else { - // $("#"+speechbubbleDivId).css("width", ($scope.longestAnnotation.length) + "%"); - // } + } } var speechBubbleDims = []; @@ -2292,7 +2296,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#termList').empty(); $('#termlistfilter_' + windowviewid).empty(); for (var j = 0; j < pinTermData.length; j++) { - var $el = $('
  • ' + pinTermData[j].TermTxt + '
  • ').appendTo('#termlistfilter_' + windowviewid) + var $el = $('
  • ' + pinTermData[j].TermTxt + '
  • ').appendTo('#termlistfilter_' + windowviewid) $compile($el)($scope); var $selectedOptions = $('').appendTo('#termList') @@ -2695,12 +2699,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.highlightPinBasedOnSerachItem = function (id,windowviewid) { - if(windowviewid==undefined) // call also from also home controller list manager - windowviewid= $rootScope.MULTI_VIEW_ID; - + var currenttermidTxt = ""; + if (windowviewid == undefined) // call also from also home controller list manager + { + windowviewid = $rootScope.MULTI_VIEW_ID; + } + else + { + currenttermidTxt = $('#' + event.currentTarget.id).text(); + } + $scope.showAllPinsAfterHide(windowviewid); - $scope.searchItemText = $("#" + id).val(); $rootScope.searchSelectedText = $("#" + id).val(); $('#termList option[selected="selected"]').prop("selected", false); $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); @@ -2709,12 +2719,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#termlistfilter_" + windowviewid + " li").find("a").css({ "background-color": "#ffffff", "color": "#000000" }); $("#termlistfilter_" + windowviewid + " li").find("a[id=" + id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); - - $scope.searchFilter = $("#" + id).val(); - - $('#selectedTermName_' + windowviewid).val(); - - $('#selectedTermName_' + windowviewid).attr("placeholder", "search... "); + + $('#selectedTermName_' + windowviewid).val(currenttermidTxt); //get data from pindata for this trem @@ -3003,7 +3009,7 @@ function hideSearchList(event) { } function onSearchItemSelection(id,windowviewid) { - + console.log('AA hide search is called'); var scope = angular.element(document.getElementById("aaBodyView")).scope(); scope.$apply(function () { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js index 627a358..7170d07 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js @@ -176,8 +176,7 @@ AIA.service('ModuleService', function ($http, DataService) { containsCapturedContent: windowData.containsCapturedContent, textVisible: windowData.textVisible, anatomyTitle: windowData.windowTitle, - horizontalScroll: windowData.scrollFlvPosition.horizontal + 'px', - verticalScroll: windowData.scrollFlvPosition.vertical + 'px', + scrollPosition: windowData.scrollFlvPosition, imageId: windowData.imageId, maximised: windowData.maximised, minimised: windowData.minimised, @@ -195,8 +194,7 @@ AIA.service('ModuleService', function ($http, DataService) { containsCapturedContent: windowData.containsCapturedContent, textVisible: windowData.textVisible, anatomyTitle: windowData.windowTitle, - horizontalScroll: windowData.scrollPosition.horizontal + 'px', - verticalScroll: windowData.scrollPosition.vertical + 'px', + scrollPosition: windowData.scrollPosition, imageId: windowData.imageId, maximised: windowData.maximised, minimised: windowData.minimised, @@ -217,8 +215,7 @@ AIA.service('ModuleService', function ($http, DataService) { selectedPins: windowData.selectedPins, selectedBodysystemId: windowData.bodySystemId, hideAnnotations: windowData.hideCallOuts, - horizontalScroll: windowData.scrollPosition.horizontal + 'px', - verticalScroll: windowData.scrollPosition.vertical + 'px', + scrollPosition: windowData.scrollPosition, zoomLevel: windowData.scaleIndex, showSelectedPins: windowData.showSelectedPins, hideAllPins: windowData.hideAllPins, diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/module-item-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/module-item-view.html index 6fe3c46..4f720cc 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/module-item-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/module-item-view.html @@ -1,6 +1,6 @@ 
    -
    +
    diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/clinical-animations-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/clinical-animations-detail.html index 150e423..0107b9f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/clinical-animations-detail.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/clinical-animations-detail.html @@ -1,4 +1,4 @@ 
    -
    +
    diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ci/clinical-illustrations-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ci/clinical-illustrations-detail.html index a599678..71369d5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ci/clinical-illustrations-detail.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ci/clinical-illustrations-detail.html @@ -1,6 +1,6 @@ 
    -
    +