From 939bc127464c2017019d6d5a86f1dec4f7289198 Mon Sep 17 00:00:00 2001 From: amrita.vishnoi Date: Mon, 26 Dec 2016 17:48:37 +0530 Subject: [PATCH] in progress for jsPanel --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html | 6 +++--- 400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html | 2 +- 400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html | 30 +++++++++++++++--------------- 5 files changed, 114 insertions(+), 81 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 930fa4b..ba1b6cb 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -1,8 +1,8 @@  'use strict'; -AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", -function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) { +AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "ModuleService", +function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService,ModuleService) { $scope.genderId = ""; @@ -184,6 +184,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo ) } + $scope.openModuleItemView = function (event) { + //alert('openModuleItemView is called') + var moduleItemDataToBeSaved = event.target.id; + + var OpendTileData = []; + + OpendTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); + + $rootScope.imageName = OpendTileData[3]; + + $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + OpendTileData[3]; + //alert('img Name: ' +$scope.OpenItemImageName); + + var u = $location.url(); + $location.url('/module-item-view'); + } + //get the DA body view list based on selected gender //get the DA body view list based on selected gender $scope.getDAViewList = function ($event) { @@ -437,51 +454,67 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //0. we will initially append container to load body //check if localstorage has any settings - var curentEthnicity = localStorage.getItem("globalEthnicity"); - if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { - $rootScope.globalSetting.ethnicity = curentEthnicity; - } + //var curentEthnicity = localStorage.getItem("globalEthnicity"); + //if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { + // $rootScope.globalSetting.ethnicity = curentEthnicity; + //} - var curentmodesty = localStorage.getItem("globalModesty"); - if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { - $rootScope.globalSetting.modesty = curentmodesty - } + //var curentmodesty = localStorage.getItem("globalModesty"); + //if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { + // $rootScope.globalSetting.modesty = curentmodesty + //} //0.1 - var currentBodyViewId = localStorage.getItem("currentBodyViewId"); + //var currentBodyViewId = localStorage.getItem("currentBodyViewId"); - $scope.loadSearchDataForBodyView(); + //$scope.loadSearchDataForBodyView(); - console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); + //console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); - var openViews; - if ($rootScope.openViews != null || $rootScope.openViews != undefined) { - if ($rootScope.openViews.length > 0) { - openViews = new jinqJs() - .from($rootScope.openViews) - .where("BodyViewId == " + currentBodyViewId) - .select(); - } - } + //var openViews; + //if ($rootScope.openViews != null || $rootScope.openViews != undefined) { + // if ($rootScope.openViews.length > 0) { + // openViews = new jinqJs() + // .from($rootScope.openViews) + // .where("BodyViewId == " + currentBodyViewId) + // .select(); + // } + //} // 0.2 getting corresponding body view title //var counter = 1; - var tittle = localStorage.getItem("currentViewTitleFromJson"); - localStorage.setItem("currentViewTitle", tittle); + //var tittle = localStorage.getItem("currentViewTitleFromJson"); + //localStorage.setItem("currentViewTitle", tittle); - + //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD + //if (openViews != null && openViews != undefined) { + // angular.forEach(openViews, function (value, key) { + + // if (value.bodyView == tittle) { + // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; + // $rootScope.currentActiveViewTitle = tittle; + // localStorage.setItem("currentViewTitle", tittle); + // } + + // }); + //} + //else { + // localStorage.setItem("currentViewTitle", tittle); + //} + + //0.3 $.jsPanel({ id: 'daImagePanel', selector: '.daBodyView', theme: 'success', - currentController: 'TileViewListController', - parentSlug: 'tile-view', + currentController: 'TileListViewController', + parentSlug: 'tile-view-list', ajax: { - url: 'app/views/da/da-view.html' + url: 'app/views/aa/atlas-anatomy-detail.html' }, - title: localStorage.getItem("currentViewTitle"), + title: "abc", position: { top: 70, @@ -494,15 +527,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel')) //0.1 - $rootScope.currentSlug = 'tile-view'; + //$rootScope.currentSlug = 'da-body-view'; //0.2 - $rootScope.openViews.push( - { - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, - "slug": $rootScope.currentSlug - } - ); + //$rootScope.openViews.push( + // { + // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, + // "slug": $rootScope.currentSlug + // } + // ); //0.3 var daBodyviewElement = angular.element(document.getElementById("daBodyview")); @@ -520,7 +553,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //1. load navigator man first console.log('before LoadBodyViewNavigatorImage call') - $scope.LoadBodyViewNavigatorImage(); + // $scope.LoadBodyViewNavigatorImage(); //$scope.loadSearchDataForBodyView(); @@ -530,8 +563,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //2. - console.log('currentBodyViewId just before sending: ' + currentBodyViewId); - $scope.loadBodyViewData(currentBodyViewId); + //console.log('currentBodyViewId just before sending: ' + currentBodyViewId); + // $scope.loadBodyViewData(currentBodyViewId); //2. load bodyRegion data $rootScope.isLoading = true; @@ -7280,22 +7313,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.ShowSearch = function () { console.log('ShowSearch is called'); - //this check is for log only because we are writing length so need to check if its not null or undefined - if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) - console.log('$scope.VocabTermTxt.length= ' + $scope.VocabTermTxt.length) - - $timeout(function () { - if (($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) && ($scope.VocabTermTxt.length > 0)) { - $scope.IsSearchVisible = true; - document.getElementById("termlistfilter").style.display = "block"; - } - else { - $scope.loadSearchDataForBodyView(); - if ($scope.VocabTermTxt.length > 0) { - $scope.ShowSearch(); - } - } - }, 500); + ////this check is for log only because we are writing length so need to check if its not null or undefined + //if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) + // console.log('$scope.VocabTermTxt.length= ' + $scope.VocabTermTxt.length) + + //$timeout(function () { + // if (($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) && ($scope.VocabTermTxt.length > 0)) { + // $scope.IsSearchVisible = true; + // document.getElementById("termlistfilter").style.display = "block"; + // } + // else { + // $scope.loadSearchDataForBodyView(); + // if ($scope.VocabTermTxt.length > 0) { + // $scope.ShowSearch(); + // } + // } + //}, 500); //$scope.IsSearchVisible = true; @@ -8130,13 +8163,13 @@ function OnIdentityClick() { function OnZoom() { //Dissectible Anatomy > Extract and Annotations displays apart on the page after click on Zoom-in. - $(".com").remove(); - $("#bord").remove(); + //$(".com").remove(); + //$("#bord").remove(); console.log('OnZoom is called outside '); - var scope = angular.element(document.getElementById("daView")).scope(); - scope.$apply(function () { - scope.enableZoom(); - }); + //var scope = angular.element(document.getElementById("daView")).scope(); + //scope.$apply(function () { + // scope.enableZoom(); + //}); } function onListManagerTermSelection(id) { 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 a3b10f8..565aa4d 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 @@ -134,7 +134,7 @@ right: 0; } -
+
@@ -142,7 +142,7 @@
- @@ -283,7 +283,7 @@
- +
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 6a43531..216e796 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -139,7 +139,7 @@
- diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html index d991984..953633d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html @@ -1,6 +1,6 @@ 
-
+
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html index 054151c..011e681 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html @@ -5,26 +5,26 @@
- - + + -
-
-
- - - +
+ +
+
+
+
+ +

{{val._Title}}

+
+
-
-
-
-