Commit 6f125641475249ad94abd019008e2ec3320ed153
Merge branch 'Develop' of http://52.6.196.163/ADAM/AIAHTML5 into Test_stash
Conflicts: 400-SOURCECODE/AIAHTML5.Web/index.html
Showing
18 changed files
with
2536 additions
and
1178 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) { |
3 | 3 | |
4 | 4 | $rootScope.currentActiveModuleTitle = pages[5].name; |
5 | - $scope.showme = true; | |
5 | + $scope.showme = false; | |
6 | 6 | $scope.threedanatomyData; |
7 | 7 | $scope.Id; |
8 | 8 | $scope.$on('$viewContentLoaded', function (event) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AODController.js
1 | 1 | AIA.controller("AODController", ["$scope", "$rootScope", "pages", "$log", |
2 | 2 | function ($scope, $rootScope, pages, log) { |
3 | - $scope.showme = true; | |
4 | - $scope.IsVisible = function () { | |
5 | - $scope.scroll(); | |
3 | + //$scope.showme = true; | |
4 | + //$scope.IsVisible = function () { | |
5 | + // $scope.scroll(); | |
6 | 6 | |
7 | - } | |
7 | + //} | |
8 | + | |
9 | + $scope.setActiveTab = function (tabToSet) { | |
10 | + $scope.activeTab = tabToSet; | |
11 | + localStorage.setItem("currentAODTabView", $scope.activeTab); | |
12 | + }; | |
8 | 13 | |
9 | 14 | $scope.scroll = function () { |
10 | 15 | // $window.scrollTo(0, 0); |
11 | 16 | $("html,body").scrollTop(0); |
12 | 17 | //alert("scroll"); |
13 | 18 | } |
14 | - $rootScope.currentActiveModuleTitle = pages[10].name; | |
19 | + //$rootScope.currentActiveModuleTitle = pages[10].name; | |
20 | + | |
21 | + $scope.$on('$viewContentLoaded', function (event) { | |
22 | + // code that will be executed ... | |
23 | + // every time this view is loaded | |
24 | + | |
25 | + $scope.showme = true; | |
26 | + $scope.IsVisible = function () { | |
27 | + $scope.scroll(); | |
28 | + | |
29 | + } | |
30 | + | |
31 | + $rootScope.currentActiveModuleTitle = pages[10].name; | |
32 | + | |
33 | + //set the local storage | |
34 | + | |
35 | + var curtab = localStorage.getItem("currentAODTabView"); | |
36 | + if (curtab == 2) { | |
37 | + $scope.setActiveTab(2); | |
38 | + } | |
39 | + else { | |
40 | + $scope.setActiveTab(1); | |
41 | + } | |
42 | + | |
43 | + }); | |
44 | + | |
15 | 45 | }] |
16 | 46 | |
17 | 47 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -13,55 +13,142 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
13 | 13 | $scope.SelectedCASummary = []; |
14 | 14 | $scope.filterstring = false; |
15 | 15 | $scope.query = { |
16 | - selectedbodyregion: null, | |
17 | - selectedbodysystem: null, | |
18 | - selectedspecialty: null, | |
16 | + selectedbodyregion: '', | |
17 | + selectedbodysystem: '', | |
18 | + selectedspecialty: '', | |
19 | + }; | |
20 | + | |
21 | + $scope.setActiveTab = function (tabToSet) { | |
22 | + $scope.activeTab = tabToSet; | |
23 | + localStorage.setItem("currentCATabView", $scope.activeTab); | |
19 | 24 | }; |
20 | 25 | |
21 | 26 | $scope.$on('$viewContentLoaded', function (event) { |
22 | 27 | // code that will be executed ... |
23 | 28 | // every time this view is loaded |
24 | 29 | |
30 | + $scope.LoadCAJsonData(); | |
31 | + | |
25 | 32 | $scope.CAAllBodyRegion = BodyRegions; |
26 | 33 | $scope.CAAllBodySystem = BodySystems; |
27 | 34 | $scope.CAAllSpeciality = MedicalSpecialties; |
28 | 35 | $scope.scroll(); |
29 | 36 | |
37 | + //set the local storage | |
38 | + | |
39 | + var curtab = localStorage.getItem("currentCATabView"); | |
40 | + if (curtab == 2) { | |
41 | + $scope.setActiveTab(2); | |
42 | + } | |
43 | + else { | |
44 | + $scope.setActiveTab(1); | |
45 | + } | |
46 | + | |
47 | + var curBodyRegion = localStorage.getItem("CACurBodyRegion"); | |
48 | + if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !=='') { | |
49 | + $scope.query.selectedbodyregion = curBodyRegion; | |
50 | + } | |
51 | + else { | |
52 | + $scope.query.selectedbodyregion = ""; | |
53 | + } | |
54 | + | |
55 | + var curBodySystem = localStorage.getItem("CACurBodySystem"); | |
56 | + if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !=='') { | |
57 | + $scope.query.selectedbodysystem = curBodySystem; | |
58 | + } | |
59 | + else { | |
60 | + $scope.query.selectedbodysystem = ""; | |
61 | + } | |
62 | + | |
63 | + var curSpeciality = localStorage.getItem("CACurSpeciality"); | |
64 | + if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { | |
65 | + $scope.query.selectedspecialty = curSpeciality; | |
66 | + } | |
67 | + else { | |
68 | + $scope.query.selectedspecialty = ""; | |
69 | + } | |
70 | + | |
71 | + | |
72 | + if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedspecialty == "") { | |
73 | + $scope.loadAllCA(); | |
74 | + } | |
75 | + else { | |
76 | + $scope.ApplySearch($scope.query); | |
77 | + } | |
78 | + | |
79 | + | |
30 | 80 | }); |
31 | 81 | |
32 | - var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | |
33 | - promise.then( | |
34 | - function (result) { | |
35 | - $scope.AnimationData = result; | |
36 | - $scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | |
82 | + $scope.LoadCAJsonData = function () { | |
37 | 83 | |
38 | - $('#grid-view').empty(); | |
84 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | |
85 | + promise.then( | |
86 | + function (result) { | |
87 | + $scope.AnimationData = result; | |
88 | + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | |
39 | 89 | |
40 | - angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
41 | - $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | |
90 | + $scope.selectedCAListViewData = new jinqJs() | |
91 | + .from($scope.AnimationData.root.CAData) | |
92 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
93 | + .select(); | |
42 | 94 | |
95 | + //console.log($scope.selectedCAListViewData); | |
96 | + | |
97 | + }, | |
98 | + function (error) { | |
99 | + // handle errors here | |
100 | + console.log(' $scope.AnimationData = ' + error.statusText); | |
101 | + } | |
102 | + ); | |
43 | 103 | |
44 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
45 | - + '<div class="thumbnail" >' | |
46 | - + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
47 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
48 | 104 | |
105 | + }; | |
106 | + | |
107 | + $scope.loadAllCA = function () { | |
49 | 108 | |
50 | - $compile($el)($scope); | |
109 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | |
110 | + promise.then( | |
111 | + function (result) { | |
112 | + $scope.AnimationData = result; | |
113 | + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | |
114 | + | |
115 | + $scope.selectedCAListViewData = new jinqJs() | |
116 | + .from($scope.AnimationData.root.CAData) | |
117 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
118 | + .select(); | |
119 | + | |
120 | + //console.log($scope.selectedCAListViewData); | |
121 | + | |
122 | + $('#grid-view').empty(); | |
123 | + | |
124 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
125 | + $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | |
126 | + | |
127 | + | |
128 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
129 | + + '<div class="thumbnail" >' | |
130 | + + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
131 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
132 | + | |
133 | + | |
134 | + $compile($el)($scope); | |
135 | + | |
136 | + $(".sidebar").mCustomScrollbar({ | |
137 | + autoHideScrollbar: true, | |
138 | + //theme:"rounded" | |
139 | + }); | |
51 | 140 | |
52 | - $(".sidebar").mCustomScrollbar({ | |
53 | - autoHideScrollbar: true, | |
54 | - //theme:"rounded" | |
55 | 141 | }); |
56 | 142 | |
57 | - }); | |
143 | + }, | |
144 | + function (error) { | |
145 | + // handle errors here | |
146 | + console.log(' $scope.AnimationData = ' + error.statusText); | |
147 | + } | |
148 | + ); | |
58 | 149 | |
59 | - }, | |
60 | - function (error) { | |
61 | - // handle errors here | |
62 | - console.log(' $scope.AnimationData = ' + error.statusText); | |
63 | - } | |
64 | - ); | |
150 | + | |
151 | + } | |
65 | 152 | |
66 | 153 | $scope.IsVisible = function () { |
67 | 154 | $scope.scroll(); |
... | ... | @@ -106,35 +193,25 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
106 | 193 | |
107 | 194 | $scope.Reset = function (query) { |
108 | 195 | |
109 | - query.selectedbodyregion = null; | |
110 | - query.selectedbodysystem = null; | |
111 | - query.selectedspecialty = null; | |
196 | + query.selectedbodyregion = ""; | |
197 | + query.selectedbodysystem = ""; | |
198 | + query.selectedspecialty = ""; | |
199 | + | |
200 | + //set localstorage values | |
201 | + localStorage.setItem("CACurBodyRegion", query.selectedbodyregion); | |
202 | + localStorage.setItem("CACurBodySystem", query.selectedbodysystem); | |
203 | + localStorage.setItem("CACurSpeciality", query.selectedspecialty); | |
204 | + | |
112 | 205 | $scope.filterstring = false; |
113 | 206 | while ($scope.searchCAListViewData.length) { |
114 | 207 | $scope.searchCAListViewData.pop(); |
115 | 208 | } |
116 | - $('#grid-view').empty(); | |
117 | - | |
118 | - angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
119 | - $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | |
120 | - | |
121 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
122 | - + '<div class="thumbnail" >' | |
123 | - + '<img id="' + value._Title + 'class="img-responsive" style="width:100%;height:100%;" "ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
124 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
125 | - | |
126 | - | |
127 | - $compile($el)($scope); | |
128 | - | |
129 | - $(".sidebar").mCustomScrollbar({ | |
130 | - autoHideScrollbar: true, | |
131 | - //theme:"rounded" | |
132 | - }); | |
133 | - | |
134 | - }); | |
209 | + | |
210 | + $scope.loadAllCA(); | |
135 | 211 | |
136 | 212 | } |
137 | 213 | |
214 | + // for "Intracytoplasmic sperm injection (ICSI)" case, the Body region is not required so we have added "_BodyRegion": "None" which was actually not available in origincal flex file. | |
138 | 215 | $scope.ApplySearch = function (query) { |
139 | 216 | |
140 | 217 | $scope.filterstring = true; |
... | ... | @@ -143,106 +220,143 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
143 | 220 | $scope.searchCAListViewData.pop(); |
144 | 221 | } |
145 | 222 | |
146 | - $('#grid-view').empty(); | |
223 | + //$('#grid-view').empty(); | |
147 | 224 | |
148 | 225 | filtercount = 0; |
149 | - if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null) { | |
226 | + if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | |
150 | 227 | filtercount = filtercount + 1; |
228 | + localStorage.setItem("CACurBodyRegion", query.selectedbodyregion); | |
229 | + } | |
230 | + else { | |
231 | + localStorage.setItem("CACurBodyRegion", ''); | |
151 | 232 | } |
152 | - if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null) { | |
233 | + | |
234 | + if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !== "") { | |
153 | 235 | filtercount = filtercount + 1; |
236 | + localStorage.setItem("CACurBodySystem", query.selectedbodysystem); | |
237 | + } | |
238 | + else { | |
239 | + localStorage.setItem("CACurBodySystem", ''); | |
154 | 240 | } |
155 | - if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null) { | |
241 | + | |
242 | + if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !== "") { | |
156 | 243 | filtercount = filtercount + 1; |
244 | + localStorage.setItem("CACurSpeciality", query.selectedspecialty); | |
245 | + } | |
246 | + else { | |
247 | + localStorage.setItem("CACurSpeciality", ''); | |
157 | 248 | } |
158 | 249 | |
159 | - angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
250 | + var promise = DataService.getJson('~/../content/data/json/ca/ca_dat_contentlist.json') | |
251 | + promise.then( | |
252 | + function (result) { | |
253 | + $scope.AnimationData = result; | |
254 | + //$scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | |
160 | 255 | |
161 | - var selectimg = true; | |
162 | - var count = 0; | |
256 | + $scope.selectedCAListViewData = new jinqJs() | |
257 | + .from($scope.AnimationData.root.CAData) | |
258 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
259 | + .select(); | |
163 | 260 | |
261 | + //console.log($scope.selectedCAListViewData); | |
164 | 262 | |
165 | - if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null) { | |
166 | - var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | |
167 | - if (posbodyregion > -1) { | |
168 | - selectimg = true; | |
169 | - count = count + 1; | |
263 | + $('#grid-view').empty(); | |
170 | 264 | |
171 | - } | |
172 | - else { | |
173 | - selectimg = false; | |
174 | - count = count - 1; | |
175 | - } | |
265 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
176 | 266 | |
177 | - } | |
267 | + var selectimg = true; | |
268 | + var count = 0; | |
178 | 269 | |
179 | - if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null) { | |
180 | - var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | |
181 | - if (posbodysystem > -1) { | |
182 | - count = count + 1; | |
183 | - selectimg = true; | |
184 | - } else { | |
185 | - selectimg = false; | |
186 | - count = count - 1; | |
187 | - } | |
188 | - } | |
189 | 270 | |
190 | - if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null) { | |
191 | - var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | |
192 | - if (posspeciality > -1) { | |
193 | - count = count + 1; | |
194 | - selectimg = true; | |
195 | - } else { | |
196 | - selectimg = false; | |
197 | - count = count - 1; | |
198 | - } | |
271 | + if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null && query.selectedbodyregion !== "") { | |
272 | + var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | |
273 | + if (posbodyregion > -1) { | |
274 | + selectimg = true; | |
275 | + count = count + 1; | |
199 | 276 | |
200 | - } | |
277 | + } | |
278 | + else { | |
279 | + selectimg = false; | |
280 | + count = count - 1; | |
281 | + } | |
201 | 282 | |
202 | - if (selectimg === true && count >= filtercount) { | |
283 | + } | |
203 | 284 | |
285 | + if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null && query.selectedbodysystem !=="") { | |
286 | + var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | |
287 | + if (posbodysystem > -1) { | |
288 | + count = count + 1; | |
289 | + selectimg = true; | |
290 | + } else { | |
291 | + selectimg = false; | |
292 | + count = count - 1; | |
293 | + } | |
294 | + } | |
204 | 295 | |
205 | - $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | |
296 | + if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null && query.selectedspecialty !=="") { | |
297 | + var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | |
298 | + if (posspeciality > -1) { | |
299 | + count = count + 1; | |
300 | + selectimg = true; | |
301 | + } else { | |
302 | + selectimg = false; | |
303 | + count = count - 1; | |
304 | + } | |
206 | 305 | |
207 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
208 | - + '<div class="thumbnail" >' | |
209 | - + '<img id="' + value._Title + 'class="img-responsive" style="width:100%;height:100%;" "ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
210 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
306 | + } | |
211 | 307 | |
308 | + if (selectimg === true && count >= filtercount) { | |
212 | 309 | |
213 | - $compile($el)($scope); | |
214 | 310 | |
215 | - $(".sidebar").mCustomScrollbar({ | |
216 | - autoHideScrollbar: true, | |
217 | - //theme:"rounded" | |
218 | - }); | |
311 | + $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; | |
219 | 312 | |
313 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
314 | + + '<div class="thumbnail" >' | |
315 | + + '<img id="' + value._Title + '" class="img-responsive" style="width:100%;height:100%;" ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
316 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
220 | 317 | |
221 | - $scope.searchCAListViewData.push( | |
222 | - { | |
223 | - "_id": value._id, | |
224 | - "_ImageId": value._ImageId, | |
225 | - "_Title": value._Title, | |
226 | - "_Video": value._Video, | |
227 | - "_ThumbnailImage": value._ThumbnailImage, | |
228 | - "_BodySystem": value._BodySystem, | |
229 | - "_BodyRegion": value._BodyRegion, | |
230 | - "_MedicalSpecialty": value._MedicalSpecialty, | |
231 | - "_Summary": value._Summary, | |
232 | - "_LowerSummary": value._LowerSummary | |
233 | - }); | |
234 | 318 | |
235 | - } | |
319 | + $compile($el)($scope); | |
236 | 320 | |
321 | + $(".sidebar").mCustomScrollbar({ | |
322 | + autoHideScrollbar: true, | |
323 | + //theme:"rounded" | |
324 | + }); | |
237 | 325 | |
238 | - }); | |
239 | 326 | |
240 | - //Show Error Message in case of gridview if no data is found | |
241 | - if ($scope.searchCAListViewData.length == 0) { | |
327 | + $scope.searchCAListViewData.push( | |
328 | + { | |
329 | + "_id": value._id, | |
330 | + "_ImageId": value._ImageId, | |
331 | + "_Title": value._Title, | |
332 | + "_Video": value._Video, | |
333 | + "_ThumbnailImage": value._ThumbnailImage, | |
334 | + "_BodySystem": value._BodySystem, | |
335 | + "_BodyRegion": value._BodyRegion, | |
336 | + "_MedicalSpecialty": value._MedicalSpecialty, | |
337 | + "_Summary": value._Summary, | |
338 | + "_LowerSummary": value._LowerSummary | |
339 | + }); | |
340 | + | |
341 | + } | |
342 | + | |
343 | + | |
344 | + }); | |
345 | + | |
346 | + //Show Error Message in case of gridview if no data is found | |
347 | + if ($scope.searchCAListViewData.length == 0) { | |
348 | + | |
349 | + var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white;">No animation found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | |
350 | + $compile($el)($scope); | |
351 | + } | |
352 | + | |
353 | + }, | |
354 | + function (error) { | |
355 | + // handle errors here | |
356 | + console.log(' $scope.AnimationData = ' + error.statusText); | |
357 | + } | |
358 | + ); | |
242 | 359 | |
243 | - var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:red;">No animation found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | |
244 | - $compile($el)($scope); | |
245 | - } | |
246 | 360 | } |
247 | 361 | |
248 | 362 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -17,17 +17,24 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
17 | 17 | $scope.selectedCIListViewData = []; |
18 | 18 | $scope.filterstring = false; |
19 | 19 | $scope.query = { |
20 | - selectedbodyregion: null, | |
21 | - selectedbodysystem: null, | |
22 | - selectedorientation: null, | |
23 | - selectedimagetype: null, | |
24 | - selectedspecialty: null, | |
20 | + selectedbodyregion: '', | |
21 | + selectedbodysystem: '', | |
22 | + selectedorientation: '', | |
23 | + selectedimagetype: '', | |
24 | + selectedspecialty: '', | |
25 | + }; | |
26 | + | |
27 | + $scope.setActiveTab = function (tabToSet) { | |
28 | + $scope.activeTab = tabToSet; | |
29 | + localStorage.setItem("currentCITabView", $scope.activeTab); | |
25 | 30 | }; |
26 | 31 | |
27 | 32 | $scope.$on('$viewContentLoaded', function (event) { |
28 | 33 | // code that will be executed ... |
29 | 34 | // every time this view is loaded |
30 | 35 | |
36 | + $scope.LoadCIJsonData(); | |
37 | + | |
31 | 38 | $scope.CIAllBodyRegion = BodyRegions; |
32 | 39 | $scope.CIAllBodySystem = BodySystems; |
33 | 40 | $scope.CIAllOrientation = ViewOrientations; |
... | ... | @@ -37,40 +44,130 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
37 | 44 | //push the details of open module in array $rootScope.openModules |
38 | 45 | $rootScope.openModules.push({ "ModuleId": 4 }); |
39 | 46 | |
47 | + //set the local storage | |
48 | + | |
49 | + var curtab = localStorage.getItem("currentCITabView"); | |
50 | + if (curtab == 2) { | |
51 | + $scope.setActiveTab(2); | |
52 | + } | |
53 | + else { | |
54 | + $scope.setActiveTab(1); | |
55 | + } | |
56 | + | |
57 | + var curBodyRegion = localStorage.getItem("CICurBodyRegion"); | |
58 | + if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !=='') { | |
59 | + $scope.query.selectedbodyregion = curBodyRegion; | |
60 | + } | |
61 | + else { | |
62 | + $scope.query.selectedbodyregion = ""; | |
63 | + } | |
64 | + | |
65 | + var curBodySystem = localStorage.getItem("CICurBodySystem"); | |
66 | + if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !=='') { | |
67 | + $scope.query.selectedbodysystem = curBodySystem; | |
68 | + } | |
69 | + else { | |
70 | + $scope.query.selectedbodysystem = ""; | |
71 | + } | |
72 | + | |
73 | + var curOrientation = localStorage.getItem("CICurOrientation"); | |
74 | + if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !=='') { | |
75 | + $scope.query.selectedorientation = curOrientation; | |
76 | + } | |
77 | + else { | |
78 | + $scope.query.selectedorientation = ""; | |
79 | + } | |
80 | + | |
81 | + var curImageType = localStorage.getItem("CICurImageType"); | |
82 | + if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !=='') { | |
83 | + $scope.query.selectedimagetype = curImageType; | |
84 | + } | |
85 | + else { | |
86 | + $scope.query.selectedimagetype = ""; | |
87 | + } | |
88 | + | |
89 | + var curSpeciality = localStorage.getItem("CICurSpeciality"); | |
90 | + if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !=='') { | |
91 | + $scope.query.selectedspecialty = curSpeciality; | |
92 | + } | |
93 | + else { | |
94 | + $scope.query.selectedspecialty = ""; | |
95 | + } | |
96 | + | |
97 | + | |
98 | + if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedorientation == "" && $scope.query.selectedimagetype == "" && $scope.query.selectedspecialty == "") { | |
99 | + $scope.loadAllCI(); | |
100 | + } | |
101 | + else { | |
102 | + $scope.ApplySearch($scope.query); | |
103 | + } | |
104 | + | |
40 | 105 | }); |
41 | 106 | |
42 | - var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | |
43 | - promise.then( | |
44 | - function (result) { | |
45 | - $scope.IllustrationData = result; | |
46 | - $scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; | |
107 | + $scope.LoadCIJsonData = function () { | |
47 | 108 | |
48 | - $('#grid-view').empty(); | |
109 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | |
110 | + promise.then( | |
111 | + function (result) { | |
112 | + $scope.IllustrationData = result; | |
113 | + //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; | |
49 | 114 | |
50 | - angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
51 | - $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | |
115 | + $scope.selectedCIListViewData = new jinqJs() | |
116 | + .from($scope.IllustrationData.root.CIData) | |
117 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
118 | + .select(); | |
52 | 119 | |
53 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-md-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
54 | - + '<div class="thumbnail" >' | |
55 | - + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
56 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
120 | + }, | |
121 | + function (error) { | |
122 | + // handle errors here | |
123 | + console.log(' $scope.IllustrationData = ' + error.statusText); | |
124 | + } | |
125 | + ); | |
57 | 126 | |
58 | 127 | |
59 | - $compile($el)($scope); | |
128 | + }; | |
129 | + | |
130 | + $scope.loadAllCI = function () { | |
131 | + | |
132 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | |
133 | + promise.then( | |
134 | + function (result) { | |
135 | + $scope.IllustrationData = result; | |
136 | + //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; | |
137 | + | |
138 | + $scope.selectedCIListViewData = new jinqJs() | |
139 | + .from($scope.IllustrationData.root.CIData) | |
140 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
141 | + .select(); | |
142 | + | |
143 | + console.log($scope.selectedCIListViewData); | |
144 | + $('#grid-view').empty(); | |
145 | + angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
146 | + $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | |
147 | + | |
148 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
149 | + + '<div class="thumbnail" >' | |
150 | + + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
151 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
152 | + | |
153 | + | |
154 | + $compile($el)($scope); | |
155 | + | |
156 | + $(".sidebar").mCustomScrollbar({ | |
157 | + autoHideScrollbar: true, | |
158 | + //theme:"rounded" | |
159 | + }); | |
60 | 160 | |
61 | - $(".sidebar").mCustomScrollbar({ | |
62 | - autoHideScrollbar: true, | |
63 | - //theme:"rounded" | |
64 | 161 | }); |
65 | 162 | |
66 | - }); | |
163 | + }, | |
164 | + function (error) { | |
165 | + // handle errors here | |
166 | + console.log(' $scope.IllustrationData = ' + error.statusText); | |
167 | + } | |
168 | + ); | |
67 | 169 | |
68 | - }, | |
69 | - function (error) { | |
70 | - // handle errors here | |
71 | - console.log(' $scope.IllustrationData = ' + error.statusText); | |
72 | - } | |
73 | - ); | |
170 | + } | |
74 | 171 | |
75 | 172 | $scope.IsVisible = function () { |
76 | 173 | $scope.scroll(); |
... | ... | @@ -114,40 +211,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
114 | 211 | |
115 | 212 | $scope.Reset = function (query) { |
116 | 213 | |
117 | - //query.selectedbodyregion = ""; | |
118 | - //query.selectedbodysystem = ""; | |
119 | - //query.selectedorientation = ""; | |
120 | - //query.selectedimagetype = ""; | |
121 | - //query.selectedspecialty = ""; | |
122 | - query.selectedbodyregion = null; | |
123 | - query.selectedbodysystem = null; | |
124 | - query.selectedorientation = null; | |
125 | - query.selectedimagetype = null; | |
126 | - query.selectedspecialty = null; | |
214 | + query.selectedbodyregion = ""; | |
215 | + query.selectedbodysystem = ""; | |
216 | + query.selectedorientation = ""; | |
217 | + query.selectedimagetype = ""; | |
218 | + query.selectedspecialty = ""; | |
219 | + | |
220 | + | |
221 | + //set localstorage values | |
222 | + localStorage.setItem("CICurBodyRegion", query.selectedbodyregion); | |
223 | + localStorage.setItem("CICurBodySystem", query.selectedbodysystem); | |
224 | + localStorage.setItem("CICurOrientation", query.selectedorientation); | |
225 | + localStorage.setItem("CICurImageType", query.selectedimagetype); | |
226 | + localStorage.setItem("CICurSpeciality", query.selectedspecialty); | |
127 | 227 | |
128 | 228 | $scope.filterstring = false; |
129 | 229 | while ($scope.searchCIListViewData.length) { |
130 | 230 | $scope.searchCIListViewData.pop(); |
131 | 231 | } |
132 | - $('#grid-view').empty(); | |
133 | 232 | |
134 | - angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
135 | - $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | |
136 | - | |
137 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-md-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
138 | - + '<div class="thumbnail" >' | |
139 | - + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
140 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
141 | - | |
142 | - | |
143 | - $compile($el)($scope); | |
144 | - | |
145 | - $(".sidebar").mCustomScrollbar({ | |
146 | - autoHideScrollbar: true, | |
147 | - //theme:"rounded" | |
148 | - }); | |
149 | - | |
150 | - }); | |
233 | + $scope.loadAllCI(); | |
151 | 234 | |
152 | 235 | } |
153 | 236 | |
... | ... | @@ -159,143 +242,187 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
159 | 242 | $scope.searchCIListViewData.pop(); |
160 | 243 | } |
161 | 244 | |
162 | - $('#grid-view').empty(); | |
245 | + //$('#grid-view').empty(); | |
163 | 246 | |
164 | 247 | filtercount = 0; |
165 | - if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null) { | |
248 | + if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { | |
166 | 249 | filtercount = filtercount + 1; |
250 | + localStorage.setItem("CICurBodyRegion", query.selectedbodyregion); | |
251 | + } | |
252 | + else { | |
253 | + localStorage.setItem("CICurBodyRegion", ''); | |
167 | 254 | } |
168 | - if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null) { | |
255 | + | |
256 | + if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !=="")) { | |
169 | 257 | filtercount = filtercount + 1; |
258 | + localStorage.setItem("CICurBodySystem", query.selectedbodysystem); | |
259 | + } | |
260 | + else { | |
261 | + localStorage.setItem("CICurBodySystem", ''); | |
170 | 262 | } |
171 | - if (typeof (query.selectedorientation) !== "undefined" && query.selectedorientation !== null) { | |
263 | + | |
264 | + if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== '')) { | |
172 | 265 | filtercount = filtercount + 1; |
266 | + localStorage.setItem("CICurOrientation", query.selectedorientation); | |
267 | + } | |
268 | + else { | |
269 | + localStorage.setItem("CICurOrientation", ''); | |
173 | 270 | } |
174 | - if (typeof (query.selectedimagetype) !== "undefined" && query.selectedimagetype !== null) { | |
271 | + | |
272 | + if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== '')) { | |
175 | 273 | filtercount = filtercount + 1; |
274 | + localStorage.setItem("CICurImageType", query.selectedimagetype); | |
176 | 275 | } |
177 | - if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null) { | |
276 | + else { | |
277 | + localStorage.setItem("CICurImageType", ''); | |
278 | + } | |
279 | + | |
280 | + if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== '')) { | |
178 | 281 | filtercount = filtercount + 1; |
282 | + localStorage.setItem("CICurSpeciality", query.selectedspecialty); | |
283 | + } | |
284 | + else { | |
285 | + localStorage.setItem("CICurSpeciality", ''); | |
179 | 286 | } |
180 | 287 | |
181 | - angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
182 | 288 | |
183 | - var selectimg = true; | |
184 | - var count = 0; | |
289 | + var promise = DataService.getJson('~/../content/data/json/ci/ci_dat_contentlist.json') | |
290 | + promise.then( | |
291 | + function (result) { | |
292 | + $scope.IllustrationData = result; | |
293 | + //$scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; | |
185 | 294 | |
295 | + $scope.selectedCIListViewData = new jinqJs() | |
296 | + .from($scope.IllustrationData.root.CIData) | |
297 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
298 | + .select(); | |
299 | + | |
300 | + $('#grid-view').empty(); | |
301 | + | |
302 | + angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
303 | + | |
304 | + var selectimg = true; | |
305 | + var count = 0; | |
186 | 306 | |
187 | - if (typeof (query.selectedbodyregion) !== "undefined" && query.selectedbodyregion !== null) { | |
188 | - var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | |
189 | - if (posbodyregion > -1) { | |
190 | - selectimg = true; | |
191 | - count = count + 1; | |
192 | 307 | |
193 | - } | |
194 | - else { | |
195 | - selectimg = false; | |
196 | - count = count - 1; | |
197 | - } | |
308 | + if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { | |
309 | + var posbodyregion = value._BodyRegion.indexOf((query.selectedbodyregion.trim())); | |
310 | + if (posbodyregion > -1) { | |
311 | + selectimg = true; | |
312 | + count = count + 1; | |
198 | 313 | |
199 | - } | |
314 | + } | |
315 | + else { | |
316 | + selectimg = false; | |
317 | + count = count - 1; | |
318 | + } | |
200 | 319 | |
201 | - if (typeof (query.selectedbodysystem) !== "undefined" && query.selectedbodysystem !== null) { | |
202 | - var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | |
203 | - if (posbodysystem > -1) { | |
204 | - count = count + 1; | |
205 | - selectimg = true; | |
206 | - } else { | |
207 | - selectimg = false; | |
208 | - count = count - 1; | |
209 | - } | |
210 | - } | |
320 | + } | |
211 | 321 | |
212 | - if (typeof (query.selectedorientation) !== "undefined" && query.selectedorientation !== null) { | |
213 | - var posorientation = value._ViewOrientation.indexOf(query.selectedorientation); | |
214 | - if (posorientation > -1) { | |
215 | - count = count + 1; | |
216 | - selectimg = true; | |
322 | + if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { | |
323 | + var posbodysystem = value._BodySystem.indexOf(query.selectedbodysystem); | |
324 | + if (posbodysystem > -1) { | |
325 | + count = count + 1; | |
326 | + selectimg = true; | |
327 | + } else { | |
328 | + selectimg = false; | |
329 | + count = count - 1; | |
330 | + } | |
331 | + } | |
217 | 332 | |
218 | - } else { | |
219 | - selectimg = false; | |
220 | - count = count - 1; | |
221 | - } | |
333 | + if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== "")) { | |
334 | + var posorientation = value._ViewOrientation.indexOf(query.selectedorientation); | |
335 | + if (posorientation > -1) { | |
336 | + count = count + 1; | |
337 | + selectimg = true; | |
222 | 338 | |
223 | - } | |
339 | + } else { | |
340 | + selectimg = false; | |
341 | + count = count - 1; | |
342 | + } | |
224 | 343 | |
225 | - if (typeof (query.selectedimagetype) !== "undefined" && query.selectedimagetype !== null) { | |
226 | - var posimagetype = value._ImageType.indexOf(query.selectedimagetype); | |
227 | - if (posimagetype > -1) { | |
228 | - count = count + 1; | |
229 | - selectimg = true; | |
344 | + } | |
230 | 345 | |
231 | - } else { | |
232 | - selectimg = false; | |
233 | - count = count - 1; | |
234 | - } | |
346 | + if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== "")) { | |
347 | + var posimagetype = value._ImageType.indexOf(query.selectedimagetype); | |
348 | + if (posimagetype > -1) { | |
349 | + count = count + 1; | |
350 | + selectimg = true; | |
235 | 351 | |
236 | - } | |
352 | + } else { | |
353 | + selectimg = false; | |
354 | + count = count - 1; | |
355 | + } | |
237 | 356 | |
238 | - if (typeof (query.selectedspecialty) !== "undefined" && query.selectedspecialty !== null) { | |
239 | - var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | |
240 | - if (posspeciality > -1) { | |
241 | - count = count + 1; | |
242 | - selectimg = true; | |
243 | - } else { | |
244 | - selectimg = false; | |
245 | - count = count - 1; | |
246 | - } | |
357 | + } | |
247 | 358 | |
248 | - } | |
359 | + if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== "")) { | |
360 | + var posspeciality = value._MedicalSpecialty.indexOf(query.selectedspecialty); | |
361 | + if (posspeciality > -1) { | |
362 | + count = count + 1; | |
363 | + selectimg = true; | |
364 | + } else { | |
365 | + selectimg = false; | |
366 | + count = count - 1; | |
367 | + } | |
249 | 368 | |
250 | - if (selectimg === true && count >= filtercount) { | |
369 | + } | |
251 | 370 | |
371 | + if (selectimg === true && count >= filtercount) { | |
252 | 372 | |
253 | - $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | |
254 | 373 | |
255 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-md-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
256 | - + '<div class="thumbnail" >' | |
257 | - + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
258 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
374 | + $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; | |
259 | 375 | |
376 | + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' | |
377 | + + '<div class="thumbnail" >' | |
378 | + + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
379 | + + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
260 | 380 | |
261 | - $compile($el)($scope); | |
262 | 381 | |
263 | - $(".sidebar").mCustomScrollbar({ | |
264 | - autoHideScrollbar: true, | |
265 | - //theme:"rounded" | |
266 | - }); | |
382 | + $compile($el)($scope); | |
267 | 383 | |
384 | + $(".sidebar").mCustomScrollbar({ | |
385 | + autoHideScrollbar: true, | |
386 | + //theme:"rounded" | |
387 | + }); | |
268 | 388 | |
269 | - $scope.searchCIListViewData.push( | |
270 | - { | |
271 | - "_id": value._id, | |
272 | - "_ImageId": value._ImageId, | |
273 | - "_Title": value._Title, | |
274 | - "_contentImage": value._contentImage, | |
275 | - "_ThumbnailImage": value._ThumbnailImage, | |
276 | - "_BodySystem": value._BodySystem, | |
277 | - "_BodyRegion": value._BodyRegion, | |
278 | - "_ViewOrientation": value._ViewOrientation, | |
279 | - "_MedicalSpecialty": value._MedicalSpecialty, | |
280 | - "_ImageType": value._ImageType, | |
281 | - "_Summary": value._Summary | |
282 | 389 | |
283 | - }); | |
390 | + $scope.searchCIListViewData.push( | |
391 | + { | |
392 | + "_id": value._id, | |
393 | + "_ImageId": value._ImageId, | |
394 | + "_Title": value._Title, | |
395 | + "_contentImage": value._contentImage, | |
396 | + "_ThumbnailImage": value._ThumbnailImage, | |
397 | + "_BodySystem": value._BodySystem, | |
398 | + "_BodyRegion": value._BodyRegion, | |
399 | + "_ViewOrientation": value._ViewOrientation, | |
400 | + "_MedicalSpecialty": value._MedicalSpecialty, | |
401 | + "_ImageType": value._ImageType, | |
402 | + "_Summary": value._Summary | |
284 | 403 | |
285 | - } | |
404 | + }); | |
286 | 405 | |
406 | + } | |
287 | 407 | |
288 | - }); | |
289 | 408 | |
290 | - //Show Error Message in case of gridview if no data is found | |
291 | - if ($scope.searchCIListViewData.length == 0) { | |
409 | + }); | |
292 | 410 | |
293 | - var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:red">No illustration found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | |
294 | - $compile($el)($scope); | |
295 | - } | |
296 | - } | |
411 | + //Show Error Message in case of gridview if no data is found | |
412 | + if ($scope.searchCIListViewData.length == 0) { | |
297 | 413 | |
414 | + var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white">No illustration found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | |
415 | + $compile($el)($scope); | |
416 | + } | |
417 | + }, | |
418 | + function (error) { | |
419 | + // handle errors here | |
420 | + console.log(' $scope.IllustrationData = ' + error.statusText); | |
421 | + } | |
422 | + ); | |
298 | 423 | |
424 | + | |
425 | + } | |
299 | 426 | |
300 | 427 | |
301 | 428 | $scope.scroll = function () { |
... | ... | @@ -399,23 +526,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
399 | 526 | $rootScope.isLoading = false; |
400 | 527 | $('#spinner').css('visibility', 'hidden'); |
401 | 528 | |
402 | - //$.jsPanel({ | |
403 | - // id: 'ciImagePanel', | |
404 | - // selector: '.ciView', | |
405 | - // theme: 'success', | |
406 | - // currentController: 'CIController', | |
407 | - // parentSlug: 'clinical-illustrations', | |
408 | - // content: '<div class="row"><div class="col-sm-12 img-thumbnail" align="center">' + | |
409 | - // '<img src="' + $scope.clickedCIImage + '" alt="" title="" style="width:100%;height:auto;" class="img-responsive "></div><div class="col-sm-12 well">' + | |
410 | - // '<div id="sid"><p>' + $scope.clickedCISummary + '</p></div><button class="btn btn-primary pull-right">Text Off</button>'+ | |
411 | - // '<script>$(document).ready(function(){$("button").click(function(){$("#sid").toggle();if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");}else{$(this).text("Text Off");}});});</script></div>' + | |
412 | - // '</div>', | |
413 | - // title: localStorage.getItem("currentViewTitle"), | |
414 | - // position: { | |
415 | - // top: 70, | |
416 | - // left: 1, | |
417 | - // }, | |
418 | - | |
419 | 529 | $.jsPanel({ |
420 | 530 | id: 'ciImagePanel', |
421 | 531 | selector: '.ciView', |
... | ... | @@ -436,8 +546,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
436 | 546 | left: 1, |
437 | 547 | }, |
438 | 548 | |
439 | - //size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, | |
440 | - | |
441 | 549 | size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, |
442 | 550 | |
443 | 551 | }); |
... | ... | @@ -450,25 +558,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
450 | 558 | "slug": $rootScope.currentSlug |
451 | 559 | }); |
452 | 560 | |
453 | - //var e1 = angular.element(document.getElementById("CIView")); | |
454 | - //$timeout(function () { | |
455 | - | |
456 | - // //$compile(e1.contents())($scope) | |
457 | - | |
458 | - // var $el = $('<div class="row"><div class="col-sm-12 img-thumbnail" align="center">' + | |
459 | - // '<img src="' + $scope.clickedCIImage + '" alt="" title="" " class="img-responsive "><div class="col-sm-12 well">' + | |
460 | - // '<div id="sid"><p>' + $scope.clickedCISummary + '</p></div><button class="btn btn-primary pull-right">Text Off</button>' + | |
461 | - // '<script>$(document).ready(function(){$("button").click(function(){$("#sid").toggle();if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");}else{$(this).text("Text Off");}});});</script></div>' + | |
462 | - // '</div></div>').appendTo('#ciView'); | |
463 | - | |
464 | - // $compile($el)($scope); | |
465 | - | |
466 | - //}, 250); | |
467 | - // $compile(e1.contents())($scope); | |
468 | - | |
469 | - //$('#ciView').css("height", $(window).outerHeight() - 110); | |
470 | - | |
471 | - //$('#ciView').css("width", $(window).outerWidth() - 10); | |
472 | 561 | |
473 | 562 | } |
474 | 563 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
11 | 11 | $scope.imagePath = ""; |
12 | 12 | $rootScope.BodyRegionData; |
13 | 13 | $rootScope.BodyRegionCordinatesData; |
14 | - $scope.isTransparencyActivated = false; | |
14 | + $scope.isTransparencyActivated = false; | |
15 | 15 | $rootScope.BodyLayerData; |
16 | 16 | $rootScope.VocabTermData; |
17 | 17 | |
... | ... | @@ -84,7 +84,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
84 | 84 | $rootScope.updatedWhiteImageMRDataList = []; |
85 | 85 | |
86 | 86 | //normal mode |
87 | - $rootScope.isNormalMode = false; | |
87 | + $rootScope.isNormalMode = true; | |
88 | 88 | $rootScope.isZoomed = false; |
89 | 89 | |
90 | 90 | //navigator man functionality |
... | ... | @@ -165,7 +165,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
165 | 165 | //get the DA body view list based on selected gender |
166 | 166 | $scope.getDAViewList = function ($event) { |
167 | 167 | |
168 | - | |
168 | + | |
169 | 169 | if ($('#MainImage') != null) { |
170 | 170 | $('#MainImage').remove(); |
171 | 171 | } |
... | ... | @@ -244,7 +244,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
244 | 244 | } |
245 | 245 | |
246 | 246 | $scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; |
247 | - | |
247 | + | |
248 | 248 | |
249 | 249 | var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._title + ' data-ng-click="openView($event)"><div class="thumbnail" >' |
250 | 250 | + '<img class= "daImg" id="' + value._title + '" src="' + $scope.imagePath + '" alt="" title="" >' |
... | ... | @@ -265,7 +265,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
265 | 265 | |
266 | 266 | |
267 | 267 | $scope.openView = function ($event) { |
268 | - | |
268 | + | |
269 | 269 | $rootScope.isLoading = true; |
270 | 270 | $('#spinner').css('visibility', 'visible'); |
271 | 271 | |
... | ... | @@ -422,6 +422,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
422 | 422 | //0.1 |
423 | 423 | var currentBodyViewId = localStorage.getItem("currentBodyViewId"); |
424 | 424 | |
425 | + $scope.loadSearchDataForBodyView(); | |
426 | + | |
427 | + | |
425 | 428 | console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); |
426 | 429 | |
427 | 430 | var openViews; |
... | ... | @@ -499,7 +502,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
499 | 502 | //1. load navigator man first |
500 | 503 | $scope.LoadBodyViewNavigatorImage(); |
501 | 504 | |
502 | - $scope.loadSearchDataForBodyView(); | |
505 | + //$scope.loadSearchDataForBodyView(); | |
503 | 506 | |
504 | 507 | $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); |
505 | 508 | |
... | ... | @@ -525,7 +528,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
525 | 528 | |
526 | 529 | |
527 | 530 | $scope.loadSearchDataForBodyView = function () { |
528 | - | |
531 | + | |
529 | 532 | console.log('loadSearchDataForBodyView'); |
530 | 533 | |
531 | 534 | var currentBodyViewId = localStorage.getItem("currentBodyViewId"); |
... | ... | @@ -601,6 +604,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
601 | 604 | $rootScope.bgartData = e.data.bodyArtData; |
602 | 605 | $rootScope.BodyLayerData = e.data.bodyLayerData; |
603 | 606 | |
607 | + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; | |
608 | + | |
609 | + //set max for LayerNumber input | |
610 | + $rootScope.totalLayers = dataLength - 1; | |
611 | + // debugger | |
612 | + $('#txtLayerNumber').attr('max', $rootScope.totalLayers); | |
613 | + $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); | |
614 | + | |
604 | 615 | $scope.isBodylayerdataLoaded = true; |
605 | 616 | |
606 | 617 | $scope.LoadDefaultLayerImage(); |
... | ... | @@ -682,7 +693,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
682 | 693 | |
683 | 694 | |
684 | 695 | $scope.LoadDefaultLayerImage = function () { |
685 | - | |
696 | + | |
686 | 697 | $rootScope.isNormalMode = true; |
687 | 698 | |
688 | 699 | $scope.layerNumber = 0; |
... | ... | @@ -724,6 +735,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
724 | 735 | //calculate coordinates for body region images |
725 | 736 | $scope.CalculateImageCordinates = function (viewOrientationId) { |
726 | 737 | |
738 | + // annotation toolbar canvas | |
739 | + if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { | |
740 | + | |
741 | + $("#canvasDiv").append('<canvas id="canvasPaint" width="2277" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="canvas" width="2277" height="3248" class="canvas-annotationStyle"></canvas>'); | |
742 | + $scope.BindCanvasDrawingListners(); | |
743 | + // $rootScope.FreeStylePaint(); | |
744 | + | |
745 | + } | |
746 | + | |
727 | 747 | $scope.terminateCurrentlyRunningWPs(); |
728 | 748 | |
729 | 749 | var drawnBodyRegionCount = []; |
... | ... | @@ -945,7 +965,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
945 | 965 | //set scrollbars on canvas and hide loading label |
946 | 966 | $('#daLoaderLabel').css('visibility', 'hidden') |
947 | 967 | |
948 | - | |
968 | + | |
949 | 969 | $('#canvasDiv').css('overflow', 'scroll') |
950 | 970 | if (isiOSSafari) { |
951 | 971 | $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) |
... | ... | @@ -954,7 +974,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
954 | 974 | else { |
955 | 975 | $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) |
956 | 976 | } |
957 | - | |
977 | + | |
958 | 978 | |
959 | 979 | // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) |
960 | 980 | $('#canvasDiv').scrollTop(50) |
... | ... | @@ -966,40 +986,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
966 | 986 | //Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top. |
967 | 987 | // #4976 :While changing gender male to female scroll bar is going on top. |
968 | 988 | var canvasDiv = document.getElementById('canvasDiv'); |
969 | - canvasDiv.scrollTop = 0; | |
989 | + if (canvasDiv != null || canvasDiv != undefined) { | |
990 | + canvasDiv.scrollTop = 0; | |
970 | 991 | |
971 | - //Navigator Code for dynamically calculating the height and width of Dragable Div on Navigator Image | |
972 | 992 | |
973 | - var dragdivh = Math.floor(($('#canvasDiv').height() / $('#canvasDiv')[0].scrollHeight) * 119) //119px is the height of the image | |
993 | + //Navigator Code for dynamically calculating the height and width of Dragable Div on Navigator Image | |
974 | 994 | |
975 | - if ($('#canvasDiv')[0].scrollWidth > $('#canvasDiv')[0].clientWidth) { | |
995 | + var dragdivh = Math.floor(($('#canvasDiv').height() / $('#canvasDiv')[0].scrollHeight) * 119) //119px is the height of the image | |
976 | 996 | |
977 | - var dragdivw = 42 | |
978 | - $scope.dragdivleft = 21; | |
979 | - $scope.dragdivtop = 0; | |
997 | + if ($('#canvasDiv')[0].scrollWidth > $('#canvasDiv')[0].clientWidth) { | |
980 | 998 | |
981 | - $scope.dragdivposition = { | |
982 | - "left": 21, | |
983 | - "top": 0 | |
984 | - }; | |
985 | - } | |
986 | - else { | |
987 | - var dragdivw = 83; | |
999 | + var dragdivw = 42 | |
1000 | + $scope.dragdivleft = 21; | |
1001 | + $scope.dragdivtop = 0; | |
988 | 1002 | |
989 | - $scope.dragdivleft = 0; | |
990 | - $scope.dragdivtop = 0; | |
1003 | + $scope.dragdivposition = { | |
1004 | + "left": 21, | |
1005 | + "top": 0 | |
1006 | + }; | |
1007 | + } | |
1008 | + else { | |
1009 | + var dragdivw = 83; | |
991 | 1010 | |
992 | - $scope.dragdivposition = { | |
993 | - "left": 0, | |
994 | - "top": 0 | |
1011 | + $scope.dragdivleft = 0; | |
1012 | + $scope.dragdivtop = 0; | |
995 | 1013 | |
996 | - }; | |
1014 | + $scope.dragdivposition = { | |
1015 | + "left": 0, | |
1016 | + "top": 0 | |
1017 | + | |
1018 | + }; | |
1019 | + } | |
997 | 1020 | } |
998 | 1021 | |
999 | - | |
1022 | + | |
1000 | 1023 | |
1001 | 1024 | $('#draggable').css('width', dragdivw); |
1002 | 1025 | $('#draggable').css('height', dragdivh) |
1026 | + | |
1003 | 1027 | } |
1004 | 1028 | |
1005 | 1029 | function scaleRectangle(x, y, height, width, mirrorValue) { |
... | ... | @@ -1059,14 +1083,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1059 | 1083 | |
1060 | 1084 | |
1061 | 1085 | $scope.GetImageSource = function (bodyRegionId) { |
1062 | - | |
1086 | + | |
1063 | 1087 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
1064 | 1088 | |
1065 | - //set max for LayerNumber input | |
1066 | - $rootScope.totalLayers = dataLength - 1; | |
1067 | - // debugger | |
1068 | - $('#txtLayerNumber').attr('max', $rootScope.totalLayers); | |
1069 | - $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); | |
1089 | + | |
1070 | 1090 | // $('#layerChangeSlider').slider("option", "value",parseInt($rootScope.totalLayers)-parseInt($scope.layerNumber)); |
1071 | 1091 | |
1072 | 1092 | $scope.one = 1; |
... | ... | @@ -1077,7 +1097,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1077 | 1097 | |
1078 | 1098 | $scope.userInput = parseInt($scope.layerNumber); |
1079 | 1099 | |
1080 | - | |
1100 | + | |
1081 | 1101 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
1082 | 1102 | |
1083 | 1103 | var SelectedLayerData = []; |
... | ... | @@ -1139,7 +1159,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1139 | 1159 | } |
1140 | 1160 | |
1141 | 1161 | $scope.GetBackgroundImgSource = function (bodyRegionId) { |
1142 | - | |
1162 | + | |
1143 | 1163 | |
1144 | 1164 | var selectedGender; |
1145 | 1165 | if (localStorage.getItem("genderId") == "Male") { |
... | ... | @@ -1157,7 +1177,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1157 | 1177 | if ($scope.bagartBodyRegionDetails != null || $scope.bagartBodyRegionDetails != undefined) { |
1158 | 1178 | |
1159 | 1179 | //filter bodyRegion data basd on skintone |
1160 | - $scope.skinTone = $rootScope.globalSetting.ethnicity | |
1180 | + $scope.skinTone = $rootScope.globalSetting.ethnicity | |
1161 | 1181 | $scope.bagartDetailsOnSktn = new jinqJs() |
1162 | 1182 | .from($scope.bagartBodyRegionDetails) |
1163 | 1183 | .where('_Skintone == ' + $scope.skinTone) |
... | ... | @@ -1193,11 +1213,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1193 | 1213 | FlipedImgCanvas.style.left = x + "px"; |
1194 | 1214 | FlipedImgCanvas.style.top = y + "px"; |
1195 | 1215 | |
1196 | - | |
1216 | + | |
1197 | 1217 | |
1198 | 1218 | if (isMaskImage == 'Y') { |
1219 | + | |
1199 | 1220 | FlipedImgCanvas.id = 'imageCanvas' + bodyRegionId + '_MR_mci'; |
1200 | - FlipedImgCanvas.style.visibility = 'hidden' | |
1221 | + FlipedImgCanvas.style.visibility = 'hidden'; | |
1222 | + | |
1201 | 1223 | |
1202 | 1224 | } |
1203 | 1225 | else { |
... | ... | @@ -1218,6 +1240,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1218 | 1240 | |
1219 | 1241 | FlipedImgCanvas.addEventListener('click', function (evt) { |
1220 | 1242 | |
1243 | + | |
1221 | 1244 | //to get correct data on multihighlight highlight |
1222 | 1245 | if ($scope.isLayerChange == true) { |
1223 | 1246 | $scope.isLayerChange = false; |
... | ... | @@ -1294,6 +1317,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1294 | 1317 | } |
1295 | 1318 | var RGBColor = (Red + Green + Blue); |
1296 | 1319 | |
1320 | + $rootScope.previousHighlightList.push(RGBColor); | |
1321 | + | |
1322 | + | |
1297 | 1323 | if ($rootScope.isHighLight) { |
1298 | 1324 | |
1299 | 1325 | if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { |
... | ... | @@ -1331,15 +1357,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1331 | 1357 | } |
1332 | 1358 | } |
1333 | 1359 | |
1334 | - $rootScope.previousHighlightList.push(RGBColor); | |
1360 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1335 | 1361 | |
1336 | 1362 | $scope.highLightBodyBasedOnIcolor(RGBColor); |
1337 | 1363 | } |
1338 | 1364 | |
1339 | - if ($rootScope.isNormalMode == true) { | |
1365 | + //if ($rootScope.isNormalMode == true) { | |
1340 | 1366 | |
1341 | 1367 | |
1342 | - $rootScope.previousHighlightList.push(RGBColor); | |
1368 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1369 | + //} | |
1370 | + | |
1371 | + //extarct clicked body part is extarct button is already enabled. | |
1372 | + // debugger; | |
1373 | + if ($rootScope.isExtract == true) { | |
1374 | + $scope.enableExtract(false); | |
1343 | 1375 | } |
1344 | 1376 | |
1345 | 1377 | var annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); |
... | ... | @@ -1352,6 +1384,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1352 | 1384 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1353 | 1385 | $scope.MultiLanguageAnnationArray = []; |
1354 | 1386 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1387 | + | |
1355 | 1388 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1356 | 1389 | } |
1357 | 1390 | else { |
... | ... | @@ -1367,6 +1400,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1367 | 1400 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1368 | 1401 | $scope.MultiLanguageAnnationArray = []; |
1369 | 1402 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1403 | + | |
1404 | + | |
1370 | 1405 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1371 | 1406 | } |
1372 | 1407 | else { |
... | ... | @@ -1374,6 +1409,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1374 | 1409 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1375 | 1410 | $scope.MultiLanguageAnnationArray = []; |
1376 | 1411 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1412 | + | |
1413 | + | |
1377 | 1414 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1378 | 1415 | } |
1379 | 1416 | |
... | ... | @@ -1412,33 +1449,52 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1412 | 1449 | |
1413 | 1450 | |
1414 | 1451 | function start() { |
1452 | + | |
1415 | 1453 | context.save(); |
1416 | 1454 | context.translate(w, 0); |
1417 | 1455 | context.scale(-1, 1); |
1418 | 1456 | context.drawImage(img, 0, 0); |
1419 | 1457 | context.restore(); |
1458 | + | |
1459 | + | |
1460 | + if (isMaskImage == 'N') { | |
1420 | 1461 | |
1421 | 1462 | |
1422 | - if (isMaskImage == 'N') { | |
1463 | + $scope.ColoredImageSRC.push( | |
1464 | + { | |
1465 | + "bodyRegionId": bodyRegionId, "SRC": src, | |
1466 | + "Height": h, | |
1467 | + "Width": w, | |
1468 | + "x": x, | |
1469 | + "y": y, | |
1470 | + "haveMirror": 'true' | |
1471 | + } | |
1472 | + ); | |
1423 | 1473 | |
1424 | - | |
1425 | - $scope.ColoredImageSRC.push( | |
1426 | - { | |
1427 | - "bodyRegionId": bodyRegionId, "SRC": src, | |
1428 | - "Height": h, | |
1429 | - "Width": w, | |
1430 | - "x": x, | |
1431 | - "y": y, | |
1432 | - "haveMirror": 'true' | |
1433 | - } | |
1434 | - ); | |
1474 | + //-NIKI-for solving extarct issue 8286 | |
1475 | + | |
1476 | + var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR'); | |
1477 | + | |
1478 | + if (imageCanvas != null || imageCanvas != undefined) { | |
1479 | + var width = imageCanvas.width; | |
1480 | + var ht = imageCanvas.height; | |
1481 | + | |
1482 | + var coloredCanvasContext = imageCanvas.getContext("2d"); | |
1483 | + var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht); | |
1484 | + var coloredImageDataVar = coloredImageData; | |
1485 | + | |
1486 | + $rootScope.coloredImageMRCanvasList[parseInt(bodyRegionId)] = coloredImageDataVar; | |
1487 | + } | |
1435 | 1488 | |
1489 | + | |
1436 | 1490 | |
1437 | - // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) | |
1491 | + // | |
1438 | 1492 | |
1493 | + // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) | |
1439 | 1494 | |
1440 | - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { | |
1441 | 1495 | |
1496 | + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { | |
1497 | + | |
1442 | 1498 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
1443 | 1499 | $scope.isEligibleForHighlight = true; |
1444 | 1500 | } |
... | ... | @@ -1455,9 +1511,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1455 | 1511 | $scope.isEligibleForHighlight = false; |
1456 | 1512 | } |
1457 | 1513 | |
1458 | - if ($scope.isEligibleForHighlight == true) | |
1459 | - { | |
1460 | - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1514 | + if ($scope.isEligibleForHighlight == true) { | |
1515 | + if ($scope.isExtract == true) { | |
1516 | + $rootScope.isLoading = true; | |
1517 | + $('#spinner').css('visibility', 'visible'); | |
1518 | + $scope.highLightBody(); | |
1519 | + } | |
1520 | + else if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $rootScope.isHighlightBodyByBodySystem == true) { | |
1521 | + | |
1522 | + console.log('1. $rootScope.isHighLight= ' + $rootScope.isHighLight) | |
1461 | 1523 | |
1462 | 1524 | $rootScope.isLoading = true; |
1463 | 1525 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -1489,9 +1551,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1489 | 1551 | ); |
1490 | 1552 | } |
1491 | 1553 | }; |
1492 | - | |
1554 | + | |
1555 | + | |
1493 | 1556 | if (document.getElementById('canvasDiv') != null) |
1494 | 1557 | document.getElementById('canvasDiv').appendChild(FlipedImgCanvas); |
1558 | + | |
1559 | + | |
1495 | 1560 | |
1496 | 1561 | |
1497 | 1562 | |
... | ... | @@ -1619,6 +1684,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1619 | 1684 | |
1620 | 1685 | } |
1621 | 1686 | |
1687 | + $rootScope.previousHighlightList.push(RGBColor); | |
1622 | 1688 | |
1623 | 1689 | if ($rootScope.isHighLight == true) { |
1624 | 1690 | if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { |
... | ... | @@ -1657,7 +1723,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1657 | 1723 | } |
1658 | 1724 | } |
1659 | 1725 | |
1660 | - $rootScope.previousHighlightList.push(RGBColor); | |
1726 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1661 | 1727 | |
1662 | 1728 | |
1663 | 1729 | if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { } |
... | ... | @@ -1668,8 +1734,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1668 | 1734 | |
1669 | 1735 | } |
1670 | 1736 | |
1671 | - if ($rootScope.isNormalMode == true) { | |
1672 | - $rootScope.previousHighlightList.push(RGBColor); | |
1737 | + //if ($rootScope.isNormalMode == true) { | |
1738 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1739 | + //} | |
1740 | + | |
1741 | + // debugger; | |
1742 | + //extarct clisked body part is extarct button is already enabled. | |
1743 | + if ($rootScope.isExtract == true) { | |
1744 | + $scope.enableExtract(false); | |
1673 | 1745 | } |
1674 | 1746 | |
1675 | 1747 | if ($('#speechBubbleTrns').length > 0) |
... | ... | @@ -1680,6 +1752,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1680 | 1752 | // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); |
1681 | 1753 | $scope.MultiLanguageAnnationArray = []; |
1682 | 1754 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1755 | + | |
1683 | 1756 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1684 | 1757 | } |
1685 | 1758 | else { |
... | ... | @@ -1715,6 +1788,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1715 | 1788 | $scope.MultiLanguageAnnationArray.push(annotationText); |
1716 | 1789 | |
1717 | 1790 | console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); |
1791 | + | |
1718 | 1792 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
1719 | 1793 | } |
1720 | 1794 | |
... | ... | @@ -1733,10 +1807,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1733 | 1807 | |
1734 | 1808 | img.src = src; |
1735 | 1809 | |
1736 | - | |
1810 | + | |
1737 | 1811 | |
1738 | 1812 | function start() { |
1739 | - //debugger; | |
1813 | + | |
1740 | 1814 | context.drawImage(img, 0, 0); |
1741 | 1815 | |
1742 | 1816 | if (isMaskImage == 'N') { |
... | ... | @@ -1744,19 +1818,36 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1744 | 1818 | //do nothing |
1745 | 1819 | } |
1746 | 1820 | else { |
1747 | - | |
1748 | - $scope.ColoredImageSRC.push( | |
1749 | - { | |
1750 | - "bodyRegionId": bodyRegionId, "SRC": src, | |
1751 | - "Height": h, | |
1752 | - "Width": w, | |
1753 | - "x": x, | |
1754 | - "y": y, | |
1755 | - "haveMirror": 'false' | |
1756 | - } | |
1757 | - | |
1758 | - ); | |
1759 | - | |
1821 | + | |
1822 | + $scope.ColoredImageSRC.push( | |
1823 | + { | |
1824 | + "bodyRegionId": bodyRegionId, "SRC": src, | |
1825 | + "Height": h, | |
1826 | + "Width": w, | |
1827 | + "x": x, | |
1828 | + "y": y, | |
1829 | + "haveMirror": 'false' | |
1830 | + } | |
1831 | + | |
1832 | + ); | |
1833 | + | |
1834 | + | |
1835 | + //-NIKI-for solving extarct issue 8286 | |
1836 | + | |
1837 | + var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId); | |
1838 | + | |
1839 | + if (imageCanvas != null || imageCanvas != undefined) { | |
1840 | + var width = imageCanvas.width; | |
1841 | + var ht = imageCanvas.height; | |
1842 | + | |
1843 | + var coloredCanvasContext = imageCanvas.getContext("2d"); | |
1844 | + var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht); | |
1845 | + var coloredImageDataVar = coloredImageData; | |
1846 | + | |
1847 | + | |
1848 | + $rootScope.coloredImageCanvasList[parseInt(bodyRegionId - 1)] = coloredImageDataVar; | |
1849 | + } | |
1850 | + // | |
1760 | 1851 | |
1761 | 1852 | if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { |
1762 | 1853 | |
... | ... | @@ -1776,15 +1867,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1776 | 1867 | $scope.isEligibleForHighlight = false; |
1777 | 1868 | } |
1778 | 1869 | |
1779 | - if ($scope.isEligibleForHighlight == true) | |
1780 | - { | |
1781 | - | |
1782 | - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1783 | 1870 | |
1871 | + if ($scope.isEligibleForHighlight == true) { | |
1872 | + | |
1873 | + if ($scope.isExtract == true) { | |
1874 | + $rootScope.isLoading = true; | |
1875 | + $('#spinner').css('visibility', 'visible'); | |
1876 | + $scope.highLightBody(); | |
1877 | + } | |
1878 | + else if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $scope.isExtract == true || $rootScope.isHighlightBodyByBodySystem == true) { | |
1879 | + | |
1880 | + console.log('2. $rootScope.isHighLight= ' + $rootScope.isHighLight) | |
1784 | 1881 | |
1785 | 1882 | $rootScope.isLoading = true; |
1786 | 1883 | $('#spinner').css('visibility', 'visible'); |
1787 | - | |
1884 | + | |
1788 | 1885 | console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) |
1789 | 1886 | $rootScope.isHighLight = true; |
1790 | 1887 | |
... | ... | @@ -1793,7 +1890,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1793 | 1890 | $scope.highLightBody(); |
1794 | 1891 | |
1795 | 1892 | console.log('just after highLightBody call'); |
1796 | - | |
1893 | + | |
1797 | 1894 | } |
1798 | 1895 | } |
1799 | 1896 | } |
... | ... | @@ -1844,16 +1941,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1844 | 1941 | |
1845 | 1942 | |
1846 | 1943 | $scope.HighlightBodyOnExtract = function () { |
1944 | + console.log(' insode HighlightBodyOnExtract. $rootScope.MaskCanvasData length= ' + $rootScope.MaskCanvasData.length + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length) | |
1847 | 1945 | |
1848 | - | |
1849 | 1946 | var multiTermList = []; |
1850 | 1947 | var CallBackBodyRegion = []; |
1851 | 1948 | |
1852 | 1949 | if ($rootScope.isListManagerSelected) { |
1853 | - | |
1950 | + | |
1854 | 1951 | multiTermList = $scope.AllTerms; |
1855 | - | |
1856 | - } | |
1952 | + | |
1953 | + } | |
1857 | 1954 | else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { |
1858 | 1955 | angular.forEach($rootScope.previousHighlightList, function (value, key) { |
1859 | 1956 | |
... | ... | @@ -1879,7 +1976,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1879 | 1976 | |
1880 | 1977 | |
1881 | 1978 | //terminate previous running workers to create space for new workers |
1882 | - | |
1979 | + $scope.layerNumber = $('#txtlayerNumber').val(); | |
1883 | 1980 | $scope.terminateCurrentlyRunningWPs(); |
1884 | 1981 | |
1885 | 1982 | $timeout(function () { |
... | ... | @@ -1967,7 +2064,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1967 | 2064 | |
1968 | 2065 | |
1969 | 2066 | var canvasId = (e.data.canvasId).replace('_mci', ''); |
1970 | - //debugger; | |
2067 | + | |
1971 | 2068 | //for (var i = 1; i <= updatedData.length; i++) { |
1972 | 2069 | var grayCanvasID = canvasId; |
1973 | 2070 | |
... | ... | @@ -1978,8 +2075,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1978 | 2075 | |
1979 | 2076 | |
1980 | 2077 | grayCanvasContext.putImageData(updatedData, 0, 0); |
1981 | - | |
1982 | - | |
2078 | + | |
2079 | + | |
1983 | 2080 | //to resolve lateral arm black issue in highlight mode |
1984 | 2081 | |
1985 | 2082 | if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { |
... | ... | @@ -2003,7 +2100,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2003 | 2100 | |
2004 | 2101 | |
2005 | 2102 | if ($rootScope.multiAnnotationIsON == true) { |
2006 | - //debugger; | |
2103 | + | |
2007 | 2104 | if (canvasId.match('_MR')) |
2008 | 2105 | $rootScope.updatedWhiteImageMRDataList[bodyRegionId] = updatedData; |
2009 | 2106 | else |
... | ... | @@ -2052,6 +2149,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2052 | 2149 | // $rootScope.updatedGrayDataList = null; |
2053 | 2150 | // $rootScope.updatedGrayDataList = []; |
2054 | 2151 | //} |
2152 | + | |
2153 | + $scope.layerNumber = $('#txtlayerNumber').val(); | |
2154 | + | |
2055 | 2155 | $rootScope.isLoading = true; |
2056 | 2156 | $('#spinner').css('visibility', 'visible'); |
2057 | 2157 | |
... | ... | @@ -2205,7 +2305,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2205 | 2305 | |
2206 | 2306 | var bodyRegionId = e.data.bodyRegionId; |
2207 | 2307 | var canvasId = (e.data.canvasId).replace('_mci', ''); |
2208 | - //debugger; | |
2308 | + | |
2209 | 2309 | //for (var i = 1; i <= updatedData.length; i++) { |
2210 | 2310 | var grayCanvasID = canvasId; |
2211 | 2311 | |
... | ... | @@ -2225,7 +2325,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2225 | 2325 | |
2226 | 2326 | } |
2227 | 2327 | |
2228 | - //debugger; | |
2328 | + | |
2229 | 2329 | |
2230 | 2330 | if (canvasId.match('_MR')) { |
2231 | 2331 | $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; |
... | ... | @@ -2257,14 +2357,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2257 | 2357 | } |
2258 | 2358 | |
2259 | 2359 | if ($scope.doAligneCanvasWithTerm == true) { |
2260 | - //debugger; | |
2261 | - if ( $rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) | |
2360 | + | |
2361 | + if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) | |
2262 | 2362 | |
2263 | 2363 | $rootScope.isLoading = false; |
2264 | 2364 | |
2265 | - $('#spinner').css('visibility', 'hidden'); | |
2365 | + $('#spinner').css('visibility', 'hidden'); | |
2266 | 2366 | |
2267 | - //$rootScope.isHighlightBodyByBodySystem = false; | |
2367 | + // $rootScope.isHighlightBodyByBodySystem = false; | |
2268 | 2368 | |
2269 | 2369 | if ($rootScope.isListManagerSelected == true) |
2270 | 2370 | $scope.aligneCanvasWithTerm(); |
... | ... | @@ -2288,9 +2388,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2288 | 2388 | |
2289 | 2389 | var multiTermList = []; |
2290 | 2390 | angular.forEach($rootScope.previousHighlightList, function (value, key) { |
2291 | - | |
2292 | - //debugger; | |
2293 | - | |
2294 | 2391 | var ActualTermNo = $scope.getActualTermNumber(value); |
2295 | 2392 | if (ActualTermNo != null) { |
2296 | 2393 | var TermList = $scope.getTermNumberList(ActualTermNo); |
... | ... | @@ -2351,8 +2448,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2351 | 2448 | |
2352 | 2449 | //get annotation from term number |
2353 | 2450 | $scope.GetAnnotationText = function (termNumber) { |
2354 | - //debugger; | |
2355 | - | |
2451 | + | |
2356 | 2452 | var annotationText; |
2357 | 2453 | //0 |
2358 | 2454 | var figLeafTermNo = 5868; // to do declare constant for this |
... | ... | @@ -2387,8 +2483,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2387 | 2483 | } |
2388 | 2484 | |
2389 | 2485 | $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { |
2390 | - // debugger; | |
2391 | - | |
2486 | + | |
2392 | 2487 | var Annotation; |
2393 | 2488 | $scope.ActualTermNo = actualTermNo; |
2394 | 2489 | if ($rootScope.VocabTermData != null || $rootScope.VocabTermData != undefined) { |
... | ... | @@ -2416,10 +2511,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2416 | 2511 | //layer change function |
2417 | 2512 | $scope.LayerChange = function () { |
2418 | 2513 | |
2419 | - | |
2514 | + | |
2420 | 2515 | //if listanager is visisble then close it |
2421 | - // $rootScope.isListManagerSelected = false; | |
2422 | - | |
2516 | + // $rootScope.isListManagerSelected = false; | |
2517 | + | |
2423 | 2518 | $rootScope.CloseListManager(); |
2424 | 2519 | |
2425 | 2520 | |
... | ... | @@ -2435,13 +2530,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2435 | 2530 | $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; |
2436 | 2531 | $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; |
2437 | 2532 | |
2438 | - // debugger; | |
2439 | 2533 | // $('#daLoaderLabel').css('visibility', 'visible'); |
2440 | 2534 | |
2441 | 2535 | |
2442 | - | |
2443 | 2536 | if ($scope.isTransparencyActivated) { |
2444 | - | |
2537 | + | |
2445 | 2538 | //crete temp canavs to store the original data which will be used to chnange the transparency |
2446 | 2539 | if (document.getElementById('tempCanvas') != null) { |
2447 | 2540 | $('#tempCanvas').remove(); |
... | ... | @@ -2463,7 +2556,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2463 | 2556 | if (document.getElementById('canvasDiv') != null) |
2464 | 2557 | document.getElementById('canvasDiv').appendChild(tempCanvas); |
2465 | 2558 | |
2466 | - // //debugger; | |
2559 | + | |
2467 | 2560 | |
2468 | 2561 | var tCanvas = document.getElementById('transparencyCanvas'); |
2469 | 2562 | var tCanvasContext = tCanvas.getContext('2d'); |
... | ... | @@ -2510,7 +2603,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2510 | 2603 | |
2511 | 2604 | else { |
2512 | 2605 | |
2513 | - | |
2606 | + | |
2514 | 2607 | //1. Dated:13-07-2016 Issue #4965 : The layer number should not extend beyond its level through layer text box. |
2515 | 2608 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
2516 | 2609 | if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { |
... | ... | @@ -2542,23 +2635,70 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2542 | 2635 | $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) |
2543 | 2636 | $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) |
2544 | 2637 | |
2545 | - if ( $rootScope.isHighlightBodyByBodySystem) { | |
2638 | + | |
2639 | + if ($rootScope.isHighlightBodyByBodySystem) { | |
2546 | 2640 | $timeout(function () { $scope.DisableProgressBar() }, 20000); |
2547 | 2641 | } |
2548 | - else | |
2549 | - { | |
2642 | + else { | |
2550 | 2643 | $timeout(function () { $scope.DisableProgressBar() }, 2000); |
2551 | 2644 | } |
2552 | 2645 | } |
2553 | 2646 | |
2554 | 2647 | $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); |
2555 | 2648 | } |
2649 | + $rootScope.PreviouslayerNumbr = 0; | |
2650 | + $scope.LayerChangeOnMouseUpDown = function (e) { | |
2651 | + //'x' button is displaying inside the input box in IE browser. | |
2652 | + | |
2653 | + if (e.currentTarget.id == "incrmntVal") { | |
2654 | + //Dissectible Anatomy > Inappropriate Text in Layer Input box. | |
2655 | + if ($("#txtlayerNumber").val() == '') { | |
2656 | + var layerInputVal = 0; | |
2657 | + | |
2658 | + var layerInputValInc = parseInt(layerInputVal); | |
2659 | + $scope.layerNumber = parseInt(layerInputValInc); | |
2660 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2661 | + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2662 | + | |
2663 | + } | |
2664 | + else { | |
2665 | + var layerInputVal = $("#txtlayerNumber").val(); | |
2666 | + if (layerInputVal != $rootScope.totalLayers) { | |
2667 | + var layerInputValInc = parseInt(layerInputVal) + 1; | |
2668 | + $scope.layerNumber = parseInt(layerInputValInc); | |
2669 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2670 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2671 | + } | |
2556 | 2672 | |
2557 | - $scope.LayerChangeOnMouseUpDown = function (e) | |
2558 | - { | |
2559 | - | |
2560 | - $scope.LayerChange(); | |
2673 | + } | |
2674 | + | |
2675 | + } | |
2676 | + else { | |
2561 | 2677 | |
2678 | + //Dissectible Anatomy > Inappropriate Text in Layer Input box. | |
2679 | + if ($("#txtlayerNumber").val() == '') { | |
2680 | + var layerInputVal = 0; | |
2681 | + var layerInputValDec = parseInt(layerInputVal); | |
2682 | + $scope.layerNumber = parseInt(layerInputValDec); | |
2683 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2684 | + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2685 | + | |
2686 | + } | |
2687 | + else | |
2688 | + { | |
2689 | + var layerInputVal = $("#txtlayerNumber").val(); | |
2690 | + if (layerInputVal > 0) { | |
2691 | + var layerInputValDec = parseInt(layerInputVal) - 1; | |
2692 | + $scope.layerNumber = parseInt(layerInputValDec); | |
2693 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2694 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2695 | + } | |
2696 | + } | |
2697 | + | |
2698 | + } | |
2699 | + $scope.LayerChange(); | |
2700 | + $rootScope.isLoading = false; | |
2701 | + $('#spinner').css('visibility', 'hidden'); | |
2562 | 2702 | } |
2563 | 2703 | |
2564 | 2704 | |
... | ... | @@ -2594,6 +2734,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2594 | 2734 | } |
2595 | 2735 | |
2596 | 2736 | console.log('highLightBody call from DisableProgressBar') |
2737 | + | |
2597 | 2738 | // $scope.highLightBody(); |
2598 | 2739 | |
2599 | 2740 | |
... | ... | @@ -2633,6 +2774,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2633 | 2774 | |
2634 | 2775 | $scope.createDynamicSpeechBubble = function (event, x, y, isAnnotationForTBox) { |
2635 | 2776 | |
2777 | + //debugger; | |
2636 | 2778 | if (isAnnotationForTBox == true) { |
2637 | 2779 | //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 |
2638 | 2780 | // we decide the size of speech bubble |
... | ... | @@ -2691,7 +2833,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2691 | 2833 | |
2692 | 2834 | |
2693 | 2835 | $('.dynCross').on('click', function (evt) { |
2694 | - $(this).parent().parent().parent().css('display', 'none'); | |
2836 | + //$(this).parent().parent().parent().css('display', 'none'); | |
2837 | + $(this).parent().parent().parent().remove(); | |
2695 | 2838 | |
2696 | 2839 | }); |
2697 | 2840 | |
... | ... | @@ -2700,12 +2843,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2700 | 2843 | |
2701 | 2844 | else { |
2702 | 2845 | $scope.multiAnnotationIsON = false; |
2846 | + | |
2847 | + //$(".com").css("display", "none"); | |
2848 | + //$("#bord").css({ "width": "0px", "display": "none" }); | |
2849 | + $(".com").remove(); | |
2850 | + $("#bord").remove(); | |
2703 | 2851 | |
2704 | - $(".com").css("display", "none"); | |
2705 | - $("#bord").css({ "width": "0px", "display": "none" }); | |
2706 | 2852 | var sppechBubbleDotHTML = '<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' |
2707 | - + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;">' | |
2708 | - + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2853 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">' | |
2854 | + + '<span style="position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;">' | |
2709 | 2855 | + '<img class="crossDiv_temp" src=' + $rootScope.path + '></span></div>' |
2710 | 2856 | |
2711 | 2857 | + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' |
... | ... | @@ -2806,7 +2952,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2806 | 2952 | { |
2807 | 2953 | drag: function (evt) { |
2808 | 2954 | |
2809 | - $("#dot").css("display", "none"); | |
2955 | + //$("#dot").css("display", "none"); | |
2956 | + $("#dot").css("visibility", "hidden"); | |
2810 | 2957 | var verticalScrollPosition = canvasDiv.scrollTop; |
2811 | 2958 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
2812 | 2959 | $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
... | ... | @@ -2817,11 +2964,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2817 | 2964 | |
2818 | 2965 | |
2819 | 2966 | $('.crossDiv_temp').on('click', function (evt) { |
2820 | - $('#sppeachBubble').css('display', 'none'); | |
2967 | + //$('#sppeachBubble').css('display', 'none'); | |
2821 | 2968 | |
2822 | - $("#bord").css("display", "none"); | |
2823 | - $("#dot").css("display", "none"); | |
2969 | + //$("#bord").css("display", "none"); | |
2970 | + //$("#dot").css("display", "none"); | |
2971 | + $('#sppeachBubble').remove(); | |
2824 | 2972 | |
2973 | + $("#bord").remove(); | |
2974 | + $("#dot").remove(); | |
2825 | 2975 | |
2826 | 2976 | }); |
2827 | 2977 | |
... | ... | @@ -2846,7 +2996,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2846 | 2996 | var Exists_annotation = $("#canvasDiv").find("div[id=" + pointClicked_annotation + "]").length; |
2847 | 2997 | // alert(Exists_annotation); |
2848 | 2998 | // alert(pointClicked_annotation); |
2849 | - var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.j + "'></div><div data=" + $scope.j + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.j + " class='dynCross_anno' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord_annotation" + $scope.j + "'></div></div>"; | |
2999 | + var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.j + "'></div><div data=" + $scope.j + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;'><img id=" + $scope.j + " class='dynCross_anno' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord_annotation" + $scope.j + "'></div></div>"; | |
2850 | 3000 | if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) { |
2851 | 3001 | if (Exists_annotation == 0) { |
2852 | 3002 | $("#canvasDiv").append(sppechBubbleHTML_annotation); |
... | ... | @@ -2949,7 +3099,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2949 | 3099 | $("#" + sub_id_annotation).append("<p style='margin-bottom:2px;'>" + MultipleLang_annotation_T1 + "</p>"); |
2950 | 3100 | } |
2951 | 3101 | |
2952 | - $("#" + sub_id_annotation).append("<p style='border-bottom:1px solid black;margin-bottom:0;'></p>"); | |
3102 | + $("#" + sub_id_annotation).append("<p style='border-bottom:1px dotted white;margin-bottom:0;'></p>"); | |
2953 | 3103 | |
2954 | 3104 | for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) { |
2955 | 3105 | var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k]; |
... | ... | @@ -3052,8 +3202,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3052 | 3202 | |
3053 | 3203 | |
3054 | 3204 | $('.dynCross_anno').on('click', function (evt) { |
3055 | - $(this).parent().parent().parent().css('display', 'none'); | |
3056 | - | |
3205 | + //$(this).parent().parent().parent().css('display', 'none'); | |
3206 | + $(this).parent().parent().parent().remove(); | |
3057 | 3207 | // $("#bord").css("display", "none"); |
3058 | 3208 | // $("#dot").css("display", "none"); |
3059 | 3209 | |
... | ... | @@ -3065,15 +3215,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3065 | 3215 | } |
3066 | 3216 | |
3067 | 3217 | else { |
3068 | - | |
3218 | + | |
3069 | 3219 | $scope.multiAnnotationIsON = false; |
3070 | 3220 | |
3071 | 3221 | $(".com_annotation").css("display", "none"); |
3072 | 3222 | $("#bord_annotation").css({ "width": "0px", "display": "none" }); |
3073 | - | |
3223 | + $('.dynCross_anno').parent().parent().parent().remove(); | |
3074 | 3224 | var sppechBubbleDotHTML_annotation = '<div id="dot_annotation" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' |
3075 | - + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;">' | |
3076 | - + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
3225 | + + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;font-weight:bold;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">' | |
3226 | + + '<span style="position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;">' | |
3077 | 3227 | + '<img class="crossDiv_temp_annotation" src=' + $rootScope.path + '></span></div>' |
3078 | 3228 | |
3079 | 3229 | + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord_annotation">' |
... | ... | @@ -3090,7 +3240,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3090 | 3240 | $("#sppeachBubble_annotation").append("<p style='margin-bottom:2px;'>" + MultipleLang_annotation_T1 + "</p>"); |
3091 | 3241 | } |
3092 | 3242 | |
3093 | - $("#sppeachBubble_annotation").append("<p style='border-bottom:1px solid black;margin-bottom:0;'></p>"); | |
3243 | + $("#sppeachBubble_annotation").append("<p style='border-bottom:1px dotted white;margin-bottom:0;'></p>"); | |
3094 | 3244 | |
3095 | 3245 | for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) { |
3096 | 3246 | var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k]; |
... | ... | @@ -3167,7 +3317,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3167 | 3317 | $("#sppeachBubble_annotation").append("<p style='margin-bottom:2px;'>" + MultipleLang_annotation_T1 + "</p>"); |
3168 | 3318 | } |
3169 | 3319 | |
3170 | - $("#sppeachBubble_annotation").append("<p style='border-bottom:1px solid black;margin-bottom:0;'></p>"); | |
3320 | + $("#sppeachBubble_annotation").append("<p style='border-bottom:1px dotted white;margin-bottom:0;'></p>"); | |
3171 | 3321 | |
3172 | 3322 | for (var k = 0; k <= $scope.annotationTextArrayT2.length - 1; k++) { |
3173 | 3323 | var MultipleLang_annotation_T2 = $scope.annotationTextArrayT2[k]; |
... | ... | @@ -3247,7 +3397,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3247 | 3397 | { |
3248 | 3398 | drag: function (evt) { |
3249 | 3399 | |
3250 | - $("#dot_annotation").css("display", "none"); | |
3400 | + //$("#dot_annotation").css("display", "none"); | |
3401 | + $("#dot_annotation").remove(); | |
3402 | + | |
3251 | 3403 | var verticalScrollPosition = canvasDiv.scrollTop; |
3252 | 3404 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
3253 | 3405 | $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
... | ... | @@ -3258,12 +3410,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3258 | 3410 | |
3259 | 3411 | |
3260 | 3412 | $('.crossDiv_temp_annotation').on('click', function (evt) { |
3261 | - $('#sppeachBubble_annotation').css('display', 'none'); | |
3413 | + //$('#sppeachBubble_annotation').css('display', 'none'); | |
3262 | 3414 | |
3263 | - $("#bord_annotation").css("display", "none"); | |
3264 | - $("#dot_annotation").css("display", "none"); | |
3415 | + //$("#bord_annotation").css("display", "none"); | |
3416 | + //$("#dot_annotation").css("display", "none"); | |
3265 | 3417 | |
3266 | 3418 | |
3419 | + $('#sppeachBubble_annotation').remove(); | |
3420 | + | |
3421 | + $("#bord_annotation").remove(); | |
3422 | + $("#dot_annotation").remove(); | |
3423 | + | |
3267 | 3424 | }); |
3268 | 3425 | } |
3269 | 3426 | |
... | ... | @@ -3277,7 +3434,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3277 | 3434 | } |
3278 | 3435 | |
3279 | 3436 | $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) { |
3280 | - var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>"; | |
3437 | + var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;font-weight:bold;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:0px;top:0px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>"; | |
3281 | 3438 | //Issue #7286 :Undefined annotation should not appear |
3282 | 3439 | for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { |
3283 | 3440 | var annotation = $scope.MultiLanguageAnnationArray[i]; |
... | ... | @@ -3422,9 +3579,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3422 | 3579 | |
3423 | 3580 | $scope.createTransparencyBox = function () { |
3424 | 3581 | |
3425 | - $scope.isTransparencyActivated = true; | |
3582 | + $scope.isTransparencyActivated = true; | |
3426 | 3583 | |
3427 | - //do not create TBOX if in extarct mode otherwise create | |
3584 | + //do not create TBOX if in extarct mode otherwise create | |
3428 | 3585 | if ($rootScope.isExtract == false) { |
3429 | 3586 | |
3430 | 3587 | $("#btnExtract").addClass("disabled"); |
... | ... | @@ -3434,7 +3591,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3434 | 3591 | $rootScope.CloseListManager(); |
3435 | 3592 | |
3436 | 3593 | |
3437 | - | |
3594 | + | |
3438 | 3595 | // alert('transparencyClicked' + $scope.isTransparencyActivated) |
3439 | 3596 | $('#btnTranparency').addClass('tButtonActive'); |
3440 | 3597 | $('#btnIdentity').removeClass(' btn-primary'); |
... | ... | @@ -3543,6 +3700,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3543 | 3700 | |
3544 | 3701 | //alert('mouse up'); |
3545 | 3702 | console.log('MOUSE UP'); |
3703 | + $(".com").remove(); | |
3704 | + $('#dot').remove(); | |
3705 | + $('#bord').remove(); | |
3706 | + $('#sppeachBubble').remove(); | |
3546 | 3707 | |
3547 | 3708 | $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); |
3548 | 3709 | $('.rectangle').remove(); |
... | ... | @@ -3564,7 +3725,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3564 | 3725 | $scope.TransparencyEndX = TransparencyEndX; |
3565 | 3726 | $scope.TransparencyBoxEndY = TransparencyBoxEndY; |
3566 | 3727 | |
3567 | - | |
3728 | + $scope.layerNumberBeforeTrans = parseInt($('#txtlayerNumber').val()); | |
3568 | 3729 | |
3569 | 3730 | //draw temp box to store the canvas data with original transparecy |
3570 | 3731 | if (document.getElementById('tempCanvas') != null) { |
... | ... | @@ -3683,7 +3844,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3683 | 3844 | |
3684 | 3845 | $('#btnTranparency').addClass('tButtonActive'); |
3685 | 3846 | //debugger; |
3686 | - // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); | |
3847 | + // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); | |
3687 | 3848 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
3688 | 3849 | $('#btnTranparency').removeClass('tButtonActive'); |
3689 | 3850 | $('#btnTranparency').addClass('btn-black'); |
... | ... | @@ -3846,10 +4007,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3846 | 4007 | //do nothing |
3847 | 4008 | } |
3848 | 4009 | else if (isLayerChanged) { |
3849 | - | |
3850 | - // alert('isMousUp on isLayerChanged'); | |
3851 | 4010 | |
3852 | - $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | |
4011 | + // alert('isMousUp on isLayerChanged'); | |
4012 | + | |
4013 | + //$scope.layerNumber = parseInt($('#txtlayerNumber').val()); | |
3853 | 4014 | |
3854 | 4015 | } |
3855 | 4016 | else { |
... | ... | @@ -3859,24 +4020,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3859 | 4020 | //$scope.layerNumber = tranparencyLayer; |
3860 | 4021 | |
3861 | 4022 | var tranparencyLayer; |
3862 | - var currentLayer = parseInt($('#txtlayerNumber').val()); | |
3863 | - if (currentLayer == $rootScope.totalLayers) { | |
3864 | - | |
3865 | - tranparencyLayer = currentLayer; | |
3866 | - | |
3867 | - } | |
3868 | 4023 | |
3869 | - else | |
3870 | - { | |
3871 | - | |
4024 | + //var currentLayer = parseInt($('#txtlayerNumber').val()); | |
4025 | + var currentLayer = $scope.layerNumberBeforeTrans; | |
4026 | + | |
4027 | + if (currentLayer == $rootScope.totalLayers) { | |
4028 | + | |
4029 | + tranparencyLayer = currentLayer; | |
4030 | + | |
4031 | + } | |
4032 | + | |
4033 | + else { | |
4034 | + | |
3872 | 4035 | tranparencyLayer = currentLayer + 1; |
3873 | - | |
3874 | - } | |
3875 | - | |
3876 | - $scope.layerNumber = tranparencyLayer; | |
4036 | + | |
4037 | + } | |
4038 | + | |
4039 | + $scope.layerNumber = tranparencyLayer; | |
3877 | 4040 | |
3878 | 4041 | } |
3879 | - | |
4042 | + | |
3880 | 4043 | $('#txtlayerNumber').val($scope.layerNumber); |
3881 | 4044 | |
3882 | 4045 | //dedebugger; |
... | ... | @@ -4345,7 +4508,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4345 | 4508 | $scope.annotationTextArrayT2 = []; |
4346 | 4509 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
4347 | 4510 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
4348 | - | |
4511 | + | |
4349 | 4512 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
4350 | 4513 | } |
4351 | 4514 | tempMaskImg.src = "http://localhost/AIAHtml/" + tranparencyMaskImgSrc; |
... | ... | @@ -4383,6 +4546,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4383 | 4546 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
4384 | 4547 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
4385 | 4548 | |
4549 | + | |
4386 | 4550 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
4387 | 4551 | } |
4388 | 4552 | else |
... | ... | @@ -4394,6 +4558,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4394 | 4558 | $scope.annotationTextArrayT1.push(annotations.annotationT1); |
4395 | 4559 | $scope.annotationTextArrayT2.push(annotations.annotationT2); |
4396 | 4560 | |
4561 | + | |
4397 | 4562 | $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false); |
4398 | 4563 | |
4399 | 4564 | |
... | ... | @@ -4552,15 +4717,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4552 | 4717 | |
4553 | 4718 | $scope.CloseTransparencyBox = function () { |
4554 | 4719 | |
4720 | + | |
4555 | 4721 | //To enable extract button |
4556 | - $scope.isTransparencyActivated = false; | |
4722 | + $scope.isTransparencyActivated = false; | |
4557 | 4723 | $("#btnExtract").removeClass("disabled"); |
4558 | 4724 | |
4559 | - $('.com_anno').css('display', 'none'); | |
4725 | + //$('.com_anno').css('display', 'none'); | |
4726 | + | |
4727 | + //$('#sppeachBubble_annotation').css('display', 'none'); | |
4728 | + //$('#dot_annotation').css('display', 'none'); | |
4729 | + //$('#bord_annotation').css('display', 'none'); | |
4730 | + | |
4560 | 4731 | |
4561 | - $('#sppeachBubble_annotation').css('display', 'none'); | |
4562 | - $('#dot_annotation').css('display', 'none'); | |
4563 | - $('#bord_annotation').css('display', 'none'); | |
4732 | + $('.com_anno').remove(); | |
4733 | + | |
4734 | + $('#sppeachBubble_annotation').remove(); | |
4735 | + $('#dot_annotation').remove(); | |
4736 | + $('#bord_annotation').remove(); | |
4564 | 4737 | |
4565 | 4738 | var tBox = document.getElementById('transparencyCanvas'); |
4566 | 4739 | |
... | ... | @@ -4590,7 +4763,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4590 | 4763 | //var scope = angular.element(document.getElementById("DAView")).scope(); |
4591 | 4764 | //scope.$apply(function () { |
4592 | 4765 | // $scope.layerNumber = 0; |
4593 | - $scope.isTransparencyActivated = false; | |
4766 | + // $scope.isTransparencyActivated = false; | |
4594 | 4767 | //}) |
4595 | 4768 | |
4596 | 4769 | |
... | ... | @@ -4609,7 +4782,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4609 | 4782 | } |
4610 | 4783 | $('#transparencyScale').css('visibility', 'hidden'); |
4611 | 4784 | |
4612 | - $scope.isTransparencyActivated = false; | |
4785 | + //$scope.isTransparencyActivated = false; | |
4613 | 4786 | // document.getElementById('btnTranparency').className = 't-transparency' |
4614 | 4787 | $('#btnTranparency').removeClass('tButtonActive'); |
4615 | 4788 | $('#btnTranparency').addClass('btn-black'); |
... | ... | @@ -4664,18 +4837,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4664 | 4837 | }; |
4665 | 4838 | |
4666 | 4839 | |
4667 | - $scope.OnIdentityClick = function () { | |
4840 | + $scope.IdentityClick = function () { | |
4668 | 4841 | |
4669 | 4842 | |
4670 | 4843 | //if listanager is visisble then close it |
4671 | - | |
4844 | + | |
4672 | 4845 | $rootScope.isListManagerSelected = false; |
4673 | 4846 | $rootScope.CloseListManager(); |
4674 | 4847 | // $('#btnIdentity').addClass('btn-primary'); |
4675 | 4848 | |
4676 | - if ($scope.isTransparencyActivated == true) { | |
4849 | + if ($scope.isTransparencyActivated == true) { | |
4677 | 4850 | |
4678 | - $scope.isTransparencyActivated = false; | |
4851 | + $scope.isTransparencyActivated = false; | |
4679 | 4852 | |
4680 | 4853 | var canvasDiv = document.getElementById('canvasDiv'); |
4681 | 4854 | canvasDiv.removeEventListener("mousedown", mouseDownListener); |
... | ... | @@ -4716,7 +4889,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4716 | 4889 | |
4717 | 4890 | $rootScope.isZoomed = true; |
4718 | 4891 | //1. |
4719 | - | |
4892 | + | |
4720 | 4893 | $scope.flushCanvas(); |
4721 | 4894 | |
4722 | 4895 | if ($scope.zoomInOut == 25) { |
... | ... | @@ -4731,10 +4904,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4731 | 4904 | $scope.CalculateImageCordinates($rootScope.viewOrientationId); |
4732 | 4905 | |
4733 | 4906 | //3. |
4734 | - if ($scope.zoomInOut == 25) | |
4735 | - $('#canvasDiv').scrollLeft(0) | |
4736 | - else | |
4737 | - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) | |
4907 | + if ($scope.zoomInOut == 25) { | |
4908 | + if ($('#canvasDiv') != null) | |
4909 | + $('#canvasDiv').scrollLeft(0) | |
4910 | + } | |
4911 | + else { | |
4912 | + if ($('#canvasDiv') != null) | |
4913 | + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) | |
4914 | + } | |
4738 | 4915 | |
4739 | 4916 | //remove annotation speech bubble |
4740 | 4917 | if ($('#dot').length > 0) { |
... | ... | @@ -4755,48 +4932,107 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4755 | 4932 | |
4756 | 4933 | $scope.flushCanvas = function () { |
4757 | 4934 | |
4758 | - if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
4759 | - angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
4935 | + //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
4936 | + // angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
4760 | 4937 | |
4761 | - var id; | |
4762 | - var maskId; | |
4763 | - if (value.haveMirror == 'true') { | |
4764 | - id = 'imageCanvas' + value.bodyRegionId + '_MR'; | |
4765 | - maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' | |
4766 | - } | |
4767 | - else { | |
4768 | - id = 'imageCanvas' + value.bodyRegionId; | |
4769 | - maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; | |
4770 | - } | |
4938 | + // var id; | |
4939 | + // var maskId; | |
4940 | + // if (value.haveMirror == 'true') { | |
4941 | + // id = 'imageCanvas' + value.bodyRegionId + '_MR'; | |
4942 | + // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' | |
4943 | + // } | |
4944 | + // else { | |
4945 | + // id = 'imageCanvas' + value.bodyRegionId; | |
4946 | + // maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; | |
4947 | + // } | |
4771 | 4948 | |
4772 | - var canvas = document.getElementById(id); | |
4773 | - if (canvas != null || canvas != undefined) { | |
4774 | - document.getElementById('canvasDiv').removeChild(canvas); | |
4775 | - } | |
4949 | + // var canvas = document.getElementById(id); | |
4950 | + // if (canvas != null || canvas != undefined) { | |
4951 | + // document.getElementById('canvasDiv').removeChild(canvas); | |
4952 | + // } | |
4776 | 4953 | |
4777 | - var maskcanvas = document.getElementById(maskId); | |
4778 | - if (maskcanvas != null || maskcanvas != undefined) { | |
4779 | - document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4954 | + // var maskcanvas = document.getElementById(maskId); | |
4955 | + // if (maskcanvas != null || maskcanvas != undefined) { | |
4956 | + // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4780 | 4957 | |
4781 | - } | |
4782 | - if (i == 4 || i == 5 || i == 6) { | |
4783 | - id = 'imageCanvas' + i + '_MR'; | |
4784 | - maskId = 'imageCanvas' + i + '_MR_mci'; | |
4958 | + // } | |
4959 | + // if (i == 4 || i == 5 || i == 6) { | |
4960 | + // id = 'imageCanvas' + i + '_MR'; | |
4961 | + // maskId = 'imageCanvas' + i + '_MR_mci'; | |
4962 | + | |
4963 | + // var canvas = document.getElementById(id); | |
4964 | + // if (canvas != null || canvas != undefined) | |
4965 | + // document.getElementById('canvasDiv').removeChild(canvas); | |
4966 | + | |
4967 | + // var maskcanvas = document.getElementById(maskId); | |
4968 | + // if (maskcanvas != null || maskcanvas != undefined) | |
4969 | + // document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4970 | + // } | |
4971 | + | |
4972 | + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4973 | + // for (var i = 0; i < modestyCanvases.length; i++) { | |
4974 | + // modestyCanvases[i].remove(); | |
4975 | + // } | |
4976 | + // }); | |
4977 | + // //remove modesty canavs | |
4978 | + // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4979 | + // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { | |
4980 | + // for (var j = 0; j < modestyCanvases.length; j++) { | |
4981 | + // modestyCanvases[j].remove(); | |
4982 | + // } | |
4983 | + // } | |
4984 | + //} | |
4985 | + var endIndex = 0; | |
4986 | + var startIndex = 0; | |
4987 | + if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) { | |
4988 | + endIndex = 6; | |
4989 | + startIndex = 1; | |
4990 | + } | |
4991 | + else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) { | |
4992 | + endIndex = 5; | |
4993 | + startIndex = 1; | |
4994 | + } | |
4995 | + else if (($rootScope.viewOrientationId == '5')) { | |
4996 | + endIndex = 6; | |
4997 | + startIndex = 2; | |
4998 | + } | |
4999 | + else if (($rootScope.viewOrientationId == '6')) { | |
5000 | + endIndex = 6; | |
5001 | + startIndex = 6; | |
5002 | + } | |
4785 | 5003 | |
4786 | - var canvas = document.getElementById(id); | |
4787 | - if (canvas != null || canvas != undefined) | |
4788 | - document.getElementById('canvasDiv').removeChild(canvas); | |
5004 | + for (var i = startIndex; i <= endIndex; i++) { | |
4789 | 5005 | |
4790 | - var maskcanvas = document.getElementById(maskId); | |
4791 | - if (maskcanvas != null || maskcanvas != undefined) | |
4792 | - document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4793 | - } | |
5006 | + var id; | |
5007 | + var maskId; | |
5008 | + | |
5009 | + id = 'imageCanvas' + i; | |
5010 | + maskId = 'imageCanvas' + i + '_mci'; | |
4794 | 5011 | |
4795 | - var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); | |
4796 | - for (var i = 0; i < modestyCanvases.length; i++) { | |
4797 | - modestyCanvases[i].remove(); | |
5012 | + var canvas = document.getElementById(id); | |
5013 | + if (canvas != null || canvas != undefined) | |
5014 | + document.getElementById('canvasDiv').removeChild(canvas); | |
5015 | + | |
5016 | + var maskcanvas = document.getElementById(maskId); | |
5017 | + if (maskcanvas != null || maskcanvas != undefined) | |
5018 | + document.getElementById('canvasDiv').removeChild(maskcanvas); | |
5019 | + | |
5020 | + if (endIndex == 6) { | |
5021 | + | |
5022 | + if (i == 4 || i == 5 || i == 6) { | |
5023 | + id = 'imageCanvas' + i + '_MR'; | |
5024 | + maskId = 'imageCanvas' + i + '_MR_mci'; | |
5025 | + | |
5026 | + var canvas = document.getElementById(id); | |
5027 | + if (canvas != null || canvas != undefined) | |
5028 | + document.getElementById('canvasDiv').removeChild(canvas); | |
5029 | + | |
5030 | + var maskcanvas = document.getElementById(maskId); | |
5031 | + if (maskcanvas != null || maskcanvas != undefined) | |
5032 | + document.getElementById('canvasDiv').removeChild(maskcanvas); | |
4798 | 5033 | } |
4799 | - }); | |
5034 | + } | |
5035 | + | |
4800 | 5036 | //remove modesty canavs |
4801 | 5037 | var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); |
4802 | 5038 | if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { |
... | ... | @@ -4806,9 +5042,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4806 | 5042 | } |
4807 | 5043 | } |
4808 | 5044 | |
4809 | - | |
4810 | - } | |
4811 | 5045 | |
5046 | + } | |
4812 | 5047 | $scope.terminateCurrentlyRunningWPs = function () { |
4813 | 5048 | if ($scope.runningWorkers != null || $scope.runningWorkers != undefined) { |
4814 | 5049 | var workerCount = $scope.runningWorkers.length; |
... | ... | @@ -4826,11 +5061,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4826 | 5061 | |
4827 | 5062 | $scope.enableHighlight = function () { |
4828 | 5063 | |
4829 | - | |
5064 | + | |
4830 | 5065 | // $("#btnExtract").removeClass("disabled"); |
4831 | - $("#btnTranparency").removeClass("disabled"); | |
4832 | - // $rootScope.isTransparencyBoxActivated = false; | |
4833 | - // $rootScope.isNormalMode = false; | |
5066 | + $("#btnTranparency").removeClass("disabled"); | |
5067 | + // $rootScope.isTransparencyBoxActivated = false; | |
5068 | + // $rootScope.isNormalMode = false; | |
4834 | 5069 | |
4835 | 5070 | //if listanager is visisble then close it |
4836 | 5071 | |
... | ... | @@ -4840,7 +5075,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4840 | 5075 | $rootScope.isHighlightBodyByBodySystem = false; |
4841 | 5076 | |
4842 | 5077 | if ($rootScope.isHighLight == true) { |
4843 | - | |
5078 | + | |
4844 | 5079 | } |
4845 | 5080 | else { |
4846 | 5081 | $rootScope.isHighLight = true; |
... | ... | @@ -4891,6 +5126,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4891 | 5126 | $("#btnNormalMode").removeClass("btn-primary"); |
4892 | 5127 | } |
4893 | 5128 | |
5129 | + //7900 | |
5130 | + $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition); | |
5131 | + $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition); | |
5132 | + | |
5133 | + | |
4894 | 5134 | } |
4895 | 5135 | |
4896 | 5136 | $scope.enableNormalMode = function () { |
... | ... | @@ -4898,17 +5138,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4898 | 5138 | $rootScope.isNormalMode = false; |
4899 | 5139 | console.log('enableNormalMode is called'); |
4900 | 5140 | |
4901 | - | |
5141 | + | |
4902 | 5142 | // $rootScope.isHighLight = false; |
4903 | 5143 | |
4904 | 5144 | //to do should not call every time |
4905 | 5145 | $rootScope.CloseListManager(); |
4906 | - | |
5146 | + | |
4907 | 5147 | |
4908 | 5148 | $rootScope.isHighlightBodyByBodySystem = false; |
4909 | 5149 | |
4910 | 5150 | |
4911 | 5151 | if ($rootScope.isNormalMode == true) { |
5152 | + | |
5153 | + | |
5154 | + | |
5155 | + | |
4912 | 5156 | |
4913 | 5157 | } |
4914 | 5158 | else { |
... | ... | @@ -4932,11 +5176,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4932 | 5176 | $rootScope.isListManagerSelected = false; |
4933 | 5177 | |
4934 | 5178 | //7. |
4935 | - $scope.CalculateImageCordinates($rootScope.viewOrientationId); | |
4936 | 5179 | |
5180 | + $scope.layerNumber = $('#txtlayerNumber').val(); | |
5181 | + $scope.CalculateImageCordinates($rootScope.viewOrientationId); | |
5182 | + // alert($rootScope.viewOrientationId + "gadash") | |
5183 | + | |
5184 | + | |
4937 | 5185 | $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition); |
4938 | 5186 | $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition); |
4939 | - | |
5187 | + | |
4940 | 5188 | |
4941 | 5189 | } |
4942 | 5190 | |
... | ... | @@ -4963,7 +5211,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4963 | 5211 | } |
4964 | 5212 | } |
4965 | 5213 | |
4966 | - $scope.enableExtract = function () { | |
5214 | + // #7972 Mozilla Firefox> Incorrect navigation | |
5215 | + $("#canvasDiv").scroll(function (event) { | |
5216 | + $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop(); | |
5217 | + $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); | |
5218 | + | |
5219 | + }); | |
5220 | + | |
5221 | + | |
5222 | + | |
5223 | + $scope.enableExtract = function (isCalledFromButton) { | |
5224 | + | |
5225 | + console.log('isCalledFromButton= ' + isCalledFromButton); | |
4967 | 5226 | |
4968 | 5227 | $rootScope.isHighlightBodyByBodySystem = false; |
4969 | 5228 | |
... | ... | @@ -4971,10 +5230,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4971 | 5230 | $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop(); |
4972 | 5231 | |
4973 | 5232 | $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); |
4974 | - | |
4975 | 5233 | |
4976 | 5234 | |
4977 | - if ($scope.isTransparencyActivated == true) { | |
5235 | + | |
5236 | + if ($scope.isTransparencyActivated == true) { | |
4978 | 5237 | |
4979 | 5238 | $("#btnExtract").addClass("disabled"); |
4980 | 5239 | |
... | ... | @@ -4983,42 +5242,70 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4983 | 5242 | |
4984 | 5243 | else { |
4985 | 5244 | |
4986 | - | |
5245 | + | |
4987 | 5246 | $rootScope.CloseListManager(); |
4988 | 5247 | //1. |
4989 | - $rootScope.isLoading = true; | |
4990 | - $('#spinner').css('visibility', 'visible'); | |
5248 | + //$rootScope.isLoading = true; | |
5249 | + //$('#spinner').css('visibility', 'visible'); | |
4991 | 5250 | |
4992 | 5251 | //2. |
4993 | 5252 | $scope.terminateCurrentlyRunningWPs(); |
4994 | 5253 | |
4995 | - //3. | |
4996 | - if ($rootScope.isExtract == true) { | |
5254 | + //3. | |
5255 | + //if extarct is alraedy enabled and user cliked on any body part then extract that. | |
5256 | + if (isCalledFromButton == false) { | |
4997 | 5257 | |
4998 | - } | |
4999 | - else { | |
5000 | - $rootScope.isExtract = true; | |
5001 | - //disable transparency button | |
5002 | - | |
5003 | - $("#btnTranparency").addClass("disabled"); | |
5258 | + $rootScope.isExtract = true; | |
5259 | + //disable transparency button | |
5260 | + | |
5261 | + $("#btnTranparency").addClass("disabled"); | |
5262 | + | |
5263 | + | |
5264 | + if ($rootScope.isNormalMode == true) { | |
5004 | 5265 | |
5266 | + $rootScope.isHighLight = false; | |
5267 | + $rootScope.isNormalMode = false; | |
5268 | + } | |
5269 | + else { | |
5270 | + | |
5271 | + $rootScope.isHighLight = false; | |
5272 | + } | |
5005 | 5273 | |
5006 | - if ($rootScope.isNormalMode == true) { | |
5274 | + //4. | |
5275 | + console.log('highLightBody from enableExtract') | |
5276 | + $scope.highLightBody(); | |
5007 | 5277 | |
5008 | - $rootScope.isHighLight = false; | |
5009 | - $rootScope.isNormalMode = false; | |
5010 | 5278 | } |
5011 | 5279 | else { |
5012 | - $rootScope.isNormalMode = false; | |
5013 | - $rootScope.isHighLight = false; | |
5014 | - } | |
5015 | 5280 | |
5016 | - //4. | |
5017 | - console.log('highLightBody from enableExtract') | |
5018 | - $scope.highLightBody(); | |
5281 | + if ($rootScope.isExtract == true) { | |
5282 | + | |
5283 | + } | |
5284 | + else { | |
5285 | + $rootScope.isExtract = true; | |
5286 | + //disable transparency button | |
5287 | + | |
5288 | + $("#btnTranparency").addClass("disabled"); | |
5019 | 5289 | |
5020 | 5290 | |
5021 | - } | |
5291 | + if ($rootScope.isNormalMode == true) { | |
5292 | + | |
5293 | + $rootScope.isHighLight = false; | |
5294 | + $rootScope.isNormalMode = false; | |
5295 | + } | |
5296 | + else { | |
5297 | + | |
5298 | + $rootScope.isHighLight = false; | |
5299 | + } | |
5300 | + | |
5301 | + //4. | |
5302 | + console.log('highLightBody from enableExtract') | |
5303 | + $scope.highLightBody(); | |
5304 | + | |
5305 | + | |
5306 | + } | |
5307 | + } | |
5308 | + | |
5022 | 5309 | |
5023 | 5310 | //5. unhighlight other |
5024 | 5311 | //$scope.Normal = ""; |
... | ... | @@ -5056,7 +5343,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5056 | 5343 | |
5057 | 5344 | $(".com").toggle(); |
5058 | 5345 | $('#dot').toggle(); |
5346 | + $('#bord').toggle(); | |
5059 | 5347 | $('#sppeachBubble').toggle(); |
5348 | + $('#sppeachBubble_annotation').toggle(); | |
5349 | + | |
5350 | + $("#bord_annotation").toggle(); | |
5351 | + $("#dot_annotation").toggle(); | |
5352 | + $(".dynCross_anno").parent().parent().parent().toggle(); | |
5060 | 5353 | |
5061 | 5354 | } |
5062 | 5355 | |
... | ... | @@ -5064,9 +5357,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5064 | 5357 | |
5065 | 5358 | $scope.highLightBody = function () { |
5066 | 5359 | |
5067 | - $rootScope.isLoading = true; | |
5068 | - $('#spinner').css('visibility', 'visible'); | |
5069 | - | |
5070 | 5360 | |
5071 | 5361 | $scope.Normal = ""; |
5072 | 5362 | $scope.Extract = ""; |
... | ... | @@ -5121,15 +5411,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5121 | 5411 | var coloredImageDataVar = coloredImageData; |
5122 | 5412 | |
5123 | 5413 | |
5124 | - if (value.haveMirror == 'true') { | |
5125 | - $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5126 | - } | |
5127 | - else { | |
5414 | + //if (value.haveMirror == 'true') { | |
5415 | + // $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5416 | + //} | |
5417 | + //else { | |
5128 | 5418 | |
5129 | 5419 | |
5130 | - $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5420 | + // $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5131 | 5421 | |
5132 | - } | |
5422 | + //} | |
5133 | 5423 | |
5134 | 5424 | |
5135 | 5425 | var context_gray = imageCanvas.getContext('2d'); |
... | ... | @@ -5151,194 +5441,161 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5151 | 5441 | var colorMode; |
5152 | 5442 | |
5153 | 5443 | if ($scope.isExtract == true) { |
5154 | - colorMode = $scope.applyWhiteMatrix(img, context_gray); | |
5444 | + | |
5445 | + if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true) { | |
5446 | + | |
5447 | + colorMode = $scope.applyWhiteMatrix(img, context_gray); | |
5448 | + } | |
5155 | 5449 | } |
5156 | 5450 | else { |
5157 | 5451 | colorMode = $scope.applyGrayMatrix(img, context_gray); |
5158 | 5452 | } |
5159 | 5453 | |
5160 | - var zeroPoint = new Point(); | |
5454 | + console.log('colorMode inside if = ' + colorMode); | |
5161 | 5455 | |
5162 | - DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); | |
5163 | 5456 | |
5457 | + if (colorMode != undefined || colorMode != null) { | |
5164 | 5458 | |
5165 | - context_gray.putImageData(DAData.data, 0, 0) | |
5459 | + $rootScope.isLoading = true; | |
5460 | + $('#spinner').css('visibility', 'visible'); | |
5166 | 5461 | |
5167 | - //NIKI- to resolve lateral arm black issue in highlight mode | |
5168 | 5462 | |
5169 | - if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) { | |
5463 | + var zeroPoint = new Point(); | |
5170 | 5464 | |
5171 | - var imgData = context_gray.getImageData(0, 0, width, ht); | |
5172 | - var data = imgData.data; | |
5173 | - var c = 0; | |
5174 | - for (var i = 0; i < data.length; i += 4) { | |
5175 | - if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
5176 | - data[i + 3] = 0; | |
5177 | - } | |
5465 | + DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); | |
5178 | 5466 | |
5179 | - } | |
5180 | - context_gray.putImageData(imgData, 0, 0); | |
5181 | - } | |
5182 | 5467 | |
5183 | - //push BRID into array | |
5184 | - $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); | |
5468 | + context_gray.putImageData(DAData.data, 0, 0) | |
5185 | 5469 | |
5186 | - var grayImageData = context_gray.getImageData(0, 0, width, ht); | |
5187 | - var grayImageImageDataVar = grayImageData.data; | |
5470 | + //NIKI- to resolve lateral arm black issue in highlight mode | |
5188 | 5471 | |
5189 | - if ($scope.isExtract == true) { | |
5190 | - if (value.haveMirror == 'true') { | |
5191 | - $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5192 | - } | |
5193 | - else { | |
5472 | + if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) { | |
5194 | 5473 | |
5195 | - $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5196 | - } | |
5197 | - } | |
5198 | - else { | |
5474 | + var imgData = context_gray.getImageData(0, 0, width, ht); | |
5475 | + var data = imgData.data; | |
5476 | + var c = 0; | |
5477 | + for (var i = 0; i < data.length; i += 4) { | |
5478 | + if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
5479 | + data[i + 3] = 0; | |
5480 | + } | |
5199 | 5481 | |
5200 | - if (value.haveMirror == 'true') { | |
5201 | - $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5482 | + } | |
5483 | + context_gray.putImageData(imgData, 0, 0); | |
5202 | 5484 | } |
5203 | - else { | |
5204 | 5485 | |
5205 | - $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5206 | - } | |
5207 | - } | |
5486 | + imageCanvas.style.visibility = 'visible'; | |
5487 | + //push BRID into array | |
5488 | + $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); | |
5208 | 5489 | |
5490 | + var grayImageData = context_gray.getImageData(0, 0, width, ht); | |
5491 | + var grayImageImageDataVar = grayImageData.data; | |
5209 | 5492 | |
5210 | - if ($scope.grayedBR != null || $scope.grayedBR != undefined) { | |
5211 | - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) { | |
5212 | - $scope.isEligibleForHighlightBodyByTermList = true; | |
5213 | - $scope.doHighlightOrExtract = false; | |
5214 | - } | |
5215 | - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) { | |
5216 | - $scope.isEligibleForHighlightBodyByTermList = true; | |
5217 | - $scope.doHighlightOrExtract = false; | |
5218 | - } | |
5219 | - else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) { | |
5220 | - $scope.isEligibleForHighlightBodyByTermList = true; | |
5221 | - $scope.doHighlightOrExtract = false; | |
5222 | - } | |
5223 | - else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) { | |
5224 | - $scope.isEligibleForHighlightBodyByTermList = true; | |
5225 | - $scope.doHighlightOrExtract = false; | |
5493 | + if ($scope.isExtract == true) { | |
5494 | + if (value.haveMirror == 'true') { | |
5495 | + $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5496 | + } | |
5497 | + else { | |
5498 | + | |
5499 | + $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5500 | + } | |
5226 | 5501 | } |
5227 | 5502 | else { |
5228 | 5503 | |
5229 | - $scope.isEligibleForHighlightBodyByTermList = false; | |
5504 | + if (value.haveMirror == 'true') { | |
5505 | + $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5506 | + } | |
5507 | + else { | |
5508 | + | |
5509 | + $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5510 | + } | |
5230 | 5511 | } |
5231 | 5512 | |
5232 | - if ($scope.isEligibleForHighlightBodyByTermList == true) { | |
5233 | - //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE | |
5234 | - // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) { | |
5235 | - $scope.isLoading = false; | |
5236 | 5513 | |
5237 | - $('#spinner').css('visibility', 'hidden'); | |
5238 | - //} | |
5514 | + if ($scope.grayedBR != null || $scope.grayedBR != undefined) { | |
5515 | + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) { | |
5516 | + $scope.isEligibleForHighlightBodyByTermList = true; | |
5517 | + $scope.doHighlightOrExtract = false; | |
5518 | + } | |
5519 | + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) { | |
5520 | + $scope.isEligibleForHighlightBodyByTermList = true; | |
5521 | + $scope.doHighlightOrExtract = false; | |
5522 | + } | |
5523 | + else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) { | |
5524 | + $scope.isEligibleForHighlightBodyByTermList = true; | |
5525 | + $scope.doHighlightOrExtract = false; | |
5526 | + } | |
5527 | + else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) { | |
5528 | + $scope.isEligibleForHighlightBodyByTermList = true; | |
5529 | + $scope.doHighlightOrExtract = false; | |
5530 | + } | |
5531 | + else { | |
5239 | 5532 | |
5240 | - | |
5241 | - if (( $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
5533 | + $scope.isEligibleForHighlightBodyByTermList = false; | |
5534 | + } | |
5242 | 5535 | |
5536 | + if ($scope.isEligibleForHighlightBodyByTermList == true) { | |
5537 | + //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE | |
5538 | + // if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) { | |
5539 | + $scope.isLoading = false; | |
5243 | 5540 | |
5244 | - $scope.isLoading = true; | |
5541 | + $('#spinner').css('visibility', 'hidden'); | |
5542 | + //} | |
5245 | 5543 | |
5246 | - $('#spinner').css('visibility', 'visible'); | |
5247 | - $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100); | |
5248 | - } | |
5249 | - else if ($rootScope.isListManagerSelected == true) { | |
5544 | + if (($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
5250 | 5545 | |
5251 | - // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length); | |
5252 | - $timeout(function () { | |
5253 | 5546 | |
5254 | 5547 | $scope.isLoading = true; |
5548 | + | |
5255 | 5549 | $('#spinner').css('visibility', 'visible'); |
5550 | + $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100); | |
5551 | + } | |
5552 | + else if ($rootScope.isListManagerSelected == true) { | |
5256 | 5553 | |
5257 | - $scope.HighlightBodyByTermList($scope.AllTerms) | |
5258 | - }, 800); | |
5554 | + // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length); | |
5555 | + $timeout(function () { | |
5556 | + | |
5557 | + $scope.isLoading = true; | |
5558 | + $('#spinner').css('visibility', 'visible'); | |
5559 | + | |
5560 | + $scope.HighlightBodyByTermList($scope.AllTerms) | |
5561 | + }, 800); | |
5562 | + | |
5563 | + } | |
5564 | + else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | |
5565 | + $scope.createTermListByPreviousTermsAndHighlight(); | |
5566 | + } | |
5259 | 5567 | |
5260 | - } | |
5261 | - else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | |
5262 | - $scope.createTermListByPreviousTermsAndHighlight(); | |
5263 | 5568 | } |
5264 | 5569 | |
5265 | 5570 | } |
5266 | 5571 | |
5267 | 5572 | } |
5268 | 5573 | |
5269 | - } | |
5270 | - | |
5271 | - $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50); | |
5574 | + // $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50); | |
5272 | 5575 | |
5576 | + console.log('highlightboy. $rootScope.isExtract= '+$rootScope.isExtract+', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length) | |
5577 | + if ($rootScope.isExtract == true) { | |
5578 | + if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | |
5579 | + console.log('1. $rootScope.isExtract=true and $rootScope.previousHighlightList != null') | |
5273 | 5580 | |
5274 | - if ($rootScope.isExtract == true) { | |
5275 | - if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | |
5276 | - console.log('1. $rootScope.isExtract=true and $rootScope.previousHighlightList != null') | |
5581 | + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5582 | + } | |
5583 | + else if ($rootScope.isListManagerSelected == true) { | |
5584 | + console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') | |
5277 | 5585 | |
5278 | - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5279 | - } | |
5280 | - else if ($rootScope.isListManagerSelected == true) { | |
5281 | - console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') | |
5586 | + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5282 | 5587 | |
5283 | - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5284 | - | |
5588 | + } | |
5285 | 5589 | } |
5286 | 5590 | } |
5287 | - //else { | |
5288 | - // // this code is for the case where user first clcik on normal mode then extract then again highlight then we need to call highlight body in gray mode | |
5289 | - // //and then highlight the previously selected body regions at the time of normal mode. | |
5290 | - // if ($scope.grayedBR != null || $scope.grayedBR != undefined) { | |
5291 | - // if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) { | |
5292 | - // $scope.isEligibleForHighlightBodyByTermList = true; | |
5293 | - // } | |
5294 | - // else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) { | |
5295 | - // $scope.isEligibleForHighlightBodyByTermList = true; | |
5296 | - // } | |
5297 | - // else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) { | |
5298 | - // $scope.isEligibleForHighlightBodyByTermList = true; | |
5299 | - // } | |
5300 | - // else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) { | |
5301 | - // $scope.isEligibleForHighlightBodyByTermList = true; | |
5302 | - // } | |
5303 | - | |
5304 | - | |
5305 | - // } | |
5306 | - | |
5307 | - // // | |
5308 | - //} | |
5309 | 5591 | }) |
5310 | 5592 | |
5311 | - //if ($scope.isEligibleForHighlightBodyByTermList == true) { | |
5312 | - // if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { | |
5313 | - | |
5314 | - // var multiTermList = []; | |
5315 | - // angular.forEach($rootScope.previousHighlightList, function (value, key) { | |
5316 | - | |
5317 | - // //debugger; | |
5318 | - | |
5319 | - // var ActualTermNo = $scope.getActualTermNumber(value); | |
5320 | - // if (ActualTermNo != null) { | |
5321 | - // var TermList = $scope.getTermNumberList(ActualTermNo); | |
5322 | - // if (TermList != null) { | |
5323 | - // for (var i = 0; i < TermList.length; i++) { | |
5324 | - | |
5325 | - // multiTermList.push(TermList[i]); | |
5326 | - // } | |
5327 | - // } | |
5328 | - // } | |
5329 | - | |
5330 | - // }); | |
5331 | - // console.log('HighlightBodyByTermList call with multiTermList') | |
5332 | - | |
5333 | - // $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80); | |
5334 | - // } | |
5335 | - //} | |
5336 | - | |
5337 | 5593 | } |
5338 | 5594 | |
5339 | 5595 | |
5340 | 5596 | else { |
5341 | 5597 | // This code will execute when user will select normal Mode but this time isHighlight will be false |
5598 | + console.log('highlightboy ELSE. $rootScope.isExtract= ' + $rootScope.isExtract + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length) | |
5342 | 5599 | |
5343 | 5600 | angular.forEach($scope.ColoredImageSRC, function (value, key) { |
5344 | 5601 | var id; |
... | ... | @@ -5362,14 +5619,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5362 | 5619 | var coloredImageDataVar = coloredImageData; |
5363 | 5620 | |
5364 | 5621 | |
5365 | - if (value.haveMirror == 'true') { | |
5366 | - $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5367 | - } | |
5368 | - else { | |
5622 | + //if (value.haveMirror == 'true') { | |
5623 | + // $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
5624 | + //} | |
5625 | + //else { | |
5369 | 5626 | |
5370 | - $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5627 | + // $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
5371 | 5628 | |
5372 | - } | |
5629 | + //} | |
5373 | 5630 | |
5374 | 5631 | |
5375 | 5632 | var context = imageCanvas.getContext('2d'); |
... | ... | @@ -5393,40 +5650,68 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5393 | 5650 | var colorMode; |
5394 | 5651 | |
5395 | 5652 | if ($scope.isExtract == true) { |
5396 | - colorMode = $scope.applyWhiteMatrix(img, context); | |
5653 | + if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true) { | |
5654 | + | |
5655 | + colorMode = $scope.applyWhiteMatrix(img, context); | |
5656 | + } | |
5397 | 5657 | } |
5398 | 5658 | |
5399 | - var zeroPoint = new Point(); | |
5659 | + console.log('colorMode inside else = ' + colorMode); | |
5660 | + if (colorMode != undefined || colorMode != null) { | |
5400 | 5661 | |
5401 | - DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); | |
5662 | + $rootScope.isLoading = true; | |
5663 | + $('#spinner').css('visibility', 'visible'); | |
5402 | 5664 | |
5403 | - context.putImageData(DAData.data, 0, 0) | |
5665 | + var zeroPoint = new Point(); | |
5404 | 5666 | |
5405 | - var grayImageData = context.getImageData(0, 0, width, ht); | |
5406 | - var grayImageImageDataVar = grayImageData.data; | |
5667 | + DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); | |
5407 | 5668 | |
5408 | - if ($scope.isExtract == true) { | |
5409 | - if (value.haveMirror == 'true') { | |
5410 | - $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5411 | - } | |
5412 | - else { | |
5669 | + context.putImageData(DAData.data, 0, 0) | |
5670 | + | |
5671 | + | |
5672 | + //NIKI- to resolve lateral arm black issue in mode | |
5673 | + | |
5674 | + if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 || value.bodyRegionId == 4)) { | |
5413 | 5675 | |
5414 | - $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5676 | + var imgData = context.getImageData(0, 0, width, ht); | |
5677 | + var data = imgData.data; | |
5678 | + var c = 0; | |
5679 | + for (var i = 0; i < data.length; i += 4) { | |
5680 | + if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
5681 | + data[i + 3] = 0; | |
5682 | + } | |
5683 | + | |
5684 | + } | |
5685 | + context.putImageData(imgData, 0, 0); | |
5415 | 5686 | } |
5416 | - } | |
5417 | - else { | |
5418 | 5687 | |
5419 | - if (value.haveMirror == 'true') { | |
5420 | - $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5688 | + imageCanvas.style.visibility = 'visible' | |
5689 | + var grayImageData = context.getImageData(0, 0, width, ht); | |
5690 | + var grayImageImageDataVar = grayImageData.data; | |
5691 | + | |
5692 | + if ($scope.isExtract == true) { | |
5693 | + if (value.haveMirror == 'true') { | |
5694 | + $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5695 | + } | |
5696 | + else { | |
5697 | + | |
5698 | + $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5699 | + } | |
5421 | 5700 | } |
5422 | 5701 | else { |
5423 | 5702 | |
5424 | - $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5703 | + if (value.haveMirror == 'true') { | |
5704 | + $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
5705 | + } | |
5706 | + else { | |
5707 | + | |
5708 | + $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
5709 | + } | |
5425 | 5710 | } |
5426 | 5711 | } |
5427 | - } | |
5428 | 5712 | |
5429 | - $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50); | |
5713 | + // $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50); | |
5714 | + } | |
5430 | 5715 | }) |
5431 | 5716 | |
5432 | 5717 | if ($rootScope.isExtract == true) { |
... | ... | @@ -5442,7 +5727,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5442 | 5727 | else if ($rootScope.isListManagerSelected == true) { |
5443 | 5728 | console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') |
5444 | 5729 | $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); |
5445 | - | |
5730 | + | |
5446 | 5731 | } |
5447 | 5732 | } |
5448 | 5733 | |
... | ... | @@ -5530,14 +5815,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5530 | 5815 | $rootScope.isTransparencyBoxActivated = false; |
5531 | 5816 | $rootScope.isNormalMode = false; |
5532 | 5817 | |
5533 | - //if listanager is visisble then close it | |
5534 | - | |
5535 | - // $rootScope.isListManagerSelected = false; | |
5536 | - $rootScope.CloseListManager(); | |
5818 | + //close transparecny box | |
5819 | + $scope.CloseTransparencyBox(); | |
5537 | 5820 | |
5538 | - $rootScope.isHighlightBodyByBodySystem = false; | |
5821 | + //if listanager is visisble then close it | |
5539 | 5822 | |
5823 | + // $rootScope.isListManagerSelected = false; | |
5824 | + $rootScope.CloseListManager(); | |
5540 | 5825 | |
5826 | + // $rootScope.isHighlightBodyByBodySystem = false; | |
5541 | 5827 | |
5542 | 5828 | $rootScope.isLoading = true; |
5543 | 5829 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -5556,6 +5842,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5556 | 5842 | localStorage.setItem("currentBodyViewId", currentBodyViewId); |
5557 | 5843 | |
5558 | 5844 | //3. |
5845 | + $scope.layerNumber = 0; | |
5559 | 5846 | $scope.loadSelectedBodyView(currentBodyViewId); |
5560 | 5847 | |
5561 | 5848 | //4. |
... | ... | @@ -5583,6 +5870,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5583 | 5870 | localStorage.setItem("currentBodyViewId", currentBodyViewId); |
5584 | 5871 | |
5585 | 5872 | //3. |
5873 | + $scope.layerNumber = 0; | |
5586 | 5874 | $scope.loadSelectedBodyView(currentBodyViewId); |
5587 | 5875 | |
5588 | 5876 | //4. |
... | ... | @@ -5639,7 +5927,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5639 | 5927 | //To fix issue of gray maintained in after closing jspanel after listmanager selection |
5640 | 5928 | $rootScope.isListManagerSelected = false; |
5641 | 5929 | $rootScope.isHighLight = false; |
5642 | - $rootScope.isNormalMode = false; | |
5930 | + //$rootScope.isNormalMode = false; | |
5931 | + $rootScope.isHighlightBodyByBodySystem = false; | |
5643 | 5932 | $rootScope.CloseListManager(); |
5644 | 5933 | }) |
5645 | 5934 | |
... | ... | @@ -5662,6 +5951,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5662 | 5951 | //debugger; |
5663 | 5952 | |
5664 | 5953 | $rootScope.BodyLayerData = result; |
5954 | + | |
5955 | + var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; | |
5956 | + | |
5957 | + //set max for LayerNumber input | |
5958 | + $rootScope.totalLayers = dataLength - 1; | |
5959 | + | |
5960 | + $('#txtLayerNumber').attr('max', $rootScope.totalLayers); | |
5961 | + $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); | |
5962 | + | |
5963 | + //set max for LayerNumber input | |
5964 | + $rootScope.totalLayers = dataLength - 1; | |
5965 | + | |
5665 | 5966 | $scope.isBodylayerdataLoaded = true; |
5666 | 5967 | |
5667 | 5968 | //load json for annotations |
... | ... | @@ -5678,18 +5979,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5678 | 5979 | canDiv.innerHTML = ''; |
5679 | 5980 | } |
5680 | 5981 | //if user seelcted any term and serached before gender cnage then itshould be highlighted in chnaged gender |
5681 | - | |
5982 | + | |
5682 | 5983 | if (($rootScope.isListManagerSelected == true) && (($rootScope.isGenderChnage == true) || $rootScope.isViewChange == true)) { |
5683 | - | |
5684 | - $scope.setLayerNumberAndHighlightByTermList(); | |
5685 | - | |
5686 | - } | |
5687 | - | |
5688 | - else { | |
5689 | - | |
5690 | - $scope.CalculateImageCordinates($rootScope.viewOrientationId); | |
5691 | - | |
5692 | - } | |
5984 | + | |
5985 | + $scope.setLayerNumberAndHighlightByTermList(); | |
5986 | + | |
5987 | + } | |
5988 | + | |
5989 | + else { | |
5990 | + | |
5991 | + $scope.CalculateImageCordinates($rootScope.viewOrientationId); | |
5992 | + | |
5993 | + } | |
5693 | 5994 | |
5694 | 5995 | $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); |
5695 | 5996 | }, |
... | ... | @@ -5709,19 +6010,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5709 | 6010 | |
5710 | 6011 | $scope.OnViewChange = function (event) { |
5711 | 6012 | |
5712 | - | |
6013 | + | |
5713 | 6014 | $("#btnExtract").removeClass("disabled"); |
5714 | 6015 | $("#btnTranparency").removeClass("disabled"); |
5715 | 6016 | $rootScope.isTransparencyBoxActivated = false; |
5716 | 6017 | $rootScope.isNormalMode = false; |
5717 | 6018 | |
6019 | + //close transparency box | |
6020 | + $scope.CloseTransparencyBox(); | |
5718 | 6021 | |
5719 | 6022 | //if listanager is visisble then close it |
5720 | 6023 | |
5721 | 6024 | //$rootScope.isListManagerSelected = false; |
5722 | 6025 | $rootScope.CloseListManager(); |
5723 | 6026 | |
5724 | - $rootScope.isHighlightBodyByBodySystem = false; | |
6027 | + // $rootScope.isHighlightBodyByBodySystem = false; | |
5725 | 6028 | |
5726 | 6029 | |
5727 | 6030 | $rootScope.isLoading = true; |
... | ... | @@ -5880,25 +6183,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5880 | 6183 | $scope.layerNumber = parseInt($('#txtlayerNumber').val()); |
5881 | 6184 | //alert('mouseUp'); |
5882 | 6185 | |
5883 | - | |
6186 | + | |
5884 | 6187 | if ($scope.layerNumber == 0) { |
5885 | 6188 | $scope.loadSelectedBodyView(data.reloadDABodyViewId); |
5886 | 6189 | } |
5887 | - // $scope.loadSelectedBodyView(data.reloadDABodyViewId); | |
6190 | + // $scope.loadSelectedBodyView(data.reloadDABodyViewId); | |
5888 | 6191 | |
5889 | 6192 | $scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId); |
5890 | 6193 | |
5891 | - // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
6194 | + // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | |
5892 | 6195 | |
5893 | 6196 | //$rootScope.isSettingEventAlredayDispachted = false; |
5894 | 6197 | //} |
5895 | 6198 | |
5896 | 6199 | }) |
5897 | 6200 | |
5898 | - | |
5899 | 6201 | |
5900 | - $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { | |
5901 | 6202 | |
6203 | + $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { | |
6204 | + | |
5902 | 6205 | //$rootScope.voId = currentBodyViewId; |
5903 | 6206 | |
5904 | 6207 | //$scope.skinTone = $rootScope.globalSetting.ethnicity; |
... | ... | @@ -5956,7 +6259,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5956 | 6259 | $("#canvas").css("display", "block"); |
5957 | 6260 | $("#canvasPaint").css("display", "block"); |
5958 | 6261 | |
5959 | - $scope.doClick(); | |
6262 | + $scope.BindCanvasDrawingListners(); | |
5960 | 6263 | $rootScope.FreeStylePaint(); |
5961 | 6264 | }); |
5962 | 6265 | $scope.mousePs; |
... | ... | @@ -5972,12 +6275,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5972 | 6275 | $scope.offsetY1 = 0; |
5973 | 6276 | $scope.x = 0; |
5974 | 6277 | $scope.y = 0; |
5975 | - $scope.doClick = function (event) { | |
6278 | + $scope.BindCanvasDrawingListners = function (event) { | |
5976 | 6279 | |
5977 | 6280 | $scope.clicked = true; |
5978 | 6281 | // OnPaintCanvasMouseDown(event); |
5979 | - canvas.addEventListener('mousedown', $scope.OnPaintCanvasMouseDown, false); | |
5980 | - canvas.addEventListener('mouseup', $scope.OnPaintCanvasMouseUp, false); | |
6282 | + | |
6283 | + var annotationCanvas = document.getElementById('canvas'); | |
6284 | + if (annotationCanvas != null || annotationCanvas != undefined) { | |
6285 | + annotationCanvas.addEventListener('mousedown', $scope.OnPaintCanvasMouseDown, false); | |
6286 | + annotationCanvas.addEventListener('mouseup', $scope.OnPaintCanvasMouseUp, false); | |
6287 | + } | |
5981 | 6288 | // alert("doclick"); |
5982 | 6289 | }; |
5983 | 6290 | |
... | ... | @@ -6017,6 +6324,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6017 | 6324 | $rootScope.resetText = 0; |
6018 | 6325 | $rootScope.resetTextSave = 0; |
6019 | 6326 | $rootScope.ObjectIndexSave = 0; |
6327 | + | |
6020 | 6328 | var arrayRect = {}; |
6021 | 6329 | |
6022 | 6330 | |
... | ... | @@ -6064,7 +6372,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6064 | 6372 | break; |
6065 | 6373 | |
6066 | 6374 | case "Line": |
6067 | - | |
6375 | + | |
6068 | 6376 | $rootScope.resetLine = $rootScope.ObjectIndex++; |
6069 | 6377 | $('#canvas').addLayer({ |
6070 | 6378 | name: 'Line_' + $rootScope.resetLine, |
... | ... | @@ -6076,7 +6384,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6076 | 6384 | rounded: true, |
6077 | 6385 | x1: $scope.offsetX1, y1: $scope.offsetY1, |
6078 | 6386 | x2: $scope.x, y2: $scope.y, |
6079 | - | |
6387 | + | |
6080 | 6388 | click: function (layer) { |
6081 | 6389 | $rootScope.canvasLayerNameCollection = []; |
6082 | 6390 | $rootScope.canvasLayerNameCollection.push(layer.name); |
... | ... | @@ -6145,10 +6453,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6145 | 6453 | |
6146 | 6454 | resizeFromCenter: false, |
6147 | 6455 | |
6148 | - dblclick: function () { | |
6149 | - $rootScope.backOpacity(); | |
6150 | - | |
6151 | - }, | |
6456 | + dblclick: function () { | |
6457 | + $rootScope.backOpacity(); | |
6458 | + | |
6459 | + }, | |
6152 | 6460 | |
6153 | 6461 | click: function (layer) { |
6154 | 6462 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -6225,7 +6533,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6225 | 6533 | |
6226 | 6534 | |
6227 | 6535 | click: function (layer) { |
6228 | - // alert(layer.name); | |
6536 | + | |
6229 | 6537 | $rootScope.canvasLayerNameCollection = []; |
6230 | 6538 | $rootScope.canvasLayerNameCollection.push(layer.name); |
6231 | 6539 | $('#canvas').setLayer(layer.name, { |
... | ... | @@ -6241,7 +6549,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6241 | 6549 | }, |
6242 | 6550 | mouseout: function (layer) { |
6243 | 6551 | $rootScope.canvasLayerNameCollection = []; |
6244 | - | |
6552 | + | |
6245 | 6553 | $('#canvas').setLayer(layer.name, { |
6246 | 6554 | handle: { |
6247 | 6555 | type: 'arc', |
... | ... | @@ -6368,7 +6676,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6368 | 6676 | x2: $scope.x, y2: $scope.y, |
6369 | 6677 | |
6370 | 6678 | click: function (layer) { |
6371 | - | |
6679 | + | |
6372 | 6680 | $rootScope.shapeTypePin = "Pin"; |
6373 | 6681 | $rootScope.canvasLayerNameCollection = []; |
6374 | 6682 | var pinLine_layer = layer.name; |
... | ... | @@ -6392,7 +6700,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6392 | 6700 | |
6393 | 6701 | }, |
6394 | 6702 | mouseout: function (layer) { |
6395 | - | |
6703 | + | |
6396 | 6704 | $rootScope.canvasLayerNameCollection = []; |
6397 | 6705 | $('#canvas').setLayer(layer.name, { |
6398 | 6706 | handle: { |
... | ... | @@ -6455,8 +6763,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6455 | 6763 | $('.btnCursor').addClass('activebtncolor'); |
6456 | 6764 | break; |
6457 | 6765 | case "TextArea": |
6458 | - $rootScope.IsTextAlreadySave = false; | |
6459 | - $("#text_area").val(''); | |
6766 | + $rootScope.IsTextAlreadySave = false; | |
6767 | + $("#text_area").val(''); | |
6460 | 6768 | // Draw text |
6461 | 6769 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; |
6462 | 6770 | $rootScope.resetText = $rootScope.ObjectIndex++; |
... | ... | @@ -6474,7 +6782,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6474 | 6782 | align: "left", |
6475 | 6783 | fontFamily: 'Verdana, sans-serif', |
6476 | 6784 | text: '' |
6477 | - | |
6785 | + | |
6478 | 6786 | }) |
6479 | 6787 | // Draw rect as wide as the text |
6480 | 6788 | .drawRect({ |
... | ... | @@ -6488,6 +6796,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6488 | 6796 | x: $scope.offsetX1, y: $scope.offsetY1, |
6489 | 6797 | width: $scope.x - $scope.offsetX1, |
6490 | 6798 | height: $scope.y - $scope.offsetY1, |
6799 | + add: function (layer) { | |
6800 | + | |
6801 | + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
6802 | + | |
6803 | + }, | |
6491 | 6804 | click: function (layer) { |
6492 | 6805 | |
6493 | 6806 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -6504,6 +6817,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6504 | 6817 | }).drawLayers(); |
6505 | 6818 | |
6506 | 6819 | }, |
6820 | + dblclick: function (layer) { | |
6821 | + | |
6822 | + | |
6823 | + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
6824 | + $("#annotationTextModal").modal("toggle"); | |
6825 | + | |
6826 | + $("#text_area").val(''); | |
6827 | + $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
6828 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | |
6829 | + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
6830 | + | |
6831 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
6832 | + | |
6833 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
6834 | + | |
6835 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
6836 | + | |
6837 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
6838 | + | |
6839 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
6840 | + | |
6841 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
6842 | + | |
6843 | + }, | |
6507 | 6844 | mouseout: function (layer) { |
6508 | 6845 | $rootScope.canvasLayerNameCollection = []; |
6509 | 6846 | $('#canvas').setLayer(layer.name, { |
... | ... | @@ -6538,9 +6875,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6538 | 6875 | |
6539 | 6876 | $("#annotationTextModal").modal("toggle"); |
6540 | 6877 | $('.btnCursor').trigger('click'); |
6878 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | |
6879 | + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
6541 | 6880 | $("#text_area").val(''); |
6881 | + | |
6542 | 6882 | $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); |
6883 | + | |
6884 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
6885 | + | |
6886 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
6887 | + | |
6888 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
6889 | + | |
6890 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
6891 | + | |
6892 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
6893 | + | |
6894 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
6895 | + | |
6543 | 6896 | $(".btn-annotation").removeClass("activebtncolor"); |
6897 | + | |
6544 | 6898 | $('.btnCursor').addClass('activebtncolor'); |
6545 | 6899 | break; |
6546 | 6900 | |
... | ... | @@ -6553,6 +6907,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6553 | 6907 | |
6554 | 6908 | } |
6555 | 6909 | |
6910 | + | |
6556 | 6911 | //-- TextArea functionality of Annotation toolbar |
6557 | 6912 | |
6558 | 6913 | $rootScope.fontSizes; |
... | ... | @@ -6567,271 +6922,466 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6567 | 6922 | $rootScope.modifySavedText = []; |
6568 | 6923 | $rootScope.TextRectangleArr = []; |
6569 | 6924 | $rootScope.rectDimension = []; |
6570 | - | |
6925 | + | |
6571 | 6926 | |
6572 | 6927 | // will refactor this code later |
6573 | 6928 | |
6574 | - | |
6929 | + | |
6575 | 6930 | $rootScope.saveText = function () { |
6931 | + | |
6576 | 6932 | // this part will work first time when save button will be clicked |
6577 | 6933 | if ($rootScope.IsTextAlreadySave == false) { |
6578 | 6934 | // getting textarea style properties |
6579 | - $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6580 | - $rootScope.fontWeight = $("#text_area").css("font-weight"); | |
6581 | - $rootScope.fontStyle = $("#text_area").css("font-style"); | |
6582 | - $rootScope.textAlignmt = $("#text_area").css("text-align"); | |
6583 | - $rootScope.fontColor = $("#text_area").css("color"); | |
6584 | - $rootScope.fontFamily = $("#text_area").css("font-family"); | |
6585 | - $rootScope.underlineText = $("#text_area").css("text-decoration"); | |
6586 | - $rootScope.textArea = $("#text_area").val(); | |
6935 | + $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6936 | + $rootScope.fontWeight = $("#text_area").css("font-weight"); | |
6937 | + $rootScope.fontStyle = $("#text_area").css("font-style"); | |
6938 | + $rootScope.textAlignmt = $("#text_area").css("text-align"); | |
6939 | + $rootScope.fontColor = $("#text_area").css("color"); | |
6940 | + $rootScope.fontFamily = $("#text_area").css("font-family"); | |
6941 | + $rootScope.underlineText = $("#text_area").css("text-decoration"); | |
6942 | + $rootScope.textArea = $("#text_area").val(); | |
6587 | 6943 | |
6588 | 6944 | // deleting previous text area |
6589 | 6945 | |
6590 | - $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); | |
6591 | - $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | |
6592 | - | |
6593 | - // Text After Saving in Rectangle | |
6594 | - $('#canvas').drawText({ | |
6595 | - layer: true, | |
6596 | - draggable: true, | |
6597 | - name: 'TextArea_' + $rootScope.resetText, | |
6598 | - groups: ['TextArea_' + $rootScope.resetText], | |
6599 | - dragGroups: ['TextArea_' + $rootScope.resetText], | |
6600 | - fillStyle: $rootScope.fontColor, | |
6601 | - fontStyle: $rootScope.fontStyle, | |
6602 | - fontSize: $rootScope.fontSizes, | |
6603 | - fontFamily: $rootScope.fontFamily, | |
6604 | - align: $rootScope.textAlignmt, | |
6605 | - strokeWidth: 0, | |
6606 | - text: $rootScope.textArea, | |
6607 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
6608 | - maxWidth: $scope.x - $scope.offsetX1, | |
6609 | - maxHeight: $scope.y - $scope.offsetY1, | |
6610 | - add: function (layer) { | |
6611 | - $rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' }); | |
6612 | - $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily }); | |
6946 | + $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); | |
6947 | + $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | |
6948 | + | |
6949 | + // Text After Saving in Rectangle | |
6950 | + $('#canvas').drawText({ | |
6951 | + layer: true, | |
6952 | + draggable: true, | |
6953 | + name: 'TextAreaNew_' + $rootScope.resetText, | |
6954 | + groups: ['TextAreaNew_' + $rootScope.resetText], | |
6955 | + dragGroups: ['TextAreaNew_' + $rootScope.resetText], | |
6956 | + fillStyle: $rootScope.fontColor, | |
6957 | + fontStyle: $rootScope.fontWeight + " " + $rootScope.fontStyle, | |
6958 | + fontSize: $rootScope.fontSizes, | |
6959 | + fontFamily: $rootScope.fontFamily, | |
6960 | + align: $rootScope.textAlignmt, | |
6961 | + strokeWidth: 0, | |
6962 | + text: $rootScope.textArea, | |
6963 | + x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
6964 | + maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
6965 | + maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | |
6966 | + add: function (layer) { | |
6967 | + // alert(layer.maxWidth); | |
6968 | + $rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' }); | |
6969 | + $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily, TextDecoration: $rootScope.underlineText }); | |
6613 | 6970 | } |
6614 | - }) | |
6615 | - // Draw rectangle | |
6616 | - .drawRect({ | |
6617 | - name: 'TextArea1_' + $rootScope.resetText, | |
6618 | - layer: true, | |
6619 | - draggable: true, | |
6620 | - groups: ['TextArea_' + $rootScope.resetText], | |
6621 | - dragGroups: ['TextArea_' + $rootScope.resetText], | |
6622 | - opacity: $rootScope.shapestyleOpacity, | |
6623 | - strokeStyle: $rootScope.shapestyleborderColor, | |
6624 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
6625 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
6626 | - width: $scope.x - $scope.offsetX1, | |
6627 | - height: $scope.y - $scope.offsetY1, | |
6628 | - click: function (layer) { | |
6629 | - $rootScope.shapeTypeText = "textAreaRect"; | |
6630 | - | |
6631 | - var layerNameSplit = layer.name; | |
6632 | - var splitedName = layerNameSplit.split("_"); | |
6633 | - var textValName = "TextArea_"; | |
6634 | - var concatinateResult = textValName.concat(splitedName[1]); | |
6635 | - $rootScope.canvasLayerNameCollection = []; | |
6636 | - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | |
6637 | - $('#canvas').setLayer(layer.name, { | |
6638 | - handle: { | |
6639 | - type: 'rectangle', | |
6640 | - fillStyle: '#fff', | |
6641 | - strokeStyle: '#c33', | |
6642 | - strokeWidth: 2, | |
6643 | - width: 5, height: 5, | |
6644 | - cornerRadius: 3 | |
6645 | - } | |
6646 | - }).drawLayers(); | |
6647 | - }, | |
6648 | - dblclick: function (layer) { | |
6649 | - $rootScope.IsTextAlreadySave = true; | |
6650 | - | |
6651 | - var _rectLayerOnSave = layer.name; | |
6652 | - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); | |
6653 | - var TextAreaRectName = "TextArea_"; | |
6654 | - var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]); | |
6655 | - $rootScope.modifySavedText.push({ TextName: layer.name, RectText: TextAreaRectNameConcatenated }); | |
6656 | - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
6657 | - var _rectLayerOnSaveSplitInt; | |
6658 | - if (_rectLayerOnSaveSplit[1] >= 3) | |
6659 | - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2); | |
6660 | - else | |
6661 | - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | |
6662 | - var b = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Text1; | |
6663 | - $("#text_area").val(b); | |
6664 | - $("#text_area").css("font-size", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontSize); | |
6665 | - $("#text_area").css("font-weight", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); | |
6666 | - $("#text_area").css("font-style", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); | |
6667 | - $("#text_area").css("text-align", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align); | |
6668 | - $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor); | |
6669 | - $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily); | |
6670 | - $("#text_area").css("text-decoration", $rootScope.underlineText); | |
6671 | - _rectLayerOnSaveSplitInt = ''; b = ''; | |
6672 | - $("#annotationTextModal").modal("toggle"); | |
6673 | - }, | |
6674 | - mouseout: function (layer) { | |
6675 | - $rootScope.canvasLayerNameCollection = []; | |
6676 | - $('#canvas').setLayer(layer.name, { | |
6677 | - handle: { | |
6678 | - type: 'rectangle', | |
6679 | - fillStyle: 'pink', | |
6680 | - strokeStyle: 'yellow', | |
6681 | - strokeWidth: 0, | |
6682 | - width: 0, height: 0, | |
6683 | - cornerRadius: 0 | |
6684 | - } | |
6685 | - }).drawLayers(); | |
6686 | - }, | |
6687 | - mouseover: function (layer) { | |
6688 | - $('#canvas').setLayer(layer.name, { | |
6689 | - handle: { | |
6690 | - type: 'rectangle', | |
6691 | - fillStyle: '#fff', | |
6692 | - strokeStyle: '#c33', | |
6693 | - strokeWidth: 2, | |
6694 | - width: 5, height: 5, | |
6695 | - cornerRadius: 3 | |
6696 | - } | |
6697 | - }).drawLayers(); | |
6698 | - | |
6699 | - } | |
6700 | - }); | |
6701 | - $("#text_area").val(''); | |
6702 | - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
6703 | - | |
6704 | - } | |
6705 | - | |
6706 | -// this part will work second time when save button will be clicked | |
6707 | - else { | |
6708 | - // getting textarea style properties | |
6709 | - var _modifiedText = $("#text_area").val(); | |
6710 | - var _modifiedFontSize = $("#text_area").css("font-size"); | |
6711 | - var _modifiedFontWeight = $("#text_area").css("font-weight"); | |
6712 | - var _modifiedFontStyle = $("#text_area").css("font-style"); | |
6713 | - var _modifiedTextAlign = $("#text_area").css("text-align"); | |
6714 | - var _modifiedFontColor = $("#text_area").css("color"); | |
6715 | - var _modifiedFontFamily = $("#text_area").css("font-family"); | |
6716 | - var _modifiedFontDecoration = $("#text_area").css("text-decoration"); | |
6717 | - | |
6718 | - // deleting previous textarea | |
6719 | - $("#canvas").removeLayer($rootScope.modifySavedText[0].RectText).drawLayers(); | |
6720 | - $("#canvas").removeLayer($rootScope.modifySavedText[0].TextName).drawLayers(); | |
6721 | - $rootScope.resetTextRectSave = $rootScope.ObjectIndexSave++; | |
6722 | - $rootScope.resetTextSave = $rootScope.ObjectIndexSave++; | |
6723 | - | |
6724 | - // generating new text area | |
6725 | - $('#canvas').drawText({ | |
6726 | - layer: true, | |
6727 | - draggable: true, | |
6728 | - name: 'TextAreaAfterEdit_' + $rootScope.resetTextSave, | |
6729 | - groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6730 | - dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6731 | - fillStyle: _modifiedFontColor, | |
6732 | - fontStyle: _modifiedFontStyle, | |
6733 | - fontSize: _modifiedFontSize, | |
6734 | - fontFamily: _modifiedFontFamily, | |
6735 | - align: _modifiedTextAlign, | |
6736 | - strokeWidth: 0, | |
6737 | - text: _modifiedText, | |
6738 | - x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
6739 | - maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
6740 | - maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height | |
6741 | - | |
6742 | - }) | |
6743 | - // Draw rect as wide as the text | |
6744 | - .drawRect({ | |
6745 | - name: 'TextAreaAfterEditRect_' + $rootScope.resetTextSave, | |
6746 | - layer: true, | |
6747 | - draggable: true, | |
6748 | - groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6749 | - dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6750 | - opacity: $rootScope.shapestyleOpacity, | |
6751 | - strokeStyle: $rootScope.shapestyleborderColor, | |
6752 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
6753 | - x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
6754 | - width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
6755 | - height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | |
6756 | - click: function (layer) { | |
6757 | - $rootScope.shapeTypeText = "textAreaRect"; | |
6758 | - var layerNameSplit = layer.name; | |
6759 | - var splitedName = layerNameSplit.split("_"); | |
6760 | - var textValName = "TextAreaAfterEdit_"; | |
6971 | + }) | |
6972 | + // Draw rectangle | |
6973 | + .drawRect({ | |
6974 | + name: 'TextArea1_' + $rootScope.resetText, | |
6975 | + layer: true, | |
6976 | + draggable: true, | |
6977 | + groups: ['TextAreaNew_' + $rootScope.resetText], | |
6978 | + dragGroups: ['TextAreaNew_' + $rootScope.resetText], | |
6979 | + opacity: $rootScope.shapestyleOpacity, | |
6980 | + strokeStyle: $rootScope.shapestyleborderColor, | |
6981 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
6982 | + x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
6983 | + width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
6984 | + height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | |
6985 | + click: function (layer) { | |
6986 | + $rootScope.shapeTypeText = "textAreaRect"; | |
6987 | + | |
6988 | + var layerNameSplit = layer.name; | |
6989 | + var splitedName = layerNameSplit.split("_"); | |
6990 | + var textValName = "TextAreaNew_"; | |
6761 | 6991 | var concatinateResult = textValName.concat(splitedName[1]); |
6762 | 6992 | $rootScope.canvasLayerNameCollection = []; |
6763 | - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | |
6764 | - | |
6765 | - $('#canvas').setLayer(layer.name, { | |
6766 | - handle: { | |
6767 | - type: 'rectangle', | |
6768 | - fillStyle: '#fff', | |
6769 | - strokeStyle: '#c33', | |
6770 | - strokeWidth: 2, | |
6771 | - width: 5, height: 5, | |
6772 | - cornerRadius: 3 | |
6773 | - } | |
6774 | - }).drawLayers(); | |
6775 | - | |
6776 | - }, | |
6777 | - dblclick: function (layer) { | |
6778 | - | |
6779 | - $rootScope.IsTextAlreadySave = true; | |
6780 | - var _rectLayerOnSave = layer.name; | |
6781 | - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); | |
6782 | - var RectNameAfterEdit = "TextAreaAfterEdit_"; | |
6783 | - var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]); | |
6784 | - $rootScope.modifySavedText.push({ TextName: layer.name, RectText: RectNameAfterEditResult }); | |
6785 | - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
6786 | - $("#text_area").val(_modifiedText); | |
6787 | - $("#text_area").css("font-size", _modifiedFontSize); | |
6788 | - $("#text_area").css("font-weight", _modifiedFontWeight); | |
6789 | - $("#text_area").css("font-style", _modifiedFontStyle); | |
6790 | - $("#text_area").css("text-align", _modifiedTextAlign); | |
6791 | - $("#text_area").css("color", _modifiedFontColor); | |
6792 | - $("#text_area").css("font-family", _modifiedFontFamily); | |
6793 | - $("#text_area").css("text-decoration", _modifiedFontDecoration); | |
6794 | - $("#annotationTextModal").modal("toggle"); | |
6795 | - }, | |
6796 | - mouseout: function (layer) { | |
6797 | - $rootScope.canvasLayerNameCollection = []; | |
6798 | - $('#canvas').setLayer(layer.name, { | |
6799 | - handle: { | |
6800 | - type: 'rectangle', | |
6801 | - fillStyle: 'pink', | |
6802 | - strokeStyle: 'yellow', | |
6803 | - strokeWidth: 0, | |
6804 | - width: 0, height: 0, | |
6805 | - cornerRadius: 0 | |
6806 | - } | |
6807 | - }).drawLayers(); | |
6808 | - }, | |
6809 | - mouseover: function (layer) { | |
6810 | - $('#canvas').setLayer(layer.name, { | |
6811 | - handle: { | |
6812 | - type: 'rectangle', | |
6813 | - fillStyle: '#fff', | |
6814 | - strokeStyle: '#c33', | |
6815 | - strokeWidth: 2, | |
6816 | - width: 5, height: 5, | |
6817 | - cornerRadius: 3 | |
6818 | - } | |
6819 | - }).drawLayers(); | |
6820 | - | |
6821 | - } | |
6822 | - }); | |
6823 | - $rootScope.modifySavedText = []; | |
6824 | - | |
6825 | - } | |
6993 | + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | |
6994 | + $('#canvas').setLayer(layer.name, { | |
6995 | + handle: { | |
6996 | + type: 'rectangle', | |
6997 | + fillStyle: '#fff', | |
6998 | + strokeStyle: '#c33', | |
6999 | + strokeWidth: 2, | |
7000 | + width: 5, height: 5, | |
7001 | + cornerRadius: 3 | |
7002 | + } | |
7003 | + }).drawLayers(); | |
7004 | + }, | |
7005 | + dblclick: function (layer) { | |
7006 | + | |
7007 | + $rootScope.isTextAreaClosedButtonActive = false; | |
7008 | + $rootScope.IsTextAlreadySave = true; | |
7009 | + | |
7010 | + var _rectLayerOnSave = layer.name; | |
7011 | + var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); | |
7012 | + var TextAreaRectName = "TextAreaNew_"; | |
7013 | + var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]); | |
7014 | + | |
7015 | + $rootScope.layerNameArr = layer.name; | |
7016 | + $rootScope.rectTextArr = TextAreaRectNameConcatenated; | |
7017 | + // $rootScope.modifySavedText.push({ TextName: '', RectText: ''}); | |
7018 | + // $rootScope.modifySavedText.push({ TextName: layer.name, RectText: TextAreaRectNameConcatenated }); | |
7019 | + | |
7020 | + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
7021 | + var _rectLayerOnSaveSplitInt; | |
7022 | + //if (_rectLayerOnSaveSplit[1] >= 3) | |
7023 | + // _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2); | |
7024 | + //else | |
7025 | + // _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | |
7026 | + | |
7027 | + _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | |
7028 | + | |
7029 | + var b = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Text1; | |
7030 | + $("#text_area").val(b); | |
7031 | + var fontStyleProp = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle; | |
7032 | + var fontWeightProp = fontStyleProp.split(" "); | |
7033 | + | |
7034 | + $("#text_area").css("font-size", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontSize); | |
7035 | + $("#text_area").css("font-weight", fontWeightProp[0]); | |
7036 | + $("#text_area").css("font-style", fontWeightProp[1]); | |
7037 | + $("#text_area").css("text-align", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align); | |
7038 | + $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor); | |
7039 | + $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily); | |
7040 | + $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].TextDecoration); | |
7041 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor }); | |
7042 | + // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" }); | |
7043 | + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
7044 | + | |
7045 | + | |
7046 | + //adding text text decoration active class in text edit pop-up | |
7047 | + | |
7048 | + if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].TextDecoration == "underline") { | |
7049 | + | |
7050 | + $("#text-underline").addClass("ActiveFormattingButtonClass"); | |
7051 | + | |
7052 | + } | |
7053 | + | |
7054 | + else { | |
7055 | + | |
7056 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
7057 | + | |
7058 | + } | |
7059 | + | |
7060 | + | |
7061 | + | |
7062 | + //adding text font weight active class in text edit pop-up | |
7063 | + | |
7064 | + if (fontWeightProp[0] == 700) { | |
7065 | + | |
7066 | + | |
7067 | + | |
7068 | + $("#text-bold").addClass("ActiveFormattingButtonClass"); | |
7069 | + | |
7070 | + } | |
7071 | + | |
7072 | + else { | |
7073 | + | |
7074 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
7075 | + | |
7076 | + } | |
7077 | + | |
7078 | + //adding text font style active class in text edit pop-up | |
7079 | + | |
7080 | + if (fontWeightProp[1] == "italic") { | |
7081 | + | |
7082 | + | |
7083 | + $("#text-italic").addClass("ActiveFormattingButtonClass"); | |
7084 | + } | |
7085 | + else { | |
7086 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
7087 | + | |
7088 | + | |
7089 | + } | |
7090 | + | |
7091 | + //adding text alignment active class in text edit pop-up | |
7092 | + | |
7093 | + if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "left") { | |
7094 | + | |
7095 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7096 | + | |
7097 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
7098 | + | |
7099 | + $("#text-left").addClass("ActiveFormattingButtonClass"); | |
7100 | + | |
7101 | + } | |
7102 | + | |
7103 | + else if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "right") { | |
7104 | + | |
7105 | + | |
7106 | + | |
7107 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
7108 | + | |
7109 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7110 | + | |
7111 | + $("#text-right").addClass("ActiveFormattingButtonClass"); | |
7112 | + | |
7113 | + | |
7114 | + | |
7115 | + } | |
7116 | + | |
7117 | + else if ($rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align == "center") { | |
7118 | + | |
7119 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7120 | + | |
7121 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7122 | + | |
7123 | + $("#text-center").addClass("ActiveFormattingButtonClass"); | |
7124 | + | |
7125 | + | |
7126 | + | |
7127 | + } | |
7128 | + | |
7129 | + | |
7130 | + _rectLayerOnSaveSplitInt = ''; b = ''; | |
7131 | + $("#annotationTextModal").modal("toggle"); | |
7132 | + }, | |
7133 | + mouseout: function (layer) { | |
7134 | + $rootScope.canvasLayerNameCollection = []; | |
7135 | + $('#canvas').setLayer(layer.name, { | |
7136 | + handle: { | |
7137 | + type: 'rectangle', | |
7138 | + fillStyle: 'pink', | |
7139 | + strokeStyle: 'yellow', | |
7140 | + strokeWidth: 0, | |
7141 | + width: 0, height: 0, | |
7142 | + cornerRadius: 0 | |
7143 | + } | |
7144 | + }).drawLayers(); | |
7145 | + }, | |
7146 | + mouseover: function (layer) { | |
7147 | + $('#canvas').setLayer(layer.name, { | |
7148 | + handle: { | |
7149 | + type: 'rectangle', | |
7150 | + fillStyle: '#fff', | |
7151 | + strokeStyle: '#c33', | |
7152 | + strokeWidth: 2, | |
7153 | + width: 5, height: 5, | |
7154 | + cornerRadius: 3 | |
7155 | + } | |
7156 | + }).drawLayers(); | |
7157 | + | |
7158 | + } | |
7159 | + }); | |
7160 | + $("#text_area").val(''); | |
7161 | + $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | |
7162 | + | |
7163 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | |
7164 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
7165 | + | |
7166 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
7167 | + | |
7168 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
7169 | + | |
7170 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7171 | + | |
7172 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7173 | + | |
7174 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
7175 | + | |
7176 | + | |
7177 | + } | |
7178 | + | |
7179 | + // this part will work second time when save button will be clicked | |
7180 | + else { | |
7181 | + | |
7182 | + // getting textarea style properties | |
7183 | + var _modifiedText = $("#text_area").val(); | |
7184 | + var _modifiedFontSize = $("#text_area").css("font-size"); | |
7185 | + var _modifiedFontWeight = $("#text_area").css("font-weight"); | |
7186 | + var _modifiedFontStyle = $("#text_area").css("font-style"); | |
7187 | + var _modifiedTextAlign = $("#text_area").css("text-align"); | |
7188 | + var _modifiedFontColor = $("#text_area").css("color"); | |
7189 | + var _modifiedFontFamily = $("#text_area").css("font-family"); | |
7190 | + var _modifiedFontDecoration = $("#text_area").css("text-decoration"); | |
7191 | + | |
7192 | + // deleting previous textarea | |
7193 | + | |
7194 | + // var a = $rootScope.modifySavedTextIndexNumber; | |
7195 | + // alert(a); | |
7196 | + // alert($rootScope.modifySavedText.length); | |
7197 | + // alert($rootScope.modifySavedText[a].RectText); | |
7198 | + | |
7199 | + $("#canvas").removeLayer($rootScope.layerNameArr).drawLayers(); | |
7200 | + $("#canvas").removeLayer($rootScope.rectTextArr).drawLayers(); | |
7201 | + | |
7202 | + $rootScope.resetTextRectSave = $rootScope.ObjectIndexSave++; | |
7203 | + $rootScope.resetTextSave = $rootScope.ObjectIndexSave++; | |
7204 | + | |
7205 | + // generating new text area | |
7206 | + $('#canvas').drawText({ | |
7207 | + layer: true, | |
7208 | + draggable: true, | |
7209 | + name: 'TextAreaAfterEdit_' + $rootScope.resetTextSave, | |
7210 | + groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
7211 | + dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
7212 | + fillStyle: _modifiedFontColor, | |
7213 | + fontStyle: _modifiedFontWeight + " " + _modifiedFontStyle, | |
7214 | + fontSize: _modifiedFontSize, | |
7215 | + fontFamily: _modifiedFontFamily, | |
7216 | + align: _modifiedTextAlign, | |
7217 | + strokeWidth: 0, | |
7218 | + text: _modifiedText, | |
7219 | + x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
7220 | + maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
7221 | + maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height | |
7222 | + | |
7223 | + }) | |
7224 | + // Draw rect as wide as the text | |
7225 | + .drawRect({ | |
7226 | + name: 'TextAreaAfterEditRect_' + $rootScope.resetTextSave, | |
7227 | + layer: true, | |
7228 | + draggable: true, | |
7229 | + groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
7230 | + dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
7231 | + opacity: $rootScope.shapestyleOpacity, | |
7232 | + strokeStyle: $rootScope.shapestyleborderColor, | |
7233 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
7234 | + x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
7235 | + width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
7236 | + height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | |
7237 | + click: function (layer) { | |
7238 | + $rootScope.shapeTypeText = "textAreaRect"; | |
7239 | + var layerNameSplit = layer.name; | |
7240 | + var splitedName = layerNameSplit.split("_"); | |
7241 | + var textValName = "TextAreaAfterEdit_"; | |
7242 | + var concatinateResult = textValName.concat(splitedName[1]); | |
7243 | + $rootScope.canvasLayerNameCollection = []; | |
7244 | + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | |
7245 | + | |
7246 | + $('#canvas').setLayer(layer.name, { | |
7247 | + handle: { | |
7248 | + type: 'rectangle', | |
7249 | + fillStyle: '#fff', | |
7250 | + strokeStyle: '#c33', | |
7251 | + strokeWidth: 2, | |
7252 | + width: 5, height: 5, | |
7253 | + cornerRadius: 3 | |
7254 | + } | |
7255 | + }).drawLayers(); | |
7256 | + | |
7257 | + }, | |
7258 | + dblclick: function (layer) { | |
7259 | + | |
7260 | + $rootScope.isTextAreaClosedButtonActive = false; | |
7261 | + $rootScope.IsTextAlreadySave = true; | |
7262 | + var _rectLayerOnSave = layer.name; | |
7263 | + var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); | |
7264 | + var RectNameAfterEdit = "TextAreaAfterEdit_"; | |
7265 | + var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]); | |
7266 | + $rootScope.modifySavedTextIndexNumber = _rectLayerOnSaveSplit[1]; | |
7267 | + | |
7268 | + | |
7269 | + | |
7270 | + // $rootScope.modifySavedText.push({ TextName: '', RectText: '' }); | |
7271 | + // $rootScope.modifySavedText.push({ TextName: layer.name, RectText: RectNameAfterEditResult }); | |
7272 | + | |
7273 | + $rootScope.layerNameArr = layer.name; | |
7274 | + $rootScope.rectTextArr = RectNameAfterEditResult; | |
7275 | + | |
7276 | + | |
7277 | + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
7278 | + $("#text_area").val(_modifiedText); | |
7279 | + $("#text_area").css("font-size", _modifiedFontSize); | |
7280 | + $("#text_area").css("font-weight", _modifiedFontWeight); | |
7281 | + $("#text_area").css("font-style", _modifiedFontStyle); | |
7282 | + $("#text_area").css("text-align", _modifiedTextAlign); | |
7283 | + $("#text_area").css("color", _modifiedFontColor); | |
7284 | + $("#text_area").css("font-family", _modifiedFontFamily); | |
7285 | + $("#text_area").css("text-decoration", _modifiedFontDecoration); | |
7286 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor }); | |
7287 | + // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" }); | |
7288 | + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
7289 | + | |
7290 | + //adding text text decoration active class in text edit pop-up | |
7291 | + if (_modifiedFontDecoration == "underline") { | |
7292 | + $("#text-underline").addClass("ActiveFormattingButtonClass"); | |
7293 | + } | |
7294 | + else { | |
7295 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | |
7296 | + } | |
7297 | + | |
7298 | + //adding text font weight active class in text edit pop-up | |
7299 | + if (_modifiedFontWeight == 700) { | |
7300 | + | |
7301 | + $("#text-bold").addClass("ActiveFormattingButtonClass"); | |
7302 | + } | |
7303 | + else { | |
7304 | + | |
7305 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | |
7306 | + | |
7307 | + } | |
7308 | + | |
7309 | + //adding text font style active class in text edit pop-up | |
7310 | + if (_modifiedFontStyle == "italic") { | |
7311 | + | |
7312 | + $("#text-italic").addClass("ActiveFormattingButtonClass"); | |
7313 | + } | |
7314 | + else { | |
7315 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | |
7316 | + | |
7317 | + } | |
7318 | + | |
7319 | + //adding text alignment active class in text edit pop-up | |
7320 | + if (_modifiedTextAlign == "left") { | |
7321 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7322 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
7323 | + $("#text-left").addClass("ActiveFormattingButtonClass"); | |
7324 | + } | |
7325 | + else if (_modifiedTextAlign == "right") { | |
7326 | + | |
7327 | + $("#text-center").removeClass("ActiveFormattingButtonClass") | |
7328 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7329 | + $("#text-right").addClass("ActiveFormattingButtonClass"); | |
7330 | + | |
7331 | + } | |
7332 | + else if (_modifiedTextAlign == "center") { | |
7333 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
7334 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
7335 | + $("#text-center").addClass("ActiveFormattingButtonClass"); | |
7336 | + | |
7337 | + } | |
7338 | + | |
7339 | + | |
7340 | + $("#annotationTextModal").modal("toggle"); | |
7341 | + }, | |
7342 | + mouseout: function (layer) { | |
7343 | + $rootScope.canvasLayerNameCollection = []; | |
7344 | + $('#canvas').setLayer(layer.name, { | |
7345 | + handle: { | |
7346 | + type: 'rectangle', | |
7347 | + fillStyle: 'pink', | |
7348 | + strokeStyle: 'yellow', | |
7349 | + strokeWidth: 0, | |
7350 | + width: 0, height: 0, | |
7351 | + cornerRadius: 0 | |
7352 | + } | |
7353 | + }).drawLayers(); | |
7354 | + }, | |
7355 | + mouseover: function (layer) { | |
7356 | + $('#canvas').setLayer(layer.name, { | |
7357 | + handle: { | |
7358 | + type: 'rectangle', | |
7359 | + fillStyle: '#fff', | |
7360 | + strokeStyle: '#c33', | |
7361 | + strokeWidth: 2, | |
7362 | + width: 5, height: 5, | |
7363 | + cornerRadius: 3 | |
7364 | + } | |
7365 | + }).drawLayers(); | |
7366 | + | |
7367 | + } | |
7368 | + }); | |
7369 | + // $rootScope.modifySavedText = []; | |
7370 | + | |
7371 | + } | |
6826 | 7372 | } |
6827 | - | |
7373 | + | |
6828 | 7374 | // deleting text area on close button |
6829 | 7375 | $rootScope.closeModal = function () { |
6830 | 7376 | |
7377 | + | |
7378 | + if ($rootScope.isTextAreaClosedButtonActive == true) { | |
6831 | 7379 | $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); |
6832 | 7380 | $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
6833 | - | |
6834 | - } | |
7381 | + | |
7382 | + } | |
7383 | + | |
7384 | + } | |
6835 | 7385 | |
6836 | 7386 | |
6837 | 7387 | function OnPaintCanvasMouseMove(event) { |
... | ... | @@ -6840,7 +7390,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6840 | 7390 | } |
6841 | 7391 | |
6842 | 7392 | $rootScope.FreeStylePaint = function (e) { |
6843 | - | |
7393 | + | |
6844 | 7394 | |
6845 | 7395 | } |
6846 | 7396 | $scope.OnPaintBrushCanvasMouseDown = function (event) { |
... | ... | @@ -6848,22 +7398,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6848 | 7398 | |
6849 | 7399 | case "FreeStylePaint": |
6850 | 7400 | |
6851 | - | |
6852 | 7401 | |
6853 | - // $('#canvasPaint').sketch(); | |
6854 | - // $('#canvasPaint').sketch({ defaultSize: 1 }); | |
6855 | - // if ($("#amount-2").val() == '') { | |
6856 | - // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6857 | - // $('#canvasPaint').sketch(); | |
6858 | - // } | |
6859 | - // else { | |
6860 | 7402 | |
6861 | - // // var a = $("#amount-2").val(); | |
6862 | - //// $scope.shapesize = parseInt(a); | |
6863 | - // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); | |
6864 | - // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
7403 | + // $('#canvasPaint').sketch(); | |
7404 | + // $('#canvasPaint').sketch({ defaultSize: 1 }); | |
7405 | + // if ($("#amount-2").val() == '') { | |
7406 | + // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
7407 | + // $('#canvasPaint').sketch(); | |
7408 | + // } | |
7409 | + // else { | |
7410 | + | |
7411 | + // // var a = $("#amount-2").val(); | |
7412 | + //// $scope.shapesize = parseInt(a); | |
7413 | + // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); | |
7414 | + // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6865 | 7415 | |
6866 | - // } | |
7416 | + // } | |
6867 | 7417 | |
6868 | 7418 | |
6869 | 7419 | break; |
... | ... | @@ -6881,7 +7431,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6881 | 7431 | |
6882 | 7432 | // case "FreeStylePaint": |
6883 | 7433 | |
6884 | - | |
7434 | + | |
6885 | 7435 | // if ($("#amount-2").val() == '') |
6886 | 7436 | // { |
6887 | 7437 | // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); |
... | ... | @@ -6907,9 +7457,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6907 | 7457 | |
6908 | 7458 | $(document).keydown(function (event) { |
6909 | 7459 | |
6910 | - | |
7460 | + // predefined function for detecting keyboard key | |
6911 | 7461 | if (event.which == 46) { |
6912 | - | |
7462 | + | |
6913 | 7463 | if ($rootScope.shapeTypePin == "Pin") { |
6914 | 7464 | |
6915 | 7465 | |
... | ... | @@ -6989,7 +7539,31 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6989 | 7539 | console.log('highLightBody from HighlightBodyByBodySystem') |
6990 | 7540 | $scope.highLightBody(); |
6991 | 7541 | } |
6992 | - | |
7542 | + else { | |
7543 | + //This else is when user seraced anything then change the view and clicked on highlight options | |
7544 | + //in this case body is already highlihted(gray) so no need to | |
7545 | + if ($scope.grayedBR != null || $scope.grayedBR != undefined) { | |
7546 | + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) { | |
7547 | + $scope.isAlreadyHighlighted = true; | |
7548 | + } | |
7549 | + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) { | |
7550 | + $scope.isAlreadyHighlighted = true; | |
7551 | + } | |
7552 | + else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) { | |
7553 | + $scope.isAlreadyHighlighted = true; | |
7554 | + } | |
7555 | + else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) { | |
7556 | + $scope.isAlreadyHighlighted = true; | |
7557 | + } | |
7558 | + if (($scope.isAlreadyHighlighted == true && $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined && $scope.systemMatchedTermList.length > 0)) { | |
7559 | + | |
7560 | + $scope.isLoading = true; | |
7561 | + | |
7562 | + $('#spinner').css('visibility', 'visible'); | |
7563 | + $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100); | |
7564 | + } | |
7565 | + } | |
7566 | + } | |
6993 | 7567 | |
6994 | 7568 | |
6995 | 7569 | //$rootScope.isLoading = true; |
... | ... | @@ -7216,12 +7790,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7216 | 7790 | $scope.ShowSearch = function () { |
7217 | 7791 | |
7218 | 7792 | console.log('ShowSearch is called'); |
7793 | + //this check is for log only because we are writing length so need to check if its not null or undefined | |
7794 | + if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) | |
7795 | + console.log('$scope.VocabTermTxt.length= ' + $scope.VocabTermTxt.length) | |
7219 | 7796 | |
7220 | 7797 | $timeout(function () { |
7221 | - $scope.IsSearchVisible = true; | |
7222 | - | |
7223 | - document.getElementById("termlistfilter").style.display = "block"; | |
7224 | - }, 1000); | |
7798 | + if (($scope.VocabTermTxt!=null|| $scope.VocabTermTxt!=undefined) && ($scope.VocabTermTxt.length > 0)) { | |
7799 | + $scope.IsSearchVisible = true; | |
7800 | + document.getElementById("termlistfilter").style.display = "block"; | |
7801 | + } | |
7802 | + else { | |
7803 | + $scope.loadSearchDataForBodyView(); | |
7804 | + if ($scope.VocabTermTxt.length > 0) { | |
7805 | + $scope.ShowSearch(); | |
7806 | + } | |
7807 | + } | |
7808 | + }, 500); | |
7225 | 7809 | |
7226 | 7810 | //$scope.IsSearchVisible = true; |
7227 | 7811 | |
... | ... | @@ -7293,7 +7877,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7293 | 7877 | $("#canvasDiv").scrollTop(scrolly); |
7294 | 7878 | $("#canvasDiv").scrollLeft(scrollx); |
7295 | 7879 | |
7296 | - if (( $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
7880 | + if (($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
7297 | 7881 | $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100); |
7298 | 7882 | } |
7299 | 7883 | |
... | ... | @@ -7301,7 +7885,33 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7301 | 7885 | |
7302 | 7886 | //list manager |
7303 | 7887 | $scope.$on('listManagerEvent', function (event, data) { |
7304 | - | |
7888 | + | |
7889 | + if ($rootScope.disableAnnotationtoolOnListManager == true) | |
7890 | + { | |
7891 | + $('#AnnotaionPopupDiv').find('input, textarea, button, select').attr('disabled', 'disabled'); | |
7892 | + $('#slider-range-min-2').slider('disable'); | |
7893 | + if ($rootScope.setListManagerZindex == true) | |
7894 | + { | |
7895 | + var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x | |
7896 | + | |
7897 | + var canvasZindex = $('#canvas').css("z-index"); //y | |
7898 | + var listManagerZindex = $('#listManager').css("z-index"); //z | |
7899 | + if (canvasPaintZindex > canvasZindex) { | |
7900 | + //y = parseInt(canvasPaintZindex) + 1; | |
7901 | + //if (listManagerZindex <= canvasPaintZindex) { | |
7902 | + // listManagerZindex = parseInt(canvasPaintZindex) + 1; | |
7903 | + // $('#listManager').css("z-index", z); | |
7904 | + //} | |
7905 | + //else { | |
7906 | + $('#listManager').css("z-index", canvasPaintZindex); | |
7907 | + // } | |
7908 | + } else { | |
7909 | + //y = parseInt(y) + 1; | |
7910 | + $('#listManager').css("z-index", canvasZindex); | |
7911 | + } | |
7912 | + | |
7913 | + } | |
7914 | + } | |
7305 | 7915 | $('#spinner').css('visibility', 'visible'); |
7306 | 7916 | console.log('listManagerEvent'); |
7307 | 7917 | |
... | ... | @@ -7396,17 +8006,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7396 | 8006 | for (var j = 0; j < $scope.VocabTermTxt.length; j++) { |
7397 | 8007 | var $el = $('<option ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList') |
7398 | 8008 | $compile($el)($scope); |
7399 | - | |
8009 | + | |
7400 | 8010 | $rootScope.isLoading = false; |
7401 | 8011 | $('#spinner').css('visibility', 'hidden'); |
7402 | 8012 | } |
7403 | 8013 | var termsTotal = '<span class="pull-left marginTop5">' + $scope.VocabTermTxt.length + ' Structures</span>'; |
7404 | 8014 | $("#totalTerms").empty(); |
7405 | 8015 | $('#totalTerms').append(termsTotal); |
7406 | - | |
8016 | + | |
7407 | 8017 | |
7408 | 8018 | } |
7409 | - } | |
8019 | + } | |
7410 | 8020 | |
7411 | 8021 | |
7412 | 8022 | $scope.HighlightBodyOnListManagerSelection = function (event) { |
... | ... | @@ -7414,6 +8024,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7414 | 8024 | $scope.terminateCurrentlyRunningWPs(); |
7415 | 8025 | //debugger |
7416 | 8026 | $rootScope.isListManagerSelected = true; |
8027 | + //--- | |
8028 | + if ($rootScope.isListManagerSelected == true) { | |
8029 | + $("#btnHighLight").addClass("btn-primary"); | |
8030 | + $("#btnHighLight").removeClass("btn-black"); | |
8031 | + if (!$("#btnNormalMode").hasClass("btn-black")) { | |
8032 | + $("#btnNormalMode").addClass("btn-black"); | |
8033 | + } | |
8034 | + | |
8035 | + if ($("#btnNormalMode").hasClass("btn-primary")) { | |
8036 | + $("#btnNormalMode").removeClass("btn-primary"); | |
8037 | + } | |
8038 | + } | |
8039 | + //--- | |
7417 | 8040 | $rootScope.isLoading = true; |
7418 | 8041 | |
7419 | 8042 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -7515,24 +8138,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7515 | 8138 | } |
7516 | 8139 | } |
7517 | 8140 | } |
7518 | - $('#txtlayerNumber').val((parseInt($scope.layerNumber))); | |
7519 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); | |
8141 | + $('#txtlayerNumber').val((parseInt($scope.layerNumber))); | |
8142 | + $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); | |
7520 | 8143 | |
7521 | - //8.remove current layer canavses | |
7522 | - $scope.flushCanvas(); | |
8144 | + //8.remove current layer canavses | |
8145 | + $scope.flushCanvas(); | |
7523 | 8146 | |
7524 | 8147 | |
7525 | 8148 | |
7526 | - //9. | |
7527 | - $timeout(function () { | |
7528 | - $rootScope.isHighLight = false; | |
7529 | - $('#sppeachBubble').css('display', 'none'); | |
7530 | - $("#dot").css("display", "none"); | |
8149 | + //9. | |
8150 | + $timeout(function () { | |
8151 | + $rootScope.isHighLight = false; | |
8152 | + $('#sppeachBubble').css('display', 'none'); | |
8153 | + $("#dot").css("display", "none"); | |
8154 | + | |
8155 | + //redraw body of respective layer | |
8156 | + $scope.CalculateImageCordinates($rootScope.viewOrientationId) | |
8157 | + }, 500); | |
7531 | 8158 | |
7532 | - //redraw body of respective layer | |
7533 | - $scope.CalculateImageCordinates($rootScope.viewOrientationId) | |
7534 | - }, 500); | |
7535 | - | |
7536 | 8159 | } |
7537 | 8160 | |
7538 | 8161 | $scope.getChildTermList = function (termNo) { |
... | ... | @@ -7602,7 +8225,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7602 | 8225 | } |
7603 | 8226 | } |
7604 | 8227 | |
7605 | - | |
8228 | + | |
7606 | 8229 | $scope.aligneCanvasWithTerm = function () { |
7607 | 8230 | console.log('aligneCanvasWithTerm') |
7608 | 8231 | var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); |
... | ... | @@ -7617,7 +8240,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7617 | 8240 | var canvasRight = canvasX + canvasWidth |
7618 | 8241 | |
7619 | 8242 | if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom) { |
7620 | - | |
8243 | + | |
7621 | 8244 | newX = newX - canvasWidth / 2; |
7622 | 8245 | newY = newY - canvasHeight / 2; |
7623 | 8246 | |
... | ... | @@ -7646,7 +8269,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7646 | 8269 | |
7647 | 8270 | $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop(); |
7648 | 8271 | $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); |
7649 | - | |
8272 | + | |
7650 | 8273 | } |
7651 | 8274 | |
7652 | 8275 | |
... | ... | @@ -7763,15 +8386,212 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7763 | 8386 | }); |
7764 | 8387 | |
7765 | 8388 | } |
7766 | - | |
8389 | + | |
7767 | 8390 | $scope.LayerChangeBasedOnKeyPressed = function (e) { |
7768 | - | |
7769 | - if(e.keyCode==13) | |
8391 | + // Dissectible Anatomy > Should not display blank page if no layer is selected. | |
8392 | + | |
8393 | + | |
8394 | + if (e.keyCode == 13) { | |
8395 | + | |
8396 | + if ($("#txtlayerNumber").val() == '') | |
8397 | + { | |
8398 | + | |
8399 | + $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr); | |
8400 | + } | |
8401 | + else | |
8402 | + { | |
8403 | + $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val(); | |
8404 | + $scope.LayerChange(); | |
8405 | + } | |
8406 | + | |
8407 | + | |
8408 | + } | |
8409 | + | |
8410 | + // 'x' button is displaying inside the input box in IE browser. | |
8411 | + if (e.keyCode == 38) { | |
8412 | + | |
8413 | + | |
8414 | + var layerInputVal = $("#txtlayerNumber").val(); | |
8415 | + if (layerInputVal != $rootScope.totalLayers) { | |
8416 | + var layerInputValInc = parseInt(layerInputVal) + 1; | |
8417 | + $scope.layerNumber = parseInt(layerInputValInc); | |
8418 | + $("#txtlayerNumber").val($scope.layerNumber); | |
8419 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
8420 | + } | |
8421 | + | |
8422 | + | |
8423 | + } | |
8424 | + | |
8425 | + // 'x' button is displaying inside the input box in IE browser. | |
8426 | + if (e.keyCode == 40) { | |
8427 | + var layerInputVal = $("#txtlayerNumber").val(); | |
8428 | + if (layerInputVal > 0) { | |
8429 | + var layerInputValDec = parseInt(layerInputVal) - 1; | |
8430 | + $scope.layerNumber = parseInt(layerInputValDec); | |
8431 | + $("#txtlayerNumber").val($scope.layerNumber); | |
8432 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
8433 | + } | |
8434 | + } | |
8435 | + | |
8436 | + } | |
8437 | + | |
8438 | + | |
8439 | + $scope.LayerValueChangeBasedOnKeyUp = function (e) { | |
8440 | + | |
8441 | + var keyUplayerNumber = parseInt($("#txtlayerNumber").val()); | |
8442 | + | |
8443 | + if (isNaN(keyUplayerNumber)) | |
7770 | 8444 | { |
7771 | - $scope.LayerChange(); | |
8445 | + | |
7772 | 8446 | } |
7773 | - | |
8447 | + else { | |
8448 | + | |
8449 | + if (keyUplayerNumber > $rootScope.totalLayers) { | |
8450 | + | |
8451 | + $("#txtlayerNumber").val($rootScope.totalLayers); | |
8452 | + $scope.layerNumber = parseInt($rootScope.totalLayers); | |
8453 | + | |
8454 | + } | |
8455 | + else { | |
8456 | + | |
8457 | + $("#txtlayerNumber").val(keyUplayerNumber); | |
8458 | + $scope.layerNumber = parseInt(keyUplayerNumber); | |
8459 | + | |
8460 | + | |
8461 | + } | |
8462 | + | |
8463 | + } | |
8464 | + | |
8465 | + | |
7774 | 8466 | } |
8467 | + | |
8468 | + | |
8469 | + | |
7775 | 8470 | }] |
7776 | 8471 | |
7777 | -); | |
7778 | 8472 | \ No newline at end of file |
8473 | +); | |
8474 | + | |
8475 | + | |
8476 | +function OnGenderChange(event) { | |
8477 | + | |
8478 | + console.log('gender chnaged is called outside '); | |
8479 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8480 | + scope.$apply(function () { | |
8481 | + scope.OnGenderChange(event); | |
8482 | + }); | |
8483 | +} | |
8484 | + | |
8485 | +function OnViewChange(event) { | |
8486 | + console.log('OnViewChange chnaged is called outside '); | |
8487 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8488 | + scope.$apply(function () { | |
8489 | + scope.OnViewChange(event); | |
8490 | + }); | |
8491 | +} | |
8492 | + | |
8493 | +function OnBodySystemSelection(event) { | |
8494 | + console.log('OnBodySystem chnaged is called outside '); | |
8495 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8496 | + scope.$apply(function () { | |
8497 | + scope.HighlightBodyByBodySystem(event); | |
8498 | + }); | |
8499 | +} | |
8500 | + | |
8501 | +function enableShowHideStructureBox() { | |
8502 | + console.log('OnBodySystem chnaged is called outside '); | |
8503 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8504 | + scope.$apply(function () { | |
8505 | + scope.enableShowHideStructureBox(); | |
8506 | + }); | |
8507 | +} | |
8508 | + | |
8509 | +function OnSearch() { | |
8510 | + console.log('Show Search is called outside '); | |
8511 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8512 | + scope.$apply(function () { | |
8513 | + scope.ShowSearch(); | |
8514 | + }); | |
8515 | +} | |
8516 | +function selectTerm(event) { | |
8517 | + console.log('selectTerm is called outside '); | |
8518 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8519 | + scope.$apply(function () { | |
8520 | + scope.jumpToTerm(event); | |
8521 | + }); | |
8522 | +} | |
8523 | +function HighlightBodyOnListManager(event) { | |
8524 | + console.log('HighlightBodyOnListManager is called outside '); | |
8525 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8526 | + scope.$apply(function () { | |
8527 | + scope.HighlightBodyOnListManagerSelection(event); | |
8528 | + }); | |
8529 | +} | |
8530 | + | |
8531 | +function refreshTermListOnSystem(event) { | |
8532 | + console.log('refreshTermListOnSystem is called outside '); | |
8533 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8534 | + scope.$apply(function () { | |
8535 | + scope.refreshTermListOnSystemSelection(event); | |
8536 | + }); | |
8537 | +} | |
8538 | + | |
8539 | +function OnEnableExtract() | |
8540 | +{ | |
8541 | + console.log('OnEnableExtract is called outside '); | |
8542 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8543 | + scope.$apply(function () { | |
8544 | + scope.enableExtract('true'); | |
8545 | + }); | |
8546 | +} | |
8547 | + | |
8548 | +function onTboxCreation() | |
8549 | +{ | |
8550 | + console.log('OnEnableExtract is called outside '); | |
8551 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8552 | + scope.$apply(function () { | |
8553 | + scope.createTransparencyBox('true'); | |
8554 | + }); | |
8555 | +} | |
8556 | + | |
8557 | +function onTboxClose() | |
8558 | +{ | |
8559 | + console.log('onTboxClose is called outside '); | |
8560 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8561 | + scope.$apply(function () { | |
8562 | + scope.CloseTransparencyBox(); | |
8563 | + }); | |
8564 | +} | |
8565 | + | |
8566 | +function OnEnableNormalMode() | |
8567 | +{ | |
8568 | + console.log('OnEnableNormalMode is called outside '); | |
8569 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8570 | + scope.$apply(function () { | |
8571 | + scope.enableNormalMode(); | |
8572 | + }); | |
8573 | +} | |
8574 | + | |
8575 | +function OnEnableHighlight() { | |
8576 | + console.log('OnEnableHighlight is called outside '); | |
8577 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8578 | + scope.$apply(function () { | |
8579 | + scope.enableHighlight(); | |
8580 | + }); | |
8581 | +} | |
8582 | + | |
8583 | +function OnIdentityClick() { | |
8584 | + console.log('OnIdentityClick is called outside '); | |
8585 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8586 | + scope.$apply(function () { | |
8587 | + scope.IdentityClick(); | |
8588 | + }); | |
8589 | +} | |
8590 | + | |
8591 | +function OnZoom() | |
8592 | +{ | |
8593 | + console.log('OnZoom is called outside '); | |
8594 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
8595 | + scope.$apply(function () { | |
8596 | + scope.enableZoom(); | |
8597 | + }); | |
8598 | +} | |
7779 | 8599 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -26,6 +26,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
26 | 26 | $rootScope.clickDrag = new Array(); |
27 | 27 | $rootScope.isLineDrawSelecyed = false; |
28 | 28 | $rootScope.isAnnotationWindowClose = false; |
29 | + $rootScope.setListManagerZindex = false; | |
29 | 30 | $rootScope.lastX; |
30 | 31 | $rootScope.lastY; |
31 | 32 | $rootScope.CommonData; |
... | ... | @@ -89,15 +90,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
89 | 90 | } |
90 | 91 | } |
91 | 92 | |
92 | - $rootScope.DrawLine = function () { | |
93 | + // $rootScope.DrawLine = function () { | |
93 | 94 | //$rootScope.isIdetifyClicked = false; |
94 | 95 | //$rootScope.isDrawingToolSelected = true; |
95 | 96 | //$rootScope.isLineDrawSelecyed = true; |
96 | - $rootScope.shapeType = "Line"; | |
97 | + // $rootScope.shapeType = "Line"; | |
97 | 98 | // alert($rootScope.shapeType); |
98 | 99 | |
99 | 100 | |
100 | - } | |
101 | + // } | |
101 | 102 | |
102 | 103 | $rootScope.ClearIframe = function () { |
103 | 104 | if ($('#daImagePanel') != null) |
... | ... | @@ -117,6 +118,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
117 | 118 | |
118 | 119 | //annotation tool custom events |
119 | 120 | $rootScope.ShowAnnotationWindow = function () { |
121 | + //7904 | |
122 | + | |
123 | + $("#OnIdentify").addClass("annotationtoolbartab"); | |
124 | + $("#annotationToolBarOptions").addClass("active"); | |
125 | + $("#annotationButton").addClass("active"); | |
126 | + | |
120 | 127 | $rootScope.isAnnotationWindowOpen = true; |
121 | 128 | $(".annotationTollbar").css("display", "block"); |
122 | 129 | $rootScope.$broadcast('annotationToolEvent', true); |
... | ... | @@ -125,7 +132,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
125 | 132 | } |
126 | 133 | |
127 | 134 | $rootScope.CloseAnnotationTool = function () { |
128 | - console.log('close') | |
135 | + console.log('close'); | |
136 | + $("#OnIdentify").removeClass("annotationtoolbartab"); | |
137 | + $("#DrawMode").removeClass("annotationtoolbartab"); | |
138 | + $('.btnCursor').removeClass('activebtncolor'); | |
139 | + $("#annotationButton").removeClass("active"); | |
140 | + $("#annotationToolBarOptions").removeClass("active"); | |
141 | + | |
142 | + | |
129 | 143 | $(".annotationTollbar").css("display", "none"); |
130 | 144 | $rootScope.isAnnotationWindowClose = true; |
131 | 145 | $("#canvasPaint").css("display", "none"); |
... | ... | @@ -133,6 +147,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
133 | 147 | } |
134 | 148 | |
135 | 149 | $rootScope.OnIdentifyClick = function () { |
150 | + | |
151 | + $("#OnIdentify").addClass("annotationtoolbartab"); | |
152 | + $("#DrawMode").removeClass("annotationtoolbartab"); | |
136 | 153 | // $rootScope.isIdetifyClicked = true; |
137 | 154 | // $rootScope.isDrawingToolSelected = false; |
138 | 155 | $("#canvasPaint").css("display", "none"); |
... | ... | @@ -147,7 +164,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
147 | 164 | |
148 | 165 | |
149 | 166 | $rootScope.DrawingMode = function () { |
150 | - | |
167 | + $("#OnIdentify").removeClass("annotationtoolbartab"); | |
168 | + $("#DrawMode").addClass("annotationtoolbartab"); | |
151 | 169 | $('.btnCursor').addClass('activebtncolor'); |
152 | 170 | $rootScope.switchCanvas(); |
153 | 171 | $("#canvasPaint").css("display", "block"); |
... | ... | @@ -155,25 +173,46 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
155 | 173 | |
156 | 174 | } |
157 | 175 | |
176 | + // Dissectible Anatomy > Settings should be disable if Annotation is Open. | |
177 | + $rootScope.ShowSettingWindow = function () { | |
178 | + if ($(".annotationTollbar").css("display") == "block") { | |
179 | + // alert("already open"); | |
180 | + } | |
181 | + else { | |
182 | + $('#modal-settings').modal('toggle'); | |
183 | + } | |
184 | + | |
185 | + | |
186 | + } | |
187 | + | |
158 | 188 | |
159 | 189 | |
160 | 190 | //----Annotation Toolbar: Jcanvas----- |
161 | - | |
162 | - $rootScope.DrawLine = function (e) { | |
191 | + | |
192 | + $rootScope.DrLine = function (e) { | |
193 | + $rootScope.setListManagerZindex = true; | |
194 | + $("#canvasPaint").css("display", "block"); | |
195 | + $("#canvas").css("display", "block"); | |
196 | + | |
163 | 197 | $rootScope.switchCanvas(); |
164 | 198 | $rootScope.shapeType = "Line"; |
165 | - | |
199 | + | |
166 | 200 | |
167 | 201 | $('.btnCursor').removeClass('activebtncolor'); |
168 | - $(".btn-annotation").removeClass("activebtncolor"); | |
169 | - $(".btn-annotation-line").addClass("activebtncolor"); | |
202 | + $(".btn-annotation").removeClass("activebtncolor"); | |
203 | + $(".btn-annotation-line").addClass("activebtncolor"); | |
170 | 204 | |
171 | 205 | |
172 | 206 | } |
173 | 207 | |
174 | 208 | |
175 | - $rootScope.DrawPin = function (e) { | |
209 | + $rootScope.DrPin = function (e) { | |
210 | + $("#canvasPaint").css("display", "block"); | |
211 | + $("#canvas").css("display", "block"); | |
212 | + | |
176 | 213 | $rootScope.switchCanvas(); |
214 | + $rootScope.switchCanvas(); | |
215 | + $rootScope.setListManagerZindex = true; | |
177 | 216 | $rootScope.shapeType = "Pin"; |
178 | 217 | |
179 | 218 | $('.btnCursor').removeClass('activebtncolor'); |
... | ... | @@ -190,7 +229,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
190 | 229 | $('.btnCursor').addClass('activebtncolor'); |
191 | 230 | } |
192 | 231 | |
232 | + | |
193 | 233 | $rootScope.DrawRectangle = function (e) { |
234 | + $rootScope.setListManagerZindex = true; | |
194 | 235 | $("#canvasPaint").css("display", "block"); |
195 | 236 | $("#canvas").css("display", "block"); |
196 | 237 | $rootScope.switchCanvas(); |
... | ... | @@ -202,6 +243,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
202 | 243 | $rootScope.paintBrush = function () { |
203 | 244 | // debugger; |
204 | 245 | // $('.btnCursor').addClass('activebtncolor'); |
246 | + $rootScope.setListManagerZindex = true; | |
205 | 247 | $("#canvasPaint").css("display", "block"); |
206 | 248 | $("#canvas").css("display", "block"); |
207 | 249 | $rootScope.switchCanvasToPaintCanvas(); |
... | ... | @@ -237,6 +279,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
237 | 279 | } |
238 | 280 | |
239 | 281 | $rootScope.DrawCircle = function (e) { |
282 | + $rootScope.setListManagerZindex = true; | |
240 | 283 | $("#canvasPaint").css("display", "block"); |
241 | 284 | $("#canvas").css("display", "block"); |
242 | 285 | $rootScope.switchCanvas(); |
... | ... | @@ -247,6 +290,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
247 | 290 | } |
248 | 291 | |
249 | 292 | $rootScope.DrawArrow = function (e) { |
293 | + $rootScope.setListManagerZindex = true; | |
250 | 294 | $("#canvasPaint").css("display", "block"); |
251 | 295 | $("#canvas").css("display", "block"); |
252 | 296 | $rootScope.switchCanvas(); |
... | ... | @@ -256,6 +300,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
256 | 300 | $(".btn-annotation-arrow").addClass("activebtncolor"); |
257 | 301 | } |
258 | 302 | $rootScope.DrawText = function () { |
303 | + $rootScope.setListManagerZindex = true; | |
259 | 304 | $("#canvasPaint").css("display", "block"); |
260 | 305 | $("#canvas").css("display", "block"); |
261 | 306 | $rootScope.switchCanvas(); |
... | ... | @@ -269,6 +314,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
269 | 314 | } |
270 | 315 | |
271 | 316 | $rootScope.DrawPolygon = function () { |
317 | + $rootScope.setListManagerZindex = true; | |
272 | 318 | $("#canvasPaint").css("display", "block"); |
273 | 319 | $("#canvas").css("display", "block"); |
274 | 320 | $rootScope.shapeType = "DrawPolygon"; |
... | ... | @@ -331,6 +377,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
331 | 377 | |
332 | 378 | // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); |
333 | 379 | |
380 | + //Edit Shape Style popup should open at it's default position | |
381 | + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top":"70px"}); | |
334 | 382 | |
335 | 383 | } |
336 | 384 | |
... | ... | @@ -339,13 +387,38 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
339 | 387 | document.getElementById('modelbackground').style.display = "block"; |
340 | 388 | //$("#editshapestyle").modal('show'); |
341 | 389 | document.getElementById('modeleditstyle').style.display = "block"; |
390 | + if ($('#modeleditstyle').css("display") == "block") { //Check if the modal is already showing | |
391 | + var previewOpacity = $('#imgOpacity').css("opacity"); | |
392 | + $('#slider-range-min-4 div.ui-slider-range-min').css("width", (previewOpacity*100) + "%"); | |
393 | + $('#slider-range-min-4 span.ui-slider-handle').css("left", (previewOpacity * 100) + "%"); | |
394 | + | |
395 | + }; | |
396 | + } | |
397 | + | |
398 | + | |
399 | + $rootScope.enableEditShapeTooltip = function () { | |
400 | + | |
401 | + $("#edit-block").addClass("custom-tooltip-annotation"); | |
402 | + $(".custom-tooltip-annotation").css('display', 'block'); | |
342 | 403 | |
343 | 404 | } |
344 | 405 | |
406 | + $rootScope.disableEditShapeTooltip = function () { | |
407 | + | |
408 | + $(".custom-tooltip-annotation").css('display', 'none'); | |
409 | + $("#edit-block").removeClass("custom-tooltip-annotation"); | |
410 | + | |
411 | + | |
412 | + } | |
413 | + | |
414 | + | |
345 | 415 | $rootScope.disableAnnotationToolBar = function () { |
346 | 416 | |
347 | 417 | document.getElementById('modelbackground').style.display = "none"; |
348 | 418 | document.getElementById('modeleditstyle').style.display = "none"; |
419 | + //Edit Shape Style popup should open at it's default position | |
420 | + $("#modeleditstyle").css({"left":"40%", "right":"0", "top":"70px"}); | |
421 | + | |
349 | 422 | |
350 | 423 | } |
351 | 424 | |
... | ... | @@ -434,9 +507,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
434 | 507 | //list manager function |
435 | 508 | |
436 | 509 | //list manager function |
437 | - | |
510 | + | |
511 | + $rootScope.disableAnnotationtoolOnListManager = false; | |
438 | 512 | $rootScope.ShowListManager = function () { |
439 | 513 | console.log('ShowListManager') |
514 | + $rootScope.disableAnnotationtoolOnListManager = true; | |
440 | 515 | |
441 | 516 | $rootScope.isLoading = true; |
442 | 517 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -453,6 +528,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
453 | 528 | |
454 | 529 | $rootScope.CloseListManager = function () { |
455 | 530 | console.log('close') |
531 | + | |
532 | + $rootScope.disableAnnotationtoolOnListManager = false; | |
533 | + if ($rootScope.disableAnnotationtoolOnListManager == false) { | |
534 | + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); | |
535 | + $('#slider-range-min-2').slider('enable'); | |
536 | + } | |
456 | 537 | //$rootScope.isListManagerSelected = false; |
457 | 538 | $('#listManager').css('display', 'none'); |
458 | 539 | $("#listManager").css("visibility", "hidden"); |
... | ... | @@ -616,7 +697,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
616 | 697 | //localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); |
617 | 698 | |
618 | 699 | //4. |
619 | - $rootScope.reloadChildController(); | |
700 | + //$rootScope.reloadChildController(); | |
701 | + | |
702 | + var len = $rootScope.openModules.length; | |
703 | + if (len > 0) { | |
704 | + $rootScope.reloadChildController(); | |
705 | + } | |
706 | + else | |
707 | + { | |
708 | + $('#modal-settings').modal('hide'); | |
709 | + } | |
620 | 710 | |
621 | 711 | }; |
622 | 712 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/AOD/AOD-view.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | |
5 | 5 | |
6 | 6 | <div class="row tab-content" style="padding-left:25px; width:99%"> |
7 | - <div role="tabpanel" class="tab-pane active" id="grid-view"> | |
7 | + <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view"> | |
8 | 8 | <div class="col-sm-3 col-lg-2"> |
9 | 9 | <div class="thumbnail"> |
10 | 10 | <a href="clinical-animations-details.html"> |
... | ... | @@ -220,7 +220,7 @@ |
220 | 220 | |
221 | 221 | |
222 | 222 | </div> |
223 | - <div role="tabpanel" class="tab-pane" id="list-view"> | |
223 | + <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view"> | |
224 | 224 | <div class="col-sm-12 table-responsive "> |
225 | 225 | <table class="table table-hover table-condensed bg-white"> |
226 | 226 | <thead> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="col-sm-12 stickey-area clsstickydiv"> |
7 | 7 | <div class="breadcrumb"> |
8 | 8 | <div class="row center-block"> |
9 | - <h5 class="text-center text-primary txt-white f15">Display Image By</h5> | |
9 | + <h5 class="text-center text-primary txt-white f15">Display Animation By</h5> | |
10 | 10 | <div class="col-sm-2"> </div> |
11 | 11 | <div class="col-md-2 col-sm-4 pad-lftrgt3"> |
12 | 12 | <div class="form-group"> |
... | ... | @@ -43,9 +43,9 @@ |
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | <div class="row tab-content" style="padding-left:25px; width:99%"> |
46 | - <div role="tabpanel" class="tab-pane active" id="grid-view"> | |
46 | + <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view"> | |
47 | 47 | </div> |
48 | - <div role="tabpanel" class="tab-pane" id="list-view"> | |
48 | + <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view"> | |
49 | 49 | <div class="panel col-sm-12 table-responsive" style="padding-left:0px; padding-right:0; margin-left:11px; margin-bottom:0; width:99%;"> |
50 | 50 | <table class="table table-hover table-fixed bg-white table-txt12" style="padding-left:25px; width:100%;"> |
51 | 51 | <thead class="clstheadca"> |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | </td> |
89 | 89 | </tr> |
90 | 90 | <tr ng-if="typeof(searchCAListViewData) == 'undefined' || searchCAListViewData == null || searchCAListViewData == ''"> |
91 | - <td colspan="3"><strong style="color:red;">No animation found for the selected search criteria!</strong></td> | |
91 | + <td colspan="3"><strong style="color:black;">No animation found for the selected search criteria!</strong></td> | |
92 | 92 | </tr> |
93 | 93 | </tbody> |
94 | 94 | </table> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
... | ... | @@ -59,32 +59,33 @@ |
59 | 59 | |
60 | 60 | <div class="row tab-content" style="padding-left:25px; width:99%"> |
61 | 61 | |
62 | - <div role="tabpanel" class="tab-pane active" id="grid-view"> | |
63 | - <!--<div ng-if="!filterstring" ng-repeat="item in selectedCIListViewData"> | |
64 | - <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> | |
65 | - <div class="thumbnail"> | |
66 | - <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> | |
67 | - <div class="caption"> | |
68 | - <p>{{item._Title}}</p> | |
69 | - </div> | |
62 | + <!--<div role="tabpanel" class="tab-pane active" id="grid-view">--> | |
63 | + <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view"> | |
64 | + <!--<div ng-if="!filterstring" ng-repeat="item in selectedCIListViewData"> | |
65 | + <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> | |
66 | + <div class="thumbnail"> | |
67 | + <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> | |
68 | + <div class="caption"> | |
69 | + <p>{{item._Title}}</p> | |
70 | 70 | </div> |
71 | 71 | </div> |
72 | 72 | </div> |
73 | + </div> | |
73 | 74 | |
74 | - <div ng-if="filterstring" ng-repeat="item in searchCIListViewData"> | |
75 | - <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> | |
76 | - <div class="thumbnail"> | |
77 | - <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> | |
78 | - <div class="caption"> | |
79 | - <p>{{item._Title}}</p> | |
80 | - </div> | |
75 | + <div ng-if="filterstring" ng-repeat="item in searchCIListViewData"> | |
76 | + <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> | |
77 | + <div class="thumbnail"> | |
78 | + <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> | |
79 | + <div class="caption"> | |
80 | + <p>{{item._Title}}</p> | |
81 | 81 | </div> |
82 | 82 | </div> |
83 | - </div>--> | |
84 | - | |
85 | - </div> | |
83 | + </div> | |
84 | + </div>--> | |
86 | 85 | |
87 | - <div role="tabpanel" class="tab-pane" id="list-view"> | |
86 | +</div> | |
87 | + <!--<div role="tabpanel" class="tab-pane" id="list-view">--> | |
88 | + <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view"> | |
88 | 89 | <!--<div class="col-sm-12 table-responsive">--> |
89 | 90 | <div class="panel col-sm-12 table-responsive" style="padding-left:0px; padding-right:0; margin-left:11px; margin-bottom:0; width:99%;"> |
90 | 91 | <!--<table class="table table-hover table-condensed bg-white" style="padding-left:25px; width:99%">--> |
... | ... | @@ -143,7 +144,7 @@ |
143 | 144 | </td> |
144 | 145 | </tr> |
145 | 146 | <tr ng-if="typeof(searchCIListViewData) == 'undefined' || searchCIListViewData == null || searchCIListViewData == ''"> |
146 | - <td colspan="6"><strong style="color:red;">No illustration found for the selected search criteria!</strong></td> | |
147 | + <td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td> | |
147 | 148 | </tr> |
148 | 149 | </tbody> |
149 | 150 | </table> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -54,6 +54,7 @@ |
54 | 54 | .tooltip-custom + .tooltip > .tooltip-arrow { |
55 | 55 | display: none; |
56 | 56 | } |
57 | + | |
57 | 58 | .customTooltip { |
58 | 59 | background: #333 !important; |
59 | 60 | color: #fff !important; |
... | ... | @@ -142,37 +143,37 @@ |
142 | 143 | <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;"></div> |
143 | 144 | <div class="" style="top:20px"> |
144 | 145 | <div class="col-sm-6"> |
145 | - <button id="btnIdentity" class="btn btn-primary btn-sm tooltip-custom" ng-click="OnIdentityClick()" data-toggle="tooltip" data-placement="bottom" title="Identify"> <img src="content/images/icon-identity.png" alt=""></button> | |
146 | + <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> | |
146 | 147 | </div> |
147 | 148 | <div class="col-sm-6 pull-right"> |
148 | - <button class="btn btn-black btn-sm pull-right tooltip-custom" ng-click="enableZoom()" data-toggle="tooltip" data-placement="bottom" title="Zoom-in/Zoom-out"> | |
149 | + <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"> | |
149 | 150 | <img src="content/images/icon-zoom.png" alt=""> |
150 | 151 | </button> |
151 | - | |
152 | + | |
152 | 153 | </div> |
153 | 154 | <div class="col-sm-12"> |
154 | - <button id="btnTranparency" class="btn btn-black btn-sm btn-block marginTop5 tooltip-custom" ng-click="createTransparencyBox()" data-toggle="tooltip" data-placement="bottom" title="Transparency Box"><img src="content/images/icon-transparency.png" alt=""></button> | |
155 | + <button id="btnTranparency" class="btn btn-black btn-sm btn-block marginTop5 tooltip-custom" onclick="onTboxCreation()" data-toggle="tooltip" data-placement="bottom" title="Transparency Box"><img src="content/images/icon-transparency.png" alt=""></button> | |
155 | 156 | </div> |
156 | - | |
157 | - | |
157 | + | |
158 | + | |
158 | 159 | <div class="col-sm-6"> |
159 | - <button id="btnNormalMode" class="btn btn-primary btn-sm marginTop5 tooltip-custom" ng-click="enableNormalMode()" data-toggle="tooltip" data-placement="bottom" title="Normal"> <img src="content/images/bulb1.png" alt=""></button> | |
160 | + <button id="btnNormalMode" class="btn btn-primary btn-sm marginTop5 tooltip-custom" onclick="OnEnableNormalMode()" data-toggle="tooltip" data-placement="bottom" title="Normal"> <img src="content/images/bulb1.png" alt=""></button> | |
160 | 161 | </div> |
161 | 162 | <div class="col-sm-6"> |
162 | - <button id="btnExtract" class="btn btn-black btn-sm pull-right marginTop5 tooltip-custom" ng-click="enableExtract()" data-toggle="tooltip" data-placement="bottom" title="Extract"><img src="content/images/bulb1.png" alt=""></button> | |
163 | + <button id="btnExtract" class="btn btn-black btn-sm pull-right marginTop5 tooltip-custom" onclick="OnEnableExtract()" data-toggle="tooltip" data-placement="bottom" title="Extract"><img src="content/images/bulb1.png" alt=""></button> | |
163 | 164 | </div> |
164 | - | |
165 | + | |
165 | 166 | <div class="col-sm-6"> |
166 | - <button id="btnHighLight" class="btn btn-black btn-sm marginTop5 tooltip-custom btn-resize" ng-click="enableHighlight()" data-toggle="tooltip" data-placement="bottom" title="Highlight"> <img src="content/images/bulb.png" alt=""></button> | |
167 | + <button id="btnHighLight" class="btn btn-black btn-sm marginTop5 tooltip-custom btn-resize" onclick="OnEnableHighlight()" data-toggle="tooltip" data-placement="bottom" title="Highlight"> <img src="content/images/bulb.png" alt=""></button> | |
167 | 168 | </div> |
168 | - | |
169 | + | |
169 | 170 | <div class="col-sm-6 dropdown hover-tool"> |
170 | 171 | <div class="custom-tooltip">Highlight Options</div> |
171 | 172 | <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" ng-click="LoadBodySystemData()"><img src="content/images/icon-highlight.png" alt="" title=""></button> |
172 | 173 | <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
173 | 174 | <li ng-class="CurrentStructure"><a href="#" title="Current Structure">Current Structure</a></li> |
174 | 175 | <li role="separator" class="divider"></li> |
175 | - <li ng-class="Cardiovascular"><a href="#" title="Cardiovascular" id="1" ng-click="HighlightBodyByBodySystem($event)">Cardiovascular</a></li> | |
176 | + <!--<li ng-class="Cardiovascular"><a href="#" title="Cardiovascular" id="1" ng-click="HighlightBodyByBodySystem($event)">Cardiovascular</a></li> | |
176 | 177 | <li ng-class="Digestive"><a href="#" title="Digestive" id="2" ng-click="HighlightBodyByBodySystem($event)">Digestive</a></li> |
177 | 178 | <li ng-class="Endocrine"><a href="#" title="Endocrine" id="3" ng-click="HighlightBodyByBodySystem($event)">Endocrine</a></li> |
178 | 179 | <li ng-class="Immune"><a href="#" title="Immune" id="4" ng-click="HighlightBodyByBodySystem($event)">Immune</a></li> |
... | ... | @@ -183,46 +184,97 @@ |
183 | 184 | <li ng-class="Reproductive"><a href="#" title="Reproductive" id="9" ng-click="HighlightBodyByBodySystem($event)">Reproductive</a></li> |
184 | 185 | <li ng-class="Respiratory"><a href="#" title="Respiratory" id="10" ng-click="HighlightBodyByBodySystem($event)">Respiratory</a></li> |
185 | 186 | <li ng-class="Skeletal"><a href="#" title="Skeletal" id="11" ng-click="HighlightBodyByBodySystem($event)">Skeletal</a></li> |
186 | - <li ng-class="Urinary"><a href="#" title="Urinary" id="12" ng-click="HighlightBodyByBodySystem($event)">Urinary</a></li> | |
187 | + <li ng-class="Urinary"><a href="#" title="Urinary" id="12" ng-click="HighlightBodyByBodySystem($event)">Urinary</a></li>--> | |
188 | + | |
189 | + <li ng-class="Cardiovascular"><a href="#" title="Cardiovascular" id="1" onclick="OnBodySystemSelection(event)">Cardiovascular</a></li> | |
190 | + <li ng-class="Digestive"><a href="#" title="Digestive" id="2" onclick="OnBodySystemSelection(event)">Digestive</a></li> | |
191 | + <li ng-class="Endocrine"><a href="#" title="Endocrine" id="3" onclick="OnBodySystemSelection(event)">Endocrine</a></li> | |
192 | + <li ng-class="Immune"><a href="#" title="Immune" id="4" onclick="OnBodySystemSelection(event)">Immune</a></li> | |
193 | + <li ng-class="Integumentary"><a href="#" title="Integumentary" id="5" onclick="OnBodySystemSelection(event)">Integumentary</a></li> | |
194 | + <li ng-class="Lymphatic"><a href="#" title="Lymphatic" id="6" onclick="OnBodySystemSelection(event)">Lymphatic</a></li> | |
195 | + <li ng-class="Muscular"><a href="#" title="Muscular" id="7" onclick="OnBodySystemSelection(event)">Muscular</a></li> | |
196 | + <li ng-class="Nervous"><a href="#" title="Nervous" id="8" onclick="OnBodySystemSelection(event)">Nervous</a></li> | |
197 | + <li ng-class="Reproductive"><a href="#" title="Reproductive" id="9" onclick="OnBodySystemSelection(event)">Reproductive</a></li> | |
198 | + <li ng-class="Respiratory"><a href="#" title="Respiratory" id="10" onclick="OnBodySystemSelection(event)">Respiratory</a></li> | |
199 | + <li ng-class="Skeletal"><a href="#" title="Skeletal" id="11" onclick="OnBodySystemSelection(event)">Skeletal</a></li> | |
200 | + <li ng-class="Urinary"><a href="#" title="Urinary" id="12" onclick="OnBodySystemSelection(event)">Urinary</a></li> | |
187 | 201 | </ul> |
188 | 202 | </div> |
189 | 203 | |
190 | - | |
204 | + | |
191 | 205 | <div class="col-sm-6 hover-gender-tool" ng-init="switchGender()"> |
192 | 206 | <div class=" custom-tooltip1">Gender</div> |
193 | 207 | <button class="btn btn-black btn-sm marginTop5 dropdown-toggle" type="button" id="dropdownMenu4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <i class=" fa fa-intersex font16"></i></button> |
194 | 208 | <ul class="dropdown-menu" aria-labelledby="dropdownMenu3"> |
195 | - <li ng-class="male"><a href="#" title="Male" ng-click="OnGenderChange($event)">Male</a></li> | |
196 | - <li ng-class="female"><a href="#" title="Female" ng-click="OnGenderChange($event)">Female</a></li> | |
209 | + <li ng-class="male"> | |
210 | + <!--<button type="button" id="btnMale" onclick="OnGenderChange('Male')" class="btn btn-link" >Male</button>--> | |
211 | + <a href="#" title="Male" onclick="OnGenderChange(event)">Male</a> | |
212 | + </li> | |
213 | + <li ng-class="female"> | |
214 | + | |
215 | + <!--<button type="button" id="btnFemale" onclick="OnGenderChange('Female')" class="btn btn-link">Female</button>--> | |
216 | + <a href="#" title="Female" onclick="OnGenderChange(event)">Female</a> | |
217 | + | |
218 | + <!--<a href="javascript:void(0)" title="Male" ng-click="OnGenderChange($event)">Male</a></li> | |
219 | + <li ng-class="female"><a href="javascript:void(0)" title="Female" ng-click="OnGenderChange($event)">Female</a></li>--> | |
220 | + </li> | |
197 | 221 | </ul> |
198 | 222 | </div> |
199 | 223 | |
200 | - | |
201 | - | |
202 | - | |
203 | 224 | <div class="col-sm-6 tooltip-View-custom"> |
204 | 225 | <div class="custom-tooltip2">View</div> |
205 | 226 | <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><img src="content/images/view.png" alt="" title=""></button> |
206 | 227 | <ul class="dropdown-menu" aria-labelledby="dropdownMenu3"> |
207 | - <li ng-class="AnteriorView"><a href="#" title="Anterior" ng-click="OnViewChange($event)">Anterior</a></li> | |
228 | + <!--<li ng-class="AnteriorView"><a href="#" title="Anterior" ng-click="OnViewChange($event)">Anterior</a></li> | |
208 | 229 | <li ng-class="LateralView"><a href="#" title="Lateral" ng-click="OnViewChange($event)">Lateral</a></li> |
209 | 230 | <li ng-class="MedialView"><a href="#" title="Medial" ng-click="OnViewChange($event)">Medial</a></li> |
210 | 231 | <li ng-class="PosteriorView"><a href="#" title="Posterior" ng-click="OnViewChange($event)">Posterior</a></li> |
211 | 232 | <li ng-class="LateralArmView"><a href="#" title="Lateral Arm" ng-click="OnViewChange($event)">Lateral Arm</a></li> |
212 | - <li ng-class="MedialArmView"><a href="#" title="Medial Arm" ng-click="OnViewChange($event)">Medial Arm</a></li> | |
233 | + <li ng-class="MedialArmView"><a href="#" title="Medial Arm" ng-click="OnViewChange($event)">Medial Arm</a></li>--> | |
234 | + | |
235 | + <li ng-class="AnteriorView"><a href="#" title="Anterior" onclick="OnViewChange(event)">Anterior</a></li> | |
236 | + <li ng-class="LateralView"><a href="#" title="Lateral" onclick="OnViewChange(event)">Lateral</a></li> | |
237 | + <li ng-class="MedialView"><a href="#" title="Medial" onclick="OnViewChange(event)">Medial</a></li> | |
238 | + <li ng-class="PosteriorView"><a href="#" title="Posterior" onclick="OnViewChange(event)">Posterior</a></li> | |
239 | + <li ng-class="LateralArmView"><a href="#" title="Lateral Arm" onclick="OnViewChange(event)">Lateral Arm</a></li> | |
240 | + <li ng-class="MedialArmView"><a href="#" title="Medial Arm" onclick="OnViewChange(event)">Medial Arm</a></li> | |
213 | 241 | </ul> |
214 | 242 | </div> |
215 | - | |
243 | + | |
216 | 244 | |
217 | 245 | <div class="col-sm-12"> |
218 | - <button id="btnStrutureBox" ng-click="enableShowHideStructureBox()" class="btn btn-primary btn-sm marginTop5 btn-block tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Show/Hide Structure Name Boxes"> <img src="content/images/comment-box.png" alt=""></button> | |
246 | + <button id="btnStrutureBox" onclick="enableShowHideStructureBox()" class="btn btn-primary btn-sm marginTop5 btn-block tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Show/Hide Structure Name Boxes"> <img src="content/images/comment-box.png" alt=""></button> | |
219 | 247 | </div> |
220 | - | |
248 | + | |
221 | 249 | </div> |
222 | 250 | <div class=""> |
223 | - <p> | |
251 | + | |
252 | + | |
253 | + <!--'x' button is displaying inside the input box in IE browser.--> | |
254 | + <div style="width:80px;margin:10px 0 0 15px;display:inline-block;"> | |
255 | + <div style="width: 58px; float: left;"> | |
256 | + <input type="text" class="form-control item" id="txtlayerNumber" value="0" ng-model="layerNumber" ng-keyup="LayerValueChangeBasedOnKeyUp($event)" ng-keydown="LayerChangeBasedOnKeyPressed($event)" style="height:32px;border-radius:0;"> | |
257 | + </div> | |
258 | + <div style="width: 22px; float: left;"> | |
259 | + <div style="width: 100%; float: left; height: 16px;"> | |
260 | + <button type="button" id="incrmntVal" ng-click="LayerChangeOnMouseUpDown($event)" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;"> | |
261 | + | |
262 | + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png" /> | |
263 | + </button> | |
264 | + </div> | |
265 | + <div style="width: 100%; float: left; height: 16px;"> | |
266 | + <button type="button" id="deccrmntVal" ng-click="LayerChangeOnMouseUpDown($event)" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;"> | |
267 | + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png" /> | |
268 | + </button> | |
269 | + </div> | |
270 | + </div> | |
271 | + | |
272 | + </div> | |
273 | + | |
274 | + | |
275 | + <!--<p> | |
224 | 276 | <input class="item" type="number" id="txtlayerNumber" value="0" step="1" min="0" style="width:80px; margin:10px 0 0 15px;" ng-model="layerNumber" ng-keydown="LayerChangeBasedOnKeyPressed($event)" ng-click="LayerChangeOnMouseUpDown($event)" /> |
225 | - </p> | |
277 | + </p>--> | |
226 | 278 | <div id="layerChangeSlider" style="height:140px;" class="vert_slider " ng-model="layerNumber"></div> |
227 | 279 | </div> |
228 | 280 | </div> |
... | ... | @@ -233,14 +285,15 @@ |
233 | 285 | <div class=""> |
234 | 286 | <div class="input-group col-sm-8 col-xs-7 col-md-10 pull-left"> |
235 | 287 | |
236 | - <input type="text" class="form-control input-sm pull-left" id="typedtermname" ng-blur="HideSearch()" ng-click="ShowSearch()" ng-dblclick="ShowSearch()" ng-model="searchFilter" ng-change="textChange(searchFilter)" placeholder="Search..."> | |
288 | + <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..."> | |
237 | 289 | |
238 | 290 | <div id="backdrop" ng-show="IsSearchVisible"> |
239 | 291 | <div class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left"> |
240 | 292 | <!--#Bug 6591--> |
241 | 293 | <ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:1000;"> |
242 | 294 | <li ng-repeat="item in VocabTermTxt| filter:{ _TermText: searchFilter}"> |
243 | - <a id="{{item._ActualTermNumber}}" href="" ng-click="jumpToTerm($event)">{{item._TermText}}</a> | |
295 | + <!--<a id="{{item._ActualTermNumber}}" href="" ng-click="jumpToTerm($event)">{{item._TermText}}</a>--> | |
296 | + <a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a> | |
244 | 297 | </li> |
245 | 298 | </ul> |
246 | 299 | </div> |
... | ... | @@ -280,7 +333,7 @@ |
280 | 333 | <div class="row"> |
281 | 334 | <div id="canvasDiv" class="col-sm-12 img-thumbnail" align="center"> |
282 | 335 | <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas> |
283 | - <canvas id="canvas" ng-click="doClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas> | |
336 | + <canvas id="canvas" ng-click="BindCanvasDrawingListners($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas> | |
284 | 337 | </div> |
285 | 338 | <!--<div id="canvasDiv" style=" width: 95% !important;top:0px;overflow:scroll;background-color:white;">--> |
286 | 339 | <!--<div id="daLoaderLabel">Loading....</div>--> |
... | ... | @@ -334,7 +387,7 @@ |
334 | 387 | <div> |
335 | 388 | <div> |
336 | 389 | <div class="modal-header annotation-modal-header"> |
337 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseTransparencyBox()"><span aria-hidden="true">×</span></button> | |
390 | + <button id="btnTBoxClose" type="button" onclick="onTboxClose()" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
338 | 391 | <h4>Transparency</h4> |
339 | 392 | </div> |
340 | 393 | <div> |
... | ... | @@ -362,6 +415,29 @@ |
362 | 415 | });</script> |
363 | 416 | <script> |
364 | 417 | $(function () { |
418 | + | |
419 | + | |
420 | + var regExp = /[0-9\.\,]/; | |
421 | + $('#txtlayerNumber').on('keydown keyup', function (e) { | |
422 | + var value = String.fromCharCode(e.which) || e.key; | |
423 | + // Only numbers, dots and commas | |
424 | + if (!regExp.test(value) | |
425 | + && e.which != 188 // , | |
426 | + && e.which != 190 // . | |
427 | + && e.which != 8 // backspace | |
428 | + && e.which != 46 // delete | |
429 | + && (e.which < 37 // arrow keys | |
430 | + || e.which > 40) | |
431 | + && (e.keyCode < 96 // Dissectible Anatomy > Num Lock is not working for enter the layer. | |
432 | + || e.keyCode > 105)) | |
433 | + | |
434 | + { | |
435 | + e.preventDefault(); | |
436 | + return false; | |
437 | + } | |
438 | + }); | |
439 | + | |
440 | + | |
365 | 441 | $("#layerChangeSlider").slider({ |
366 | 442 | orientation: "vertical", |
367 | 443 | range: "max", // <--- needed... | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
... | ... | @@ -9,8 +9,14 @@ |
9 | 9 | <ul class="listgrid-view" role="tablist"> |
10 | 10 | <!--<li role="presentation" class="active" title="Image View"><a href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab" class="" ><i class=" fa fa-image"></i></a></li> |
11 | 11 | <li role="presentation" title="List View"><a href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab" class="" ><i class="fa fa-list-alt"></i></a></li>--> |
12 | - <li role="presentation" class="active" title="Image View"><i class=" fa fa-image txt-white cur-pot" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li> | |
13 | - <li role="presentation" title="List View"><i class="fa fa-list-alt txt-white cur-pot" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li> | |
12 | + | |
13 | + <!--Working--> | |
14 | + <!--<li role="presentation" class="active" title="Image View"><i class=" fa fa-image txt-white cur-pot" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li> | |
15 | + <li role="presentation" title="List View"><i class="fa fa-list-alt txt-white cur-pot" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li>--> | |
16 | + | |
17 | + <li role="presentation" ng-class="{'active':activeTab==1}" title="Image View"><i class=" fa fa-image txt-white cur-pot" ng-click="setActiveTab(1)" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li> | |
18 | + <li role="presentation" ng-class="{'active':activeTab==2}" title="List View"><i class="fa fa-list-alt txt-white cur-pot" ng-click="setActiveTab(2)" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li> | |
19 | + | |
14 | 20 | </ul> |
15 | 21 | </div> |
16 | 22 | </div> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... | ... | @@ -22,16 +22,20 @@ |
22 | 22 | <li><a href="#">Print Priview</a></li> |
23 | 23 | </ul> |
24 | 24 | </li> |
25 | - <li><a href="#" data-toggle="modal" data-target=".bs-example-modal-sm" ng-click="ShowAnnotationWindow()">Annotation</a></li> | |
25 | + <!--#7904--> | |
26 | + <li><a href="#" data-toggle="modal" id="annotationButton" data-target=".bs-example-modal-sm" ng-click="ShowAnnotationWindow()">Annotation</a></li> | |
27 | + | |
26 | 28 | <li class="dropdown"> |
27 | 29 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Options<span class="caret"></span></a> |
28 | 30 | <ul class="dropdown-menu"> |
29 | 31 | <!--<li><a href="#" ng-click="ShowListManager()">List Manager</a></li>--> |
30 | 32 | |
31 | 33 | <li><a href="#" ng-click="ShowListManager()">List Manager</a></li> |
32 | - <li><a href="#" ng-click="ShowAnnotationWindow()">Annotation Toolbar</a></li> | |
34 | + <!--#7904--> | |
35 | + <li><a href="#" id="annotationToolBarOptions" ng-click="ShowAnnotationWindow()">Annotation Toolbar</a></li> | |
36 | + | |
33 | 37 | <li><a href="#">Add to Existing Curriculum</a></li> |
34 | - <li><a data-toggle="modal" data-target="#modal-settings" class="cursor-pointer">Settings</a></li> | |
38 | + <li><a ng-click="ShowSettingWindow()" class="cursor-pointer">Settings</a></li> | |
35 | 39 | <li role="separator" class="divider"></li> |
36 | 40 | <li><a href="#">Lab Exercises PDF</a></li> |
37 | 41 | </ul> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/data/json/ca/ca_dat_contentlist.json
... | ... | @@ -248,6 +248,7 @@ |
248 | 248 | "_Video": "ca_vid_3392.flv", |
249 | 249 | "_ThumbnailImage": "ca_tni_3392.jpg", |
250 | 250 | "_BodySystem": "Reproductive", |
251 | + "_BodyRegion": "None", | |
251 | 252 | "_MedicalSpecialty": "Obstetrics and Gynecology (OB/GYN)", |
252 | 253 | "_Summary": "This animations shows the process of Intracytoplasmic sperm injection (ICSI), a procedure used to fertilize an egg cell outside of the body.", |
253 | 254 | "_LowerSummary": "Intracytoplasmic sperm injection, or ICSI, is a form of in vitro fertilization in which fertilization occurs outside of the body. First, egg cells are harvested and transferred to a special media in a laboratory dish. Within a few hours, a single sperm is injected through a fine needle into the center of an egg cell to aid in the process of fertilization. If successful, the cell will divide and form the beginning stages of an embryo. If necessary, the DNA of a single cell from an embryo may be checked to ensure that various genetic disorders are not present. Typically, several egg cells are harvested and fertilized at the same time then inserted back into the uterus to increase the chances that one will implant and develop into a successful pregnancy." | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/data/json/ca/ca_dat_contentlist_mp4link.json
... | ... | @@ -248,6 +248,7 @@ |
248 | 248 | "_Video": "http://aia5.adam.com/graphics/Multimedia/en/200061/200061.mp4", |
249 | 249 | "_ThumbnailImage": "ca_tni_3392.jpg", |
250 | 250 | "_BodySystem": "Reproductive", |
251 | + "_BodyRegion": "None", | |
251 | 252 | "_MedicalSpecialty": "Obstetrics and Gynecology (OB/GYN)", |
252 | 253 | "_Summary": "This animations shows the process of Intracytoplasmic sperm injection (ICSI), a procedure used to fertilize an egg cell outside of the body.", |
253 | 254 | "_LowerSummary": "Intracytoplasmic sperm injection, or ICSI, is a form of in vitro fertilization in which fertilization occurs outside of the body. <BodyRegion/><BodyRegion/>First, egg cells are harvested and transferred to a special media in a laboratory dish. Within a few hours, a single sperm is injected through a fine needle into the center of an egg cell to aid in the process of fertilization. If successful, the cell will divide and form the beginning stages of an embryo. If necessary, the DNA of a single cell from an embryo may be checked to ensure that various genetic disorders are not present. <BodyRegion/><BodyRegion/>Typically, several egg cells are harvested and fertilized at the same time then inserted back into the uterus to increase the chances that one will implant and develop into a successful pregnancy." | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/images/DA/angle-down.png
0 → 100644
210 Bytes
400-SOURCECODE/AIAHTML5.Web/content/images/DA/angle-up.png
0 → 100644
313 Bytes
400-SOURCECODE/AIAHTML5.Web/index.html
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en" ng-cloak ng-app="AIA"> |
3 | 3 | <head> |
4 | - <base href="/AIA/" /> | |
5 | - <!--<base href="/" />--> | |
4 | + <!--<base href="/AIAHTML5/" />--> | |
5 | + <!--<base href="/AIA/" />--> | |
6 | + <base href="/" /> | |
6 | 7 | <meta charset="utf-8"> |
7 | 8 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
8 | 9 | <!--<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">--> |
... | ... | @@ -13,6 +14,7 @@ |
13 | 14 | |
14 | 15 | |
15 | 16 | |
17 | + | |
16 | 18 | <link href="themes/default/css/bootstrap/3.3.6/main.css" rel="stylesheet" /> |
17 | 19 | |
18 | 20 | <link href="themes/default/css/bootstrap/3.3.6/secondeffect.css" rel="stylesheet" /> |
... | ... | @@ -20,7 +22,7 @@ |
20 | 22 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> |
21 | 23 | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,400italic"> |
22 | 24 | |
23 | - <link rel="styleSheet" href="themes/default/css/uigrid/ui-grid.min.css" /> | |
25 | + <!--<link rel="styleSheet" href="themes/default/css/uigrid/ui-grid.min.css" />--> | |
24 | 26 | |
25 | 27 | <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> |
26 | 28 | <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
... | ... | @@ -39,6 +41,37 @@ |
39 | 41 | |
40 | 42 | <!--Annotation Toolbar: Jcanvas--> |
41 | 43 | <style> |
44 | + | |
45 | + /*.ActiveDefaultColorAnnotation { | |
46 | + background-color: #000000!important; | |
47 | + }*/ | |
48 | + .ActiveFormattingButtonClass { | |
49 | + background-color: #1B92D0 !important; | |
50 | + } | |
51 | + | |
52 | + .Edittext-btn-css { | |
53 | + background: #4B4B4B; | |
54 | + padding: 4px; | |
55 | + cursor: pointer; | |
56 | + margin-right: 2px; | |
57 | + } | |
58 | + | |
59 | + /*.italic-btn-css { | |
60 | + background: #4B4B4B; | |
61 | + padding: 4px; | |
62 | + cursor: pointer; | |
63 | + margin-right: 2px; | |
64 | + }*/ | |
65 | + | |
66 | + .underline-btn-css { | |
67 | + background: #4B4B4B; | |
68 | + padding: 4px; | |
69 | + cursor: pointer; | |
70 | + margin-right: 5px; | |
71 | + } | |
72 | + | |
73 | + | |
74 | + | |
42 | 75 | .activebtncolor { |
43 | 76 | background-color: #1B92D0 !important; |
44 | 77 | border-color: #1B92D0 !important; |
... | ... | @@ -74,6 +107,26 @@ |
74 | 107 | color: #000; |
75 | 108 | border-radius: 0; |
76 | 109 | } |
110 | + | |
111 | + /*7931*/ | |
112 | + .custom-tooltip-annotation-edit { | |
113 | + background-color: #fff; | |
114 | + border: 0 none; | |
115 | + color: #000; | |
116 | + left: 80px; | |
117 | + opacity: 0.9; | |
118 | + padding: 3px 0; | |
119 | + position: absolute; | |
120 | + text-align: center; | |
121 | + bottom: 50px; | |
122 | + width: 120px; | |
123 | + display: none; | |
124 | + z-index: 10000; | |
125 | + border: 1px solid #000; | |
126 | + color: #000; | |
127 | + border-radius: 0; | |
128 | + } | |
129 | + | |
77 | 130 | </style> |
78 | 131 | |
79 | 132 | |
... | ... | @@ -401,25 +454,25 @@ |
401 | 454 | </div> |
402 | 455 | |
403 | 456 | <!--Annotation Modal--> |
404 | - <div class="annotationTollbar" style="position:fixed;top:80px;right:20px;display:none;z-index:1200000;"> | |
457 | + <div class="annotationTollbar" style="width: 300px;position: fixed; top: 80px; right: 20px; display: none; z-index: 1200000;"> | |
405 | 458 | <div class="annotationbar"> |
406 | 459 | <div class="modal-content"> |
407 | 460 | <div class="modal-header annotation-modal-header"> |
408 | 461 | <button type="button" class="close" aria-label="Close" ng-click="CloseAnnotationTool()"><span aria-hidden="true">×</span></button> |
409 | 462 | <h4 class="modal-title" id="myModalLabel">Annotation</h4> |
410 | 463 | </div> |
411 | - <div class="modal-body"> | |
464 | + <div class="modal-body" id="AnnotaionPopupDiv" > | |
412 | 465 | <div class="row"> |
413 | 466 | <div class="col-sm-12"> |
414 | 467 | <h5>Mode</h5> |
415 | 468 | |
416 | 469 | <div class="btn-group btn-group-justified" role="group" aria-label="..."> |
417 | 470 | <div class="btn-group" role="group" tooltip> |
418 | - <div id="identify-block" style="display: none; font-size:13px;">Identify Mode</div> | |
419 | - <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button> | |
471 | + <div id="identify-block" style="display: none; font-size:13px;">Identify Mode</div> | |
472 | + <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button> | |
420 | 473 | </div> |
421 | 474 | <div class="btn-group" role="group"> |
422 | - <div id="draw-block" style="display: none; font-size: 13px;">Draw Mode</div> | |
475 | + <div id="draw-block" style="display: none; font-size: 13px;">Draw Mode</div> | |
423 | 476 | <button id="DrawMode" type="button" ng-click="DrawingMode()" class="btn btn-sm btn-success">Draw</button> |
424 | 477 | </div> |
425 | 478 | </div> |
... | ... | @@ -431,12 +484,12 @@ |
431 | 484 | <div class="" role="" aria-label="..."> |
432 | 485 | <div class="" role="group" align="center"> |
433 | 486 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" data-toggle="tooltip" data-placement="top" title="Select Shapes(S)" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button> |
434 | - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" data-toggle="tooltip" data-placement="top" title="Draw Pin" ng-click="DrawPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> | |
487 | + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" data-toggle="tooltip" data-placement="top" title="Draw Pin" ng-click="DrPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> | |
435 | 488 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" data-toggle="tooltip" data-placement="top" title="Draw Arrow" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button> |
436 | 489 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" data-toggle="tooltip" data-placement="top" title="Draw Text" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button> |
437 | 490 | </div> |
438 | 491 | <div class="" role="group" align="center"> |
439 | - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" data-toggle="tooltip" data-placement="top" title="Draw Line" ng-click="DrawLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> | |
492 | + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" data-toggle="tooltip" data-placement="top" title="Draw Line" ng-click="DrLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> | |
440 | 493 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" data-toggle="tooltip" data-placement="top" title="Draw Rectangle" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button> |
441 | 494 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" data-toggle="tooltip" data-placement="top" title="Draw Circle" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button> |
442 | 495 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" data-toggle="tooltip" data-placement="top" title="Draw Polygon" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button> |
... | ... | @@ -444,15 +497,19 @@ |
444 | 497 | </div> |
445 | 498 | </div> |
446 | 499 | <div class="well-popup well"> |
447 | - <img src="content/images/blank-shape.jpg" alt="..." class="img-rounded img-responsive" ng-click="enableAnnotationToolBar()"> | |
500 | + <!--#7931--> | |
501 | + | |
502 | + <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div> | |
503 | + <img id="OnEdtShape" src="content/images/blank-shape.jpg" alt="..." class="img-rounded img-responsive" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()"> | |
504 | + | |
448 | 505 | </div> |
449 | 506 | <div class="well well-popup"> |
450 | 507 | <div class="" role="group" aria-label="..."> |
451 | 508 | <div> |
452 | 509 | <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" id="paintLine" data-toggle="tooltip" data-placement="top" title="Paint" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></button> |
453 | 510 | <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" data-toggle="tooltip" data-placement="top" title="Erase" ng-click="EraseDrawing()"><i class="fa fa-eraser"></i></button> |
454 | - <div class="marginL2 pull-left"><input type="number" id="amount-2" step="1" style="width:60px;" min="1" max="60" oninput="Brushsize(this)"></div> | |
455 | - <div class="pull-left" style="width:45%; margin-left:2%;"> | |
511 | + <div class="marginL2 pull-left"><input type="number" id="amount-2" step="1" style="width:60px;height:21px;" min="1" max="60" oninput="Brushsize(this)"></div> | |
512 | + <div class="pull-left" style="width:45%; margin-left:2%;margin-top:5px;"> | |
456 | 513 | <div id="slider-range-min-2"></div> |
457 | 514 | </div> |
458 | 515 | <div class="clearfix"></div> |
... | ... | @@ -511,14 +568,14 @@ |
511 | 568 | <option>72</option> |
512 | 569 | </select> |
513 | 570 | <span style="vertical-align:middle;"> |
514 | - <span id="text-bold" style="background: #4B4B4B;padding:4px;cursor:pointer;margin-right:2px;"> | |
571 | + <span id="text-bold" class="Edittext-btn-css"> | |
515 | 572 | <i aria-hidden="true" class="fa fa-bold" style="color: #fff"></i> |
516 | 573 | </span> |
517 | - <span id="text-italic" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 2px;"> | |
574 | + <span id="text-italic" class="Edittext-btn-css"> | |
518 | 575 | <i class="fa fa-italic" aria-hidden="true" style="color: #fff"></i> |
519 | 576 | |
520 | 577 | </span> |
521 | - <span id="text-underline" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 5px;"> | |
578 | + <span id="text-underline" class="underline-btn-css"> | |
522 | 579 | <i class="fa fa-underline" aria-hidden="true" style="color: #fff"></i> |
523 | 580 | </span> |
524 | 581 | </span> |
... | ... | @@ -529,15 +586,15 @@ |
529 | 586 | </div> |
530 | 587 | |
531 | 588 | <span style="vertical-align:middle;"> |
532 | - <span id="text-left" style="background: #4B4B4B;padding:4px;cursor:pointer;margin-right:2px;"> | |
589 | + <span id="text-left" class="Edittext-btn-css"> | |
533 | 590 | <i aria-hidden="true" class="fa fa-align-left" style="color: #fff"></i> |
534 | 591 | </span> |
535 | - <span id="text-center" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 2px;"> | |
592 | + <span id="text-center" class="Edittext-btn-css"> | |
536 | 593 | <i class="fa fa-align-center" aria-hidden="true" style="color: #fff"></i> |
537 | 594 | |
538 | 595 | |
539 | 596 | </span> |
540 | - <span id="text-right" style="background: #4B4B4B; padding: 4px; cursor: pointer; margin-right: 5px;"> | |
597 | + <span id="text-right" class="underline-btn-css"> | |
541 | 598 | <i class="fa fa-align-right" aria-hidden="true" style="color: #fff"></i> |
542 | 599 | |
543 | 600 | |
... | ... | @@ -550,8 +607,9 @@ |
550 | 607 | <textarea class="form-control" id="text_area" rows="3" style="font-family: 'Verdana, sans-serif';font-size:14px; font-weight: normal; font-style: normal; color: #000; text-align: left; text-decoration: none;"></textarea> |
551 | 608 | </div> |
552 | 609 | <div class="modal-footer"> |
553 | - <button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">Close</button> | |
554 | - <button type="button" id="saveBtn" class="btn btn-primary" data-dismiss="modal" ng-click="saveText()">Save</button> | |
610 | + <!--<button type="button" class="btn btn-default" ng-click="closeModal()" data-dismiss="modal">Close</button>--> | |
611 | + <button type="button" class="btn btn-default" id="closeEditText" data-dismiss="modal">Close</button> | |
612 | + <button type="button" id="saveBtn" class="btn btn-primary" data-dismiss="modal" ng-click="saveText()">Save</button> | |
555 | 613 | </div> |
556 | 614 | </div> |
557 | 615 | </div> |
... | ... | @@ -679,7 +737,7 @@ |
679 | 737 | <!--Edit Shape Modal--> |
680 | 738 | |
681 | 739 | |
682 | - <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white; height: 433px; width: 302px;position:absolute;left:40%;top:70px;"> | |
740 | + <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white; height: 433px; width: 302px;position:absolute;left:40%;right:0;top:70px;"> | |
683 | 741 | <div class="modal-content"> |
684 | 742 | <div class="modal-header annotation-modal-header"> |
685 | 743 | <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> |
... | ... | @@ -1143,12 +1201,14 @@ |
1143 | 1201 | <script type="text/javascript"> |
1144 | 1202 | $(function () { |
1145 | 1203 | var colpick = $('.demo').each(function () { |
1204 | + | |
1146 | 1205 | $(this).minicolors({ |
1147 | 1206 | control: $(this).attr('data-control') || 'hue', |
1148 | 1207 | inline: $(this).attr('data-inline') === 'true', |
1149 | 1208 | letterCase: 'lowercase', |
1150 | 1209 | opacity: false, |
1151 | 1210 | change: function (hex, opacity) { |
1211 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").removeClass("ActiveDefaultColorAnnotation"); | |
1152 | 1212 | if (!hex) return; |
1153 | 1213 | if (opacity) hex += ', ' + opacity; |
1154 | 1214 | try { |
... | ... | @@ -1181,41 +1241,83 @@ |
1181 | 1241 | |
1182 | 1242 | $("#text-left").on('click', function () { |
1183 | 1243 | |
1244 | + //Annotation: Formatting buttons color is not change when select. | |
1245 | + | |
1246 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
1247 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
1248 | + $("#text-left").addClass("ActiveFormattingButtonClass"); | |
1184 | 1249 | $("#text_area").css("text-align", "left"); |
1185 | 1250 | |
1251 | + | |
1186 | 1252 | }); |
1187 | 1253 | |
1188 | 1254 | |
1189 | 1255 | $("#text-center").on('click', function () { |
1190 | 1256 | |
1257 | + //Annotation: Formatting buttons color is not change when select. | |
1258 | + | |
1259 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | |
1260 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
1261 | + $("#text-center").addClass("ActiveFormattingButtonClass"); | |
1191 | 1262 | $("#text_area").css("text-align", "center"); |
1192 | 1263 | |
1264 | + | |
1193 | 1265 | }); |
1194 | 1266 | |
1195 | 1267 | |
1196 | 1268 | $("#text-right").on('click', function () { |
1197 | 1269 | |
1198 | - $("#text_area").css("text-align", "right"); | |
1270 | + //Annotation: Formatting buttons color is not change when select. | |
1199 | 1271 | |
1272 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | |
1273 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | |
1274 | + $("#text-right").addClass("ActiveFormattingButtonClass"); | |
1275 | + $("#text_area").css("text-align", "right"); | |
1200 | 1276 | }); |
1201 | 1277 | |
1202 | 1278 | |
1203 | 1279 | $("#text-bold").on('click', function () { |
1204 | 1280 | |
1205 | - $("#text_area").css("font-weight", "bold"); | |
1281 | + //Annotation: Formatting buttons color is not change when select. | |
1282 | + $("#text-bold").toggleClass("ActiveFormattingButtonClass"); | |
1283 | + | |
1284 | + if ($("#text-bold").hasClass("ActiveFormattingButtonClass")) { | |
1285 | + $("#text_area").css("font-weight", "bold"); | |
1286 | + } | |
1287 | + else { | |
1288 | + $("#text_area").css("font-weight", "normal"); | |
1289 | + } | |
1290 | + | |
1206 | 1291 | |
1207 | 1292 | }); |
1208 | 1293 | |
1209 | 1294 | $("#text-italic").on('click', function () { |
1210 | 1295 | |
1211 | - $("#text_area").css("font-style", "italic"); | |
1296 | + //Annotation: Formatting buttons color is not change when select. | |
1297 | + $("#text-italic").toggleClass("ActiveFormattingButtonClass"); | |
1298 | + if ($("#text-italic").hasClass("ActiveFormattingButtonClass")) { | |
1299 | + $("#text_area").css("font-style", "italic"); | |
1300 | + } | |
1301 | + else { | |
1302 | + $("#text_area").css("font-style", "normal"); | |
1303 | + } | |
1304 | + | |
1212 | 1305 | |
1213 | 1306 | }); |
1214 | 1307 | |
1215 | 1308 | $("#text-underline").on('click', function () { |
1216 | 1309 | |
1217 | - $("#text_area").css("text-decoration", "underline"); | |
1310 | + //Annotation: Formatting buttons color is not change when select. | |
1311 | + $("#text-underline").toggleClass("ActiveFormattingButtonClass"); | |
1312 | + | |
1313 | + if ($("#text-underline").hasClass("ActiveFormattingButtonClass")) { | |
1314 | + $("#text_area").css("text-decoration", "underline"); | |
1315 | + } | |
1316 | + else { | |
1317 | + $("#text_area").css("text-decoration", "none"); | |
1318 | + } | |
1218 | 1319 | |
1320 | + | |
1219 | 1321 | }); |
1220 | 1322 | |
1221 | 1323 | |
... | ... | @@ -1240,6 +1342,8 @@ |
1240 | 1342 | |
1241 | 1343 | <script> |
1242 | 1344 | $(document).ready(function () { |
1345 | + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
1346 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | |
1243 | 1347 | var borderWidth = 1; |
1244 | 1348 | var borderColor = "#000"; |
1245 | 1349 | $("#borderWidthCanvasElement").change(function () { |
... | ... | @@ -1255,9 +1359,10 @@ |
1255 | 1359 | } |
1256 | 1360 | }); |
1257 | 1361 | |
1362 | + | |
1258 | 1363 | |
1259 | 1364 | $('.borderColorCanvasPreview').each(function () { |
1260 | - | |
1365 | + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | |
1261 | 1366 | $(this).minicolors({ |
1262 | 1367 | control: $(this).attr('data-control') || 'hue', |
1263 | 1368 | defaultValue: $(this).attr('data-defaultValue') || '', |
... | ... | @@ -1273,8 +1378,8 @@ |
1273 | 1378 | if (opacity) value += ', ' + opacity; |
1274 | 1379 | if (typeof console === 'object') { |
1275 | 1380 | console.log(value); |
1276 | - | |
1277 | - borderColor = value; | |
1381 | + | |
1382 | + borderColor = value; | |
1278 | 1383 | $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); |
1279 | 1384 | |
1280 | 1385 | |
... | ... | @@ -1283,12 +1388,12 @@ |
1283 | 1388 | theme: 'bootstrap' |
1284 | 1389 | }); |
1285 | 1390 | |
1391 | + | |
1286 | 1392 | }); |
1287 | 1393 | |
1288 | 1394 | |
1289 | - | |
1290 | 1395 | $('.outerBackgroundColor').each(function () { |
1291 | - | |
1396 | + | |
1292 | 1397 | $(this).minicolors({ |
1293 | 1398 | control: $(this).attr('data-control') || 'hue', |
1294 | 1399 | defaultValue: $(this).attr('data-defaultValue') || '', |
... | ... | @@ -1316,8 +1421,7 @@ |
1316 | 1421 | |
1317 | 1422 | }); |
1318 | 1423 | </script> |
1319 | - | |
1320 | - | |
1424 | + | |
1321 | 1425 | <script> |
1322 | 1426 | $(function () { |
1323 | 1427 | $("#slider-range-min-3").slider({ |
... | ... | @@ -1349,7 +1453,7 @@ |
1349 | 1453 | max: 1, |
1350 | 1454 | step: .1, |
1351 | 1455 | slide: function (event, ui) { |
1352 | - | |
1456 | + | |
1353 | 1457 | $(".marginTopBtm10 img.imgopacity").css("opacity", ui.value); |
1354 | 1458 | // $("#slider-value").html(ui.value); |
1355 | 1459 | |
... | ... | @@ -1391,9 +1495,21 @@ |
1391 | 1495 | $("#draw-block").removeClass("custom-tooltip-annotation"); |
1392 | 1496 | }); |
1393 | 1497 | |
1498 | + //#7931 | |
1499 | + $("#OnEdtShape").on('mouseover', function () { | |
1500 | + $("#edit-block").addClass("custom-tooltip-annotation-edit"); | |
1501 | + $(".custom-tooltip-annotation-edit").css('display', 'block'); | |
1502 | + | |
1503 | + }).on('mouseout', function () { | |
1504 | + | |
1505 | + $(".custom-tooltip-annotation-edit").css('display', 'none'); | |
1506 | + $("#edit-block").removeClass("custom-tooltip-annotation-edit"); | |
1507 | + }); | |
1508 | + | |
1394 | 1509 | }); |
1395 | 1510 | </script> |
1396 | 1511 | |
1512 | + | |
1397 | 1513 | |
1398 | 1514 | |
1399 | 1515 | </body> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... | ... | @@ -523,9 +523,11 @@ footer.dark { |
523 | 523 | .navbar-inverse .navbar-nav > li > a { |
524 | 524 | color: #FFFFFF; |
525 | 525 | } |
526 | -.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { | |
526 | +/*#7904*/ | |
527 | +.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus, .navbar-nav > li > a.active { | |
527 | 528 | color: #2db0f5; |
528 | 529 | } |
530 | + | |
529 | 531 | ul.right0 { |
530 | 532 | right: 0!important; |
531 | 533 | left: auto; |
... | ... | @@ -853,4 +855,12 @@ cursor:pointer; |
853 | 855 | .modeleditstyle |
854 | 856 | { |
855 | 857 | display:none; |
858 | +} | |
859 | + /*#7904*/ | |
860 | +.dropdown-menu > li > a.active{background-color:#0095da;color:#fff;text-decoration:none;} | |
861 | + | |
862 | + | |
863 | +.annotationtoolbartab | |
864 | + { | |
865 | + background:#626c34 !important; | |
856 | 866 | } |
857 | 867 | \ No newline at end of file | ... | ... |