Commit 939bc127464c2017019d6d5a86f1dec4f7289198
1 parent
321d39b4
in progress for jsPanel
Showing
5 changed files
with
114 additions
and
81 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
1 | 1 | |
2 | 2 | 'use strict'; |
3 | 3 | |
4 | -AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", | |
5 | -function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) { | |
4 | +AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "ModuleService", | |
5 | +function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService,ModuleService) { | |
6 | 6 | |
7 | 7 | |
8 | 8 | $scope.genderId = ""; |
... | ... | @@ -184,6 +184,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
184 | 184 | ) |
185 | 185 | } |
186 | 186 | |
187 | + $scope.openModuleItemView = function (event) { | |
188 | + //alert('openModuleItemView is called') | |
189 | + var moduleItemDataToBeSaved = event.target.id; | |
190 | + | |
191 | + var OpendTileData = []; | |
192 | + | |
193 | + OpendTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); | |
194 | + | |
195 | + $rootScope.imageName = OpendTileData[3]; | |
196 | + | |
197 | + $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + OpendTileData[3]; | |
198 | + //alert('img Name: ' +$scope.OpenItemImageName); | |
199 | + | |
200 | + var u = $location.url(); | |
201 | + $location.url('/module-item-view'); | |
202 | + } | |
203 | + | |
187 | 204 | //get the DA body view list based on selected gender |
188 | 205 | //get the DA body view list based on selected gender |
189 | 206 | $scope.getDAViewList = function ($event) { |
... | ... | @@ -437,51 +454,67 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
437 | 454 | //0. we will initially append container to load body |
438 | 455 | |
439 | 456 | //check if localstorage has any settings |
440 | - var curentEthnicity = localStorage.getItem("globalEthnicity"); | |
441 | - if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { | |
442 | - $rootScope.globalSetting.ethnicity = curentEthnicity; | |
443 | - } | |
457 | + //var curentEthnicity = localStorage.getItem("globalEthnicity"); | |
458 | + //if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { | |
459 | + // $rootScope.globalSetting.ethnicity = curentEthnicity; | |
460 | + //} | |
444 | 461 | |
445 | - var curentmodesty = localStorage.getItem("globalModesty"); | |
446 | - if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { | |
447 | - $rootScope.globalSetting.modesty = curentmodesty | |
448 | - } | |
462 | + //var curentmodesty = localStorage.getItem("globalModesty"); | |
463 | + //if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { | |
464 | + // $rootScope.globalSetting.modesty = curentmodesty | |
465 | + //} | |
449 | 466 | |
450 | 467 | //0.1 |
451 | - var currentBodyViewId = localStorage.getItem("currentBodyViewId"); | |
468 | + //var currentBodyViewId = localStorage.getItem("currentBodyViewId"); | |
452 | 469 | |
453 | - $scope.loadSearchDataForBodyView(); | |
470 | + //$scope.loadSearchDataForBodyView(); | |
454 | 471 | |
455 | 472 | |
456 | - console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); | |
473 | + //console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); | |
457 | 474 | |
458 | - var openViews; | |
459 | - if ($rootScope.openViews != null || $rootScope.openViews != undefined) { | |
460 | - if ($rootScope.openViews.length > 0) { | |
461 | - openViews = new jinqJs() | |
462 | - .from($rootScope.openViews) | |
463 | - .where("BodyViewId == " + currentBodyViewId) | |
464 | - .select(); | |
465 | - } | |
466 | - } | |
475 | + //var openViews; | |
476 | + //if ($rootScope.openViews != null || $rootScope.openViews != undefined) { | |
477 | + // if ($rootScope.openViews.length > 0) { | |
478 | + // openViews = new jinqJs() | |
479 | + // .from($rootScope.openViews) | |
480 | + // .where("BodyViewId == " + currentBodyViewId) | |
481 | + // .select(); | |
482 | + // } | |
483 | + //} | |
467 | 484 | |
468 | 485 | // 0.2 getting corresponding body view title |
469 | 486 | //var counter = 1; |
470 | - var tittle = localStorage.getItem("currentViewTitleFromJson"); | |
471 | - localStorage.setItem("currentViewTitle", tittle); | |
487 | + //var tittle = localStorage.getItem("currentViewTitleFromJson"); | |
488 | + //localStorage.setItem("currentViewTitle", tittle); | |
472 | 489 | |
473 | - | |
490 | + //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD | |
491 | + //if (openViews != null && openViews != undefined) { | |
492 | + // angular.forEach(openViews, function (value, key) { | |
493 | + | |
494 | + // if (value.bodyView == tittle) { | |
495 | + // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | |
496 | + // $rootScope.currentActiveViewTitle = tittle; | |
497 | + // localStorage.setItem("currentViewTitle", tittle); | |
498 | + // } | |
499 | + | |
500 | + // }); | |
501 | + //} | |
502 | + //else { | |
503 | + // localStorage.setItem("currentViewTitle", tittle); | |
504 | + //} | |
505 | + | |
506 | + //0.3 | |
474 | 507 | |
475 | 508 | $.jsPanel({ |
476 | 509 | id: 'daImagePanel', |
477 | 510 | selector: '.daBodyView', |
478 | 511 | theme: 'success', |
479 | - currentController: 'TileViewListController', | |
480 | - parentSlug: 'tile-view', | |
512 | + currentController: 'TileListViewController', | |
513 | + parentSlug: 'tile-view-list', | |
481 | 514 | ajax: { |
482 | - url: 'app/views/da/da-view.html' | |
515 | + url: 'app/views/aa/atlas-anatomy-detail.html' | |
483 | 516 | }, |
484 | - title: localStorage.getItem("currentViewTitle"), | |
517 | + title: "abc", | |
485 | 518 | |
486 | 519 | position: { |
487 | 520 | top: 70, |
... | ... | @@ -494,15 +527,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
494 | 527 | |
495 | 528 | console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel')) |
496 | 529 | //0.1 |
497 | - $rootScope.currentSlug = 'tile-view'; | |
530 | + //$rootScope.currentSlug = 'da-body-view'; | |
498 | 531 | |
499 | 532 | //0.2 |
500 | - $rootScope.openViews.push( | |
501 | - { | |
502 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
503 | - "slug": $rootScope.currentSlug | |
504 | - } | |
505 | - ); | |
533 | + //$rootScope.openViews.push( | |
534 | + // { | |
535 | + // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
536 | + // "slug": $rootScope.currentSlug | |
537 | + // } | |
538 | + // ); | |
506 | 539 | |
507 | 540 | //0.3 |
508 | 541 | var daBodyviewElement = angular.element(document.getElementById("daBodyview")); |
... | ... | @@ -520,7 +553,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
520 | 553 | |
521 | 554 | //1. load navigator man first |
522 | 555 | console.log('before LoadBodyViewNavigatorImage call') |
523 | - $scope.LoadBodyViewNavigatorImage(); | |
556 | + // $scope.LoadBodyViewNavigatorImage(); | |
524 | 557 | |
525 | 558 | //$scope.loadSearchDataForBodyView(); |
526 | 559 | |
... | ... | @@ -530,8 +563,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
530 | 563 | |
531 | 564 | //2. |
532 | 565 | |
533 | - console.log('currentBodyViewId just before sending: ' + currentBodyViewId); | |
534 | - $scope.loadBodyViewData(currentBodyViewId); | |
566 | + //console.log('currentBodyViewId just before sending: ' + currentBodyViewId); | |
567 | + // $scope.loadBodyViewData(currentBodyViewId); | |
535 | 568 | |
536 | 569 | //2. load bodyRegion data |
537 | 570 | $rootScope.isLoading = true; |
... | ... | @@ -7280,22 +7313,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7280 | 7313 | $scope.ShowSearch = function () { |
7281 | 7314 | |
7282 | 7315 | console.log('ShowSearch is called'); |
7283 | - //this check is for log only because we are writing length so need to check if its not null or undefined | |
7284 | - if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) | |
7285 | - console.log('$scope.VocabTermTxt.length= ' + $scope.VocabTermTxt.length) | |
7286 | - | |
7287 | - $timeout(function () { | |
7288 | - if (($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) && ($scope.VocabTermTxt.length > 0)) { | |
7289 | - $scope.IsSearchVisible = true; | |
7290 | - document.getElementById("termlistfilter").style.display = "block"; | |
7291 | - } | |
7292 | - else { | |
7293 | - $scope.loadSearchDataForBodyView(); | |
7294 | - if ($scope.VocabTermTxt.length > 0) { | |
7295 | - $scope.ShowSearch(); | |
7296 | - } | |
7297 | - } | |
7298 | - }, 500); | |
7316 | + ////this check is for log only because we are writing length so need to check if its not null or undefined | |
7317 | + //if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) | |
7318 | + // console.log('$scope.VocabTermTxt.length= ' + $scope.VocabTermTxt.length) | |
7319 | + | |
7320 | + //$timeout(function () { | |
7321 | + // if (($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) && ($scope.VocabTermTxt.length > 0)) { | |
7322 | + // $scope.IsSearchVisible = true; | |
7323 | + // document.getElementById("termlistfilter").style.display = "block"; | |
7324 | + // } | |
7325 | + // else { | |
7326 | + // $scope.loadSearchDataForBodyView(); | |
7327 | + // if ($scope.VocabTermTxt.length > 0) { | |
7328 | + // $scope.ShowSearch(); | |
7329 | + // } | |
7330 | + // } | |
7331 | + //}, 500); | |
7299 | 7332 | |
7300 | 7333 | //$scope.IsSearchVisible = true; |
7301 | 7334 | |
... | ... | @@ -8130,13 +8163,13 @@ function OnIdentityClick() { |
8130 | 8163 | |
8131 | 8164 | function OnZoom() { |
8132 | 8165 | //Dissectible Anatomy > Extract and Annotations displays apart on the page after click on Zoom-in. |
8133 | - $(".com").remove(); | |
8134 | - $("#bord").remove(); | |
8166 | + //$(".com").remove(); | |
8167 | + //$("#bord").remove(); | |
8135 | 8168 | console.log('OnZoom is called outside '); |
8136 | - var scope = angular.element(document.getElementById("daView")).scope(); | |
8137 | - scope.$apply(function () { | |
8138 | - scope.enableZoom(); | |
8139 | - }); | |
8169 | + //var scope = angular.element(document.getElementById("daView")).scope(); | |
8170 | + //scope.$apply(function () { | |
8171 | + // scope.enableZoom(); | |
8172 | + //}); | |
8140 | 8173 | } |
8141 | 8174 | |
8142 | 8175 | function onListManagerTermSelection(id) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... | ... | @@ -134,7 +134,7 @@ |
134 | 134 | right: 0; |
135 | 135 | } |
136 | 136 | </style> |
137 | -<div class=" " id="daView" ng-controller="TileViewListController"> | |
137 | +<div class=" " id="daView" ng-controller="TileViewListController" ng-init="alert('hi')"> | |
138 | 138 | <div class="pos-relative leftToolBar tools pull-left"> |
139 | 139 | <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;"></div> |
140 | 140 | <div class="" style="top:20px"> |
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | <button id="btnIdentity" onclick="OnIdentityClick()" class="btn btn-primary btn-sm tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Identify"> <img src="content/images/icon-identity.png" alt=""></button> |
143 | 143 | </div> |
144 | 144 | <div class="col-xs-6 pull-right"> |
145 | - <button class="btn btn-black btn-sm pull-right tooltip-custom" onclick="OnZoom()" id="btnZoom" data-toggle="tooltip" data-placement="bottom" title="Zoom-in/Zoom-out"> | |
145 | + <button class="btn btn-black btn-sm pull-right tooltip-custom" ng-click="OnZoom()" id="btnZoom" data-toggle="tooltip" data-placement="bottom" title="Zoom-in/Zoom-out"> | |
146 | 146 | <img src="content/images/icon-zoom.png" alt=""> |
147 | 147 | </button> |
148 | 148 | |
... | ... | @@ -283,7 +283,7 @@ |
283 | 283 | <div class=""> |
284 | 284 | <div class="input-group col-sm-8 col-xs-7 col-md-10 pull-left"> |
285 | 285 | |
286 | - <input type="text" class="form-control input-sm pull-left" id="typedtermname" ng-blur="HideSearch()" onclick="OnSearch()" ondblclick="OnSearch()" ng-model="searchFilter" ng-change="textChange(searchFilter)" placeholder="Search..."> | |
286 | + <input type="text" class="form-control input-sm pull-left" id="typedtermname" ng-blur="HideSearch()" ng-click="OnSearch()" ng-dblclick="OnSearch()" ng-model="searchFilter" ng-change="textChange(searchFilter)" placeholder="Search..."> | |
287 | 287 | |
288 | 288 | <div id="backdrop" ng-show="IsSearchVisible"> |
289 | 289 | <div class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left"> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -139,7 +139,7 @@ |
139 | 139 | <button id="btnIdentity" onclick="OnIdentityClick()" class="btn btn-primary btn-sm tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Identify"> <img src="content/images/icon-identity.png" alt=""></button> |
140 | 140 | </div> |
141 | 141 | <div class="col-xs-6 pull-right"> |
142 | - <button class="btn btn-black btn-sm pull-right tooltip-custom" onclick="OnZoom()" id="btnZoom" data-toggle="tooltip" data-placement="bottom" title="Zoom-in/Zoom-out"> | |
142 | + <button class="btn btn-black btn-sm pull-right tooltip-custom" ng-click="OnZoom()" id="btnZoom" data-toggle="tooltip" data-placement="bottom" title="Zoom-in/Zoom-out"> | |
143 | 143 | <img src="content/images/icon-zoom.png" alt=""> |
144 | 144 | </button> |
145 | 145 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html
1 | 1 | <div> |
2 | 2 | <div ng-include="aap/widget/MainMenu.html"></div> |
3 | - <div ng-init="openBodyView()" id="" class="daBodyView" ng-controller="DAController"></div> | |
3 | + <div ng-init="openBodyView()" id="" class="daBodyView" ng-controller="TileViewListController"></div> | |
4 | 4 | <!--<div > |
5 | 5 | |
6 | 6 | </div>--> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
... | ... | @@ -5,26 +5,26 @@ |
5 | 5 | <div class="col-sm-12" style="padding-left:25px; width:99%"> |
6 | 6 | |
7 | 7 | |
8 | - <!-- Nav tabs --> | |
9 | - <ul class="nav nav-tabs" role="tablist"> | |
10 | - <li role="presentation" id="Male" class="active" ng-click="getDAViewList($event)"><a><i class="fa fa-mars-stroke "></i> Male</a></li> | |
11 | - <li role="presentation" id="Female" ng-click="getDAViewList($event)"><a><i class="fa fa-venus"></i> Female</a></li> | |
12 | - </ul> | |
8 | + <!--<!-- Nav tabs --> | |
9 | + <!--<ul class="nav nav-tabs" role="tablist"> | |
10 | + <li role="presentation" id="Male" class="active" ng-click="getDAViewList($event)"><a><i class="fa fa-mars-stroke "></i> Male</a></li> | |
11 | + <li role="presentation" id="Female" ng-click="getDAViewList($event)"><a><i class="fa fa-venus"></i> Female</a></li> | |
12 | + </ul>--> | |
13 | 13 | <!-- Tab panes --> |
14 | - <div class="tab-content"> | |
15 | - <div role="tabpanel" class="tab-pane active"> | |
16 | - <div class="row" id="bodyViewList"> | |
17 | - | |
18 | - | |
19 | - | |
14 | + <div class="row tab-content" style="padding-left:25px; width:99%"> | |
15 | + <!--<div role="tabpanel" class="tab-pane active" id="grid-view">--> | |
16 | + <div role="tabpanel" id="grid-view"> | |
17 | + <div ng-repeat="(key,val) in moduleLandingData.data.root.Item"> | |
18 | + <div id="{{val._Id}}" class="col-sm-3 col-md-3" title="{{val._Title}}" ng-click="openModuleItemView($event)"> | |
19 | + <div class="thumbnail"> | |
20 | + <img class="tinyImg" id="{{val._Title}}" ng-src="../content/images/aa/thumbnails/{{val._TileImageName}}" alt="" title=""> | |
21 | + <div class="caption"><p>{{val._Title}}</p></div> | |
22 | + </div> | |
23 | + </div> | |
20 | 24 | </div> |
21 | 25 | </div> |
22 | - | |
23 | 26 | </div> |
24 | 27 | </div> |
25 | - </div> | |
26 | - </div> | |
27 | -</div> | |
28 | 28 | |
29 | 29 | <script> |
30 | 30 | $(function () { | ... | ... |