Commit 4e8c3211d226d4295c2bd614d0c534c4327c74ee
1 parent
8652154d
tileview.html has been changes
Showing
3 changed files
with
109 additions
and
34 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -16,7 +16,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -16,7 +16,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
16 | 16 | ||
17 | console.log('loadForModuleById is called') | 17 | console.log('loadForModuleById is called') |
18 | $rootScope.moduleName = Modules[moduleId].Name; | 18 | $rootScope.moduleName = Modules[moduleId].Name; |
19 | - | 19 | + |
20 | var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName) | 20 | var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName) |
21 | 21 | ||
22 | .then( | 22 | .then( |
@@ -55,8 +55,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -55,8 +55,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
55 | } | 55 | } |
56 | 56 | ||
57 | 57 | ||
58 | - $scope.openModuleItem = function () | ||
59 | - { | 58 | + $scope.openModuleItem = function () { |
60 | debugger; | 59 | debugger; |
61 | var jsContentURL; | 60 | var jsContentURL; |
62 | var moduleItemViewDivId; | 61 | var moduleItemViewDivId; |
@@ -65,7 +64,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -65,7 +64,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
65 | if ($rootScope.moduleName == ATLAS_ANATOMY) { | 64 | if ($rootScope.moduleName == ATLAS_ANATOMY) { |
66 | 65 | ||
67 | jsContentURL = 'app/views/aa/atlas-anatomy-detail.html'; | 66 | jsContentURL = 'app/views/aa/atlas-anatomy-detail.html'; |
68 | - moduleItemViewDivId = 'aaDetailPageDiv'; | 67 | + moduleItemViewDivId = 'aaDetailPageDiv'; |
69 | } | 68 | } |
70 | else if ($rootScope.moduleName == CLINICAL_ANIMATION) { | 69 | else if ($rootScope.moduleName == CLINICAL_ANIMATION) { |
71 | //to do, in next phase of project | 70 | //to do, in next phase of project |
@@ -110,7 +109,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -110,7 +109,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
110 | 109 | ||
111 | $timeout(function () { | 110 | $timeout(function () { |
112 | $compile(aaViewElement.contents())($scope); | 111 | $compile(aaViewElement.contents())($scope); |
113 | - | 112 | + |
114 | if (document.getElementById('aaDetailPageDiv') != null) { | 113 | if (document.getElementById('aaDetailPageDiv') != null) { |
115 | 114 | ||
116 | //0.4 added some stylesheets | 115 | //0.4 added some stylesheets |
@@ -125,12 +124,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -125,12 +124,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
125 | canvas.height = parseInt(($scope.imageHeight)); | 124 | canvas.height = parseInt(($scope.imageHeight)); |
126 | canvas.width = parseInt($scope.imageWidth); | 125 | canvas.width = parseInt($scope.imageWidth); |
127 | canvas.style.left = '0px'; | 126 | canvas.style.left = '0px'; |
128 | - canvas.style.top = '0px'; | 127 | + canvas.style.top = '0px'; |
129 | canvas.style.position = "absolute"; | 128 | canvas.style.position = "absolute"; |
130 | 129 | ||
131 | $("#imageDiv").append(canvas); | 130 | $("#imageDiv").append(canvas); |
132 | $scope.context = canvas.getContext("2d") | 131 | $scope.context = canvas.getContext("2d") |
133 | - | 132 | + |
134 | //6. Show all pins on AA opened item | 133 | //6. Show all pins on AA opened item |
135 | $scope.showAllPins(); | 134 | $scope.showAllPins(); |
136 | } | 135 | } |
@@ -139,13 +138,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -139,13 +138,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
139 | 138 | ||
140 | function loadFailure() { | 139 | function loadFailure() { |
141 | console.log('unable to load opened module ietem'); | 140 | console.log('unable to load opened module ietem'); |
142 | - return true; | 141 | + return true; |
143 | } | 142 | } |
144 | 143 | ||
145 | - function getImageHeightWidth() | ||
146 | - { | ||
147 | - $scope.imageWidth = this.width; | ||
148 | - $scope.imageHeight = this.height; | 144 | + function getImageHeightWidth() { |
145 | + $scope.imageWidth = this.width; | ||
146 | + $scope.imageHeight = this.height; | ||
149 | } | 147 | } |
150 | 148 | ||
151 | angular.element(document).ready(function (e) { | 149 | angular.element(document).ready(function (e) { |
@@ -164,9 +162,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -164,9 +162,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
164 | function (result) { | 162 | function (result) { |
165 | $scope.aaPinData = result.data.Root.Item; | 163 | $scope.aaPinData = result.data.Root.Item; |
166 | debugger; | 164 | debugger; |
167 | - angular.forEach($scope.aaPinData, function (value, key) | ||
168 | - { | ||
169 | - | 165 | + angular.forEach($scope.aaPinData, function (value, key) { |
166 | + | ||
170 | $scope.context.beginPath(); | 167 | $scope.context.beginPath(); |
171 | $scope.context.moveTo(value._PinX, value._PinY); | 168 | $scope.context.moveTo(value._PinX, value._PinY); |
172 | $scope.context.lineTo(value._HeadX, value._HeadY); | 169 | $scope.context.lineTo(value._HeadX, value._HeadY); |
@@ -175,14 +172,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -175,14 +172,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
175 | var headX = (parseInt(value._HeadX)) - 20; | 172 | var headX = (parseInt(value._HeadX)) - 20; |
176 | var headY = (parseInt(value._HeadY)) - 15; | 173 | var headY = (parseInt(value._HeadY)) - 15; |
177 | 174 | ||
178 | - var img = new Image(); | ||
179 | - img.src = "~/../../../content/images/noraml-pin.png"; | ||
180 | - img.onload = function () { | 175 | + var img = new Image(); |
176 | + img.src = "~/../../../content/images/noraml-pin.png"; | ||
177 | + img.onload = function () { | ||
181 | $scope.context.drawImage(img, headX, headY); | 178 | $scope.context.drawImage(img, headX, headY); |
182 | } | 179 | } |
183 | 180 | ||
184 | }) | 181 | }) |
185 | - | 182 | + |
186 | console.log(JSON.stringify(result, null, 4)); | 183 | console.log(JSON.stringify(result, null, 4)); |
187 | }, | 184 | }, |
188 | function (error) { | 185 | function (error) { |
@@ -196,5 +193,5 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -196,5 +193,5 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
196 | 193 | ||
197 | }]); | 194 | }]); |
198 | 195 | ||
199 | - | 196 | + |
200 | 197 |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
@@ -152,6 +152,13 @@ AIA.constant('pages', [ | @@ -152,6 +152,13 @@ AIA.constant('pages', [ | ||
152 | pageUrl: 'app/widget/MainView.html', | 152 | pageUrl: 'app/widget/MainView.html', |
153 | pageController: 'HomeController' | 153 | pageController: 'HomeController' |
154 | }, | 154 | }, |
155 | + { | ||
156 | + name: 'Tiny View List view', | ||
157 | + pageSlug: 'module-item-view', | ||
158 | + pageUrl: 'app/views/module-item-view.html', | ||
159 | + pageController: 'TileViewListController' | ||
160 | + | ||
161 | + }, | ||
155 | 162 | ||
156 | { // id:3, | 163 | { // id:3, |
157 | name: 'Clinical Illustrations View', | 164 | name: 'Clinical Illustrations View', |
400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
@@ -3,30 +3,101 @@ | @@ -3,30 +3,101 @@ | ||
3 | <div class="main" ng-init="loadForModuleById(1)"> | 3 | <div class="main" ng-init="loadForModuleById(1)"> |
4 | <!--<div class="main">--> | 4 | <!--<div class="main">--> |
5 | <div class="col-sm-12" style="padding-left:25px; width:99%"> | 5 | <div class="col-sm-12" style="padding-left:25px; width:99%"> |
6 | + | ||
7 | + <!--Filter section--> | ||
8 | + <!--<div class="col-sm-12 stickey-area clsstickydiv">--> | ||
9 | + <div class="breadcrumb"> | ||
10 | + <div class="row center-block"> | ||
11 | + <h5 class="text-center text-primary txt-white f15">Display Image By</h5> | ||
12 | + <div class="col-md-2 col-sm-4 pad-lftrgt3"> | ||
13 | + <div class="form-group"> | ||
14 | + <h6 class="text-center text-primary txt-white f11">Body Region</h6> | ||
15 | + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedbodyregion" ng-options="item for item in AllBodyRegion track by item"> | ||
16 | + <option value="">All</option> | ||
17 | + </select> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | + <div class="col-md-2 col-sm-4 pad-lftrgt3"> | ||
21 | + <div class="form-group"> | ||
22 | + <h6 class="text-center text-primary txt-white f11">Body System</h6> | ||
23 | + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedbodysystem" ng-options="item for item in AllBodySystem track by item"> | ||
24 | + <option value="">All</option> | ||
25 | + </select> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | + | ||
29 | + <div class="col-md-2 col-sm-4 pad-lftrgt3"> | ||
30 | + <div class="form-group"> | ||
31 | + <h6 class="text-center text-primary txt-white f11">View Orientation</h6> | ||
32 | + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedorientation" ng-options="item for item in AllOrientation track by item"> | ||
33 | + <option value="">All</option> | ||
34 | + </select> | ||
35 | + </div> | ||
36 | + </div> | ||
37 | + <div class="col-md-2 col-sm-4 pad-lftrgt3"> | ||
38 | + <div class="form-group"> | ||
39 | + <h6 class="text-center text-primary txt-white f11">Image Type</h6> | ||
40 | + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedimagetype" ng-options="item for item in AllImageType track by item"> | ||
41 | + <option value="">All</option> | ||
42 | + </select> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <!--<div class="col-md-2 col-sm-4 pad-lftrgt3"> | ||
46 | + <div class="form-group"> | ||
47 | + <h6 class="text-center text-primary txt-white f11">Medical Speciality</h6> | ||
48 | + <select ng-change="hideListViewDiv()" class="form-control input-sm" ng-model="query.selectedspecialty" ng-options="item for item in CIAllSpeciality track by item"> | ||
49 | + <option value="">All</option> | ||
50 | + </select> | ||
51 | + </div> | ||
52 | + </div>--> | ||
53 | + <div class="col-md-2 col-sm-4 pad-lftrgt3"> | ||
54 | + <div class="form-group"> | ||
55 | + <h6 class="text-center text-primary txt-white f11">Search</h6> | ||
6 | 56 | ||
57 | + <div class="btn-group col-xs-12" style="padding:0;"> | ||
58 | + <button type="button" class="btn btn-primary btn-sm col-xs-9" ng-click="Reset(1,query)"><i class="fa fa-eye"></i> Show All</button> | ||
59 | + <button type="button" class="btn btn-primary btn-sm col-xs-3" ng-click="FilterByImage(1,query)"> | ||
60 | + <i class="fa fa-search"></i> | ||
61 | + </button> | ||
7 | 62 | ||
8 | - <!--<!-- Nav tabs --> | ||
9 | - <!--<ul class="nav nav-tabs" role="tablist"> | 63 | + </div> |
64 | + | ||
65 | + | ||
66 | + | ||
67 | + <!--<button class="btn btn-primary btn-sm" ng-click="ApplySearch(query)"><i class="fa fa-search"></i></button> <button class="btn btn-primary btn-sm col-md-9" ng-click="Reset(query)"><i class="fa fa-eye"></i> Show All</button>--> | ||
68 | + </div> | ||
69 | + </div> | ||
70 | + </div> | ||
71 | + </div> | ||
72 | + <!--</div>--> | ||
73 | + <!--End Filter Section--> | ||
74 | + <!--<!-- Nav tabs --> | ||
75 | + <!--<ul class="nav nav-tabs" role="tablist"> | ||
76 | + <li role="presentation" id="Male" class="active" ng-click="getDAViewList($event)"><a><i class="fa fa-mars-stroke "></i> Male</a></li> | ||
77 | + <li role="presentation" id="Female" ng-click="getDAViewList($event)"><a><i class="fa fa-venus"></i> Female</a></li> | ||
78 | + </ul>--> | ||
79 | + <!--<!-- Nav tabs --> | ||
80 | + <!--<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> | 81 | <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> | 82 | <li role="presentation" id="Female" ng-click="getDAViewList($event)"><a><i class="fa fa-venus"></i> Female</a></li> |
12 | </ul>--> | 83 | </ul>--> |
13 | - <!-- Tab panes --> | ||
14 | - <div class="row tab-content"> | ||
15 | - <!--<div role="tabpanel" class="tab-pane active" id="grid-view">--> | ||
16 | - <div role="tabpanel" class="tab-pane active" id="grid-view"> | ||
17 | - <div ng-repeat="(key,val) in moduleLandingData.data.root.Item"> | ||
18 | - <div id="{{val._Id}}" class="col-sm-3 col-lg-2" title="{{val._Title}}" ng-click="openModuleItemView($event)"> | ||
19 | - <div class="thumbnail"> | ||
20 | - <a href="#"> | ||
21 | - <img class="tinyImg" id="{{val._Title}}" ng-src="../content/images/aa/thumbnails/{{val._TileImageName}}" data-ng-click="openModuleItemView($event)" alt="" title=""> | ||
22 | - <div class="caption"><p>{{val._Title}}</p></div> | ||
23 | - </a> | 84 | + <!-- Tab panes --> |
85 | + <div class="row tab-content"> | ||
86 | + <!--<div role="tabpanel" class="tab-pane active" id="grid-view">--> | ||
87 | + <div role="tabpanel" class="tab-pane active" id="grid-view"> | ||
88 | + <div ng-repeat="(key,val) in moduleLandingData.data.root.Item"> | ||
89 | + <div id="{{val._Id}}" class="col-sm-3 col-lg-2" title="{{val._Title}}" ng-click="openModuleItemView($event)"> | ||
90 | + <div class="thumbnail"> | ||
91 | + <a href="#"> | ||
92 | + <img class="tinyImg" id="{{val._Title}}" ng-src="../content/images/aa/thumbnails/{{val._TileImageName}}" data-ng-click="openModuleItemView($event)" alt="" title=""> | ||
93 | + <div class="caption"><p>{{val._Title}}</p></div> | ||
94 | + </a> | ||
95 | + </div> | ||
24 | </div> | 96 | </div> |
25 | </div> | 97 | </div> |
26 | </div> | 98 | </div> |
27 | </div> | 99 | </div> |
28 | </div> | 100 | </div> |
29 | - </div> | ||
30 | 101 | ||
31 | <script> | 102 | <script> |
32 | $(function () { | 103 | $(function () { |