Commit 93cbf6de89a51b42623dca99e1336a6b04f5c89f
1 parent
4b4a3cf8
open resource for adam image
Showing
19 changed files
with
1451 additions
and
773 deletions
400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
... | ... | @@ -52307,6 +52307,7 @@ |
52307 | 52307 | <ItemGroup> |
52308 | 52308 | <Content Include="themes\default\css\bootstrap\fonts\glyphicons-halflings-regular.svg" /> |
52309 | 52309 | <Content Include="themes\default\scripts\bootstrap\3.3.5\bootstrap.js" /> |
52310 | + <Content Include="themes\default\scripts\bootstrap\3.3.5\ui-bootstrap-tpls-0.3.0.min.js" /> | |
52310 | 52311 | <Content Include="themes\default\scripts\bootstrap\3.3.6\bootstrap.js" /> |
52311 | 52312 | <Content Include="themes\default\scripts\bootstrap\3.3.6\bootstrap.min.js" /> |
52312 | 52313 | <Content Include="themes\default\scripts\bootstrap\3.3.6\npm.js" /> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
1 | 1 | AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile", "$timeout", "ModuleService", "$interval", |
2 | 2 | function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile, $timeout, ModuleService, $interval) { |
3 | 3 | |
4 | - $scope.initialize3DWindowData = function (windowviewid, isOpenWithExistsModule, cbwindowid) { | |
5 | - if (isOpenWithExistsModule || cbwindowid == 0) { | |
4 | + $scope.initialize3DWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { | |
5 | + if (isOpenWithExistsModule || openPanelNo == 0) { | |
6 | 6 | if ($rootScope.TheeDWindowData != undefined) { |
7 | 7 | $rootScope.TheeDWindowData.length = 0; |
8 | 8 | } |
... | ... | @@ -133,6 +133,11 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
133 | 133 | if (index != -1) { |
134 | 134 | // remove module which one is loaded |
135 | 135 | $scope.TheeDWindowData.splice(index, 1); |
136 | + if ($('#' + panelid).html() != undefined) { | |
137 | + | |
138 | + $('#' + panelid).remove(); | |
139 | + | |
140 | + } | |
136 | 141 | $rootScope.resetjsPanelTop(); |
137 | 142 | } |
138 | 143 | } |
... | ... | @@ -146,6 +151,18 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
146 | 151 | |
147 | 152 | $rootScope.MULTI_VIEW_ID += 1 |
148 | 153 | |
154 | + // store exist module in module service | |
155 | + var ExistData = ModuleService.getModuleData("THREE_D_ANATOMY"); | |
156 | + | |
157 | + if (ExistData != undefined && ExistData.length > 0) { | |
158 | + // clear all module data before open new module in cb | |
159 | + ModuleService.ClearWinDataByModule(ExistData.mType); | |
160 | + } | |
161 | + var newWindowData = { | |
162 | + "mType": 'THREE_D_ANATOMY', | |
163 | + }; | |
164 | + ModuleService.setModuleData(newWindowData, 0); | |
165 | + | |
149 | 166 | $scope.initialize3DWindowData($rootScope.MULTI_VIEW_ID, true, undefined); |
150 | 167 | |
151 | 168 | $scope.DisableUI(); |
... | ... | @@ -236,8 +253,6 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
236 | 253 | |
237 | 254 | window.parent.AIAModuleOpenResourceInfo(ThreeDopenData); |
238 | 255 | |
239 | - window.parent.closeIFrame(); | |
240 | - | |
241 | 256 | } |
242 | 257 | else |
243 | 258 | { |
... | ... | @@ -285,12 +300,10 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
285 | 300 | $scope.wincount = 1; |
286 | 301 | var winlen = $scope.ThreeDModuleData.length; |
287 | 302 | var timeint = null; |
288 | - var slideId = ""; | |
289 | 303 | timeint = $interval(function () { |
290 | 304 | |
291 | 305 | if ($scope.readyToLoad == true) { |
292 | 306 | var windata = $scope.ThreeDModuleData[$scope.wincount - 1]; |
293 | - slideId = windata.slideId; | |
294 | 307 | $scope.Open3DModelBody(windata); |
295 | 308 | |
296 | 309 | } |
... | ... | @@ -303,7 +316,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
303 | 316 | |
304 | 317 | if ($scope.wincount == winlen && $rootScope.ThreeDWindowLoadComplete == true) { |
305 | 318 | $scope.stopInterval(); |
306 | - $scope.$emit("LoadModuleComplete", "THREE_D_ANATOMY", slideId); | |
319 | + $scope.$emit("LoadModuleComplete", "THREE_D_ANATOMY"); | |
307 | 320 | } |
308 | 321 | |
309 | 322 | |
... | ... | @@ -408,7 +421,7 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
408 | 421 | |
409 | 422 | } |
410 | 423 | else { |
411 | - $scope.jsPanelWidth = $(window).outerWidth() - 10; | |
424 | + $scope.jsPanelWidth = $(window).outerWidth() - 20; | |
412 | 425 | $scope.jsPanelHeight = $(window).outerHeight() - 105; |
413 | 426 | $scope.jsPanelLeft = 1; |
414 | 427 | $scope.jsPanelTop = 70; |
... | ... | @@ -465,9 +478,10 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
465 | 478 | |
466 | 479 | if ($rootScope.isCallFromOtherModule) { |
467 | 480 | |
468 | - $scope.JsPanelMouseEnter(windowviewid); | |
481 | + // $scope.JsPanelMouseEnter(windowviewid); | |
469 | 482 | $rootScope.ThreeDWindowLoadComplete = true; |
470 | 483 | } |
484 | + $scope.JsPanelMouseEnter(windowviewid); | |
471 | 485 | |
472 | 486 | } |
473 | 487 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
1 | -AIA.controller("AIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "DataService", "AIAConstants", | |
2 | -function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, DataService, AIAConstants) { | |
3 | - // $rootScope.currentActiveModuleTitle = pages[3].name; | |
1 | +AIA.controller("AIController", ["$scope", "$window", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "pages", "DataService", "AIAConstants","ModuleService", "$interval", | |
2 | +function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout, pages, DataService, AIAConstants, ModuleService, $interval) { | |
4 | 3 | $scope.showTabButton = true; |
5 | - $scope.IllustrationData; | |
6 | - $scope.searchAIListViewData = []; | |
7 | 4 | $scope.SelectedAIthumbImage = []; |
8 | 5 | $scope.SelectedAIImage = []; |
9 | 6 | $scope.SelectedAIId = []; |
... | ... | @@ -17,22 +14,227 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
17 | 14 | SearchTextByAlphabet: '', |
18 | 15 | SelectedDiv: '' |
19 | 16 | }; |
20 | - var Count = 200; | |
21 | - localStorage.setItem("ImageCount", Count); | |
17 | + | |
18 | + | |
19 | + $scope.numPerImage = 100; | |
20 | + $scope.maxSize = 5; | |
21 | + $scope.totalimage =0; | |
22 | + | |
23 | + $scope.numPages = function () { | |
24 | + return Math.ceil($scope.totalimage / $scope.numPerImage); | |
25 | + }; | |
26 | + | |
27 | + $scope.$watch('currentPage + numPerPage', function () { | |
28 | + var begin = (($scope.currentPage - 1) * $scope.numPerImage) | |
29 | + , end = begin + $scope.numPerImage; | |
30 | + | |
31 | + if ($scope.filterstring) | |
32 | + { | |
33 | + | |
34 | + if ($scope.AllsearchAIViewData != undefined) { | |
35 | + localStorage.setItem("currentpage", $scope.currentPage); | |
36 | + if ($scope.activeTab == 1) { | |
37 | + $scope.searchAIImageViewData = $scope.AllsearchAIViewData.slice(begin, end); | |
38 | + } | |
39 | + else { | |
40 | + $scope.searchAIListViewData = $scope.AllsearchAIViewData.slice(begin, end); | |
41 | + } | |
42 | + } | |
43 | + } | |
44 | + else | |
45 | + { | |
46 | + | |
47 | + if ($scope.AllAIListViewData != undefined) { | |
48 | + localStorage.setItem("currentpage", $scope.currentPage); | |
49 | + $scope.selectedAIListViewData = $scope.AllAIListViewData.slice(begin, end); | |
50 | + } | |
51 | + | |
52 | + } | |
53 | + | |
54 | + }); | |
55 | + | |
56 | + | |
22 | 57 | var searchByText = $rootScope.getLocalStorageValue("SearchText"); |
23 | 58 | var searchTextByAlphabet = $rootScope.getLocalStorageValue("SearchByAlphabet"); |
24 | 59 | var SelectCurrTab = $rootScope.getLocalStorageValue("currentAITabView"); |
25 | 60 | |
61 | + $scope.initializeAIWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { | |
62 | + if (isOpenWithExistsModule || openPanelNo == 0) { | |
63 | + if ($rootScope.AIWindowData != undefined) { | |
64 | + $rootScope.AIWindowData.length = 0; | |
65 | + } | |
66 | + else { | |
67 | + $rootScope.AIWindowData = []; | |
68 | + } | |
69 | + | |
70 | + $rootScope.AIWindowData.push( | |
71 | + { | |
72 | + 'multiwinid': windowviewid, | |
73 | + 'IllustrationData': [], | |
74 | + 'searchAIListViewData': [], | |
75 | + 'ImageCount':200, | |
76 | + 'AIImagePath': '', | |
77 | + 'moduleName': '', | |
78 | + 'currentViewTitle': '', | |
79 | + 'parentSlugName': '', | |
80 | + 'currentSlug': '', | |
81 | + 'imageId': '', | |
82 | + 'imageName': '', | |
83 | + }); | |
84 | + | |
85 | + } | |
86 | + else { | |
87 | + var isNewWindow = true; | |
88 | + for (var k = 0; k < $rootScope.AIWindowData.length; k++) { | |
89 | + if ($rootScope.AIWindowData[k].multiwinid == windowviewid) { | |
90 | + isNewWindow = false; | |
91 | + break; | |
92 | + } | |
93 | + } | |
94 | + | |
95 | + if (isNewWindow) { | |
96 | + $rootScope.AIWindowData.push( | |
97 | + { | |
98 | + 'multiwinid': windowviewid, | |
99 | + 'IllustrationData': [], | |
100 | + 'searchAIListViewData': [], | |
101 | + 'ImageCount': 200, | |
102 | + 'AIImagePath': '', | |
103 | + 'moduleName': '', | |
104 | + 'currentViewTitle': '', | |
105 | + 'parentSlugName': '', | |
106 | + 'currentSlug': '', | |
107 | + 'imageId': '', | |
108 | + 'imageName': '', | |
109 | + }); | |
110 | + | |
111 | + } | |
112 | + } | |
113 | + } | |
114 | + | |
115 | + $scope.GetAIwindowStoreData = function (windowviewid, keyname) { | |
116 | + for (var x = 0 ; x < $rootScope.AIWindowData.length; x++) { | |
117 | + | |
118 | + if ($rootScope.AIWindowData[x].multiwinid == windowviewid) { | |
119 | + return $rootScope.AIWindowData[x][keyname]; | |
120 | + } | |
121 | + } | |
122 | + } | |
123 | + | |
124 | + $scope.SetAIwindowStoreData = function (windowviewid, keyname, value) { | |
125 | + for (var x = 0 ; x < $rootScope.AIWindowData.length; x++) { | |
126 | + | |
127 | + if ($rootScope.AIWindowData[x].multiwinid == windowviewid) { | |
128 | + $rootScope.AIWindowData[x][keyname] = value; | |
129 | + } | |
130 | + } | |
131 | + } | |
132 | + | |
133 | + $rootScope.GetAIWindowId = function () { | |
134 | + // handle for single window | |
135 | + if ($rootScope.AIWindowData.length > 0) { | |
136 | + for (var x = 0 ; x < $rootScope.AIWindowData.length; x++) { | |
137 | + | |
138 | + return $rootScope.AIWindowData[x].multiwinid; | |
139 | + } | |
140 | + } | |
141 | + else return 0; | |
142 | + } | |
143 | + | |
144 | + $scope.DisableUI = function () { | |
145 | + | |
146 | + var aiImagePanelConetent = document.getElementsByClassName("jsPanel-content"); | |
147 | + for (var i = 0; i < aiImagePanelConetent.length; i++) { | |
148 | + aiImagePanelConetent[i].style.pointerEvents = "none"; | |
149 | + aiImagePanelConetent[i].style.opacity = "0.7"; | |
150 | + | |
151 | + } | |
152 | + $rootScope.isLoading = true; | |
153 | + $('#spinner').css('visibility', 'visible'); | |
154 | + | |
155 | + // CB module disable all | |
156 | + $('#CBDetailPageDiv').css('pointer-events', 'none'); | |
157 | + $('#CBDetailPageDiv').css('opacity', '0.7'); | |
158 | + | |
159 | + //$('#imgParent').css('z-index', '1'); | |
160 | + //document.getElementById("imgParent").style.pointerEvents = "none"; | |
161 | + //document.getElementById("imgParent").style.opacity = "0.5"; | |
162 | + } | |
163 | + | |
164 | + $scope.EnableUI = function () { | |
165 | + | |
166 | + var aiImagePanelConetent = document.getElementsByClassName("jsPanel-content"); | |
167 | + for (var i = 0; i < aiImagePanelConetent.length; i++) { | |
168 | + aiImagePanelConetent[i].style.pointerEvents = "auto"; | |
169 | + aiImagePanelConetent[i].style.opacity = "1"; | |
170 | + } | |
171 | + | |
172 | + $rootScope.isLoading = false; | |
173 | + $('#spinner').css('visibility', 'hidden'); | |
174 | + // CB module enable all | |
175 | + $('#CBDetailPageDiv').css('pointer-events', 'auto'); | |
176 | + $('#CBDetailPageDiv').css('opacity', '1'); | |
177 | + | |
178 | + //document.getElementById("imgParent").style.pointerEvents = "auto"; | |
179 | + //document.getElementById("imgParent").style.opacity = "1.0"; | |
180 | + } | |
181 | + | |
182 | + $scope.PanelActivity = function () { | |
183 | + | |
184 | + $("#" + $scope.jsPanelID).resize(function (event) { | |
185 | + //work on it | |
186 | + // alert('test'); | |
187 | + }); | |
188 | + // close panel | |
189 | + $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
190 | + | |
191 | + var panelid = $(event.target).parent().parent().parent().parent().attr('id'); | |
192 | + | |
193 | + var len = (panelid).split("_").length; | |
194 | + var windowviewid = (panelid).split("_")[len - 1]; | |
195 | + | |
196 | + // remove old stored data after close panel | |
197 | + for (var index = 0 ; index < $rootScope.AIWindowData.length; index++) { | |
198 | + | |
199 | + if ($rootScope.AIWindowData[index].multiwinid == windowviewid) { | |
200 | + | |
201 | + if (index != -1) { | |
202 | + // remove module which one is loaded | |
203 | + $scope.AIWindowData.splice(index, 1); | |
204 | + if ($('#' + panelid).html() != undefined) { | |
205 | + | |
206 | + $('#' + panelid).remove(); | |
207 | + | |
208 | + } | |
209 | + $rootScope.resetjsPanelTop(); | |
210 | + } | |
211 | + } | |
212 | + } | |
213 | + | |
214 | + }); | |
215 | + } | |
26 | 216 | //Modified code by sandeep for fixed Bugs of ADAM Images |
27 | - $scope.setActiveTab = function (tabToSet, inderectCall) { | |
28 | - | |
217 | + $scope.setActiveTab = function (tabToSet, inderectCall, windowviewid) { | |
218 | + if (windowviewid == undefined) | |
219 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
220 | + $scope.DisableUI(); | |
29 | 221 | $scope.activeTab = tabToSet; |
30 | - localStorage.setItem("currentAITabView", ""); | |
222 | + | |
223 | + var pretab = $rootScope.getLocalStorageValue("currentAITabView"); | |
224 | + | |
225 | + if (pretab != tabToSet) { | |
226 | + $scope.currentPage = 1; | |
227 | + localStorage.setItem("currentpage", $scope.currentPage); | |
228 | + } | |
229 | + else { | |
230 | + $scope.currentPage = parseInt($rootScope.getLocalStorageValue("currentpage")); | |
231 | + } | |
232 | + | |
31 | 233 | localStorage.setItem("currentAITabView", $scope.activeTab); |
32 | - var ImageCount = $rootScope.getLocalStorageValue("ImageCount"); | |
234 | + var ImageCount = $scope.GetAIwindowStoreData(windowviewid, 'ImageCount'); | |
33 | 235 | var searchText = $rootScope.getLocalStorageValue("SearchText"); |
34 | 236 | var SearchByAlphabet = $rootScope.getLocalStorageValue("SearchByAlphabet"); |
35 | - | |
237 | + $scope.hiderow = false; | |
36 | 238 | if (tabToSet == 2) { |
37 | 239 | var curSelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId"); |
38 | 240 | $('#' + $rootScope.getLocalStorageValue("currentAIImageId")).addClass("selected"); |
... | ... | @@ -40,46 +242,46 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
40 | 242 | $scope.idSelected = $rootScope.getLocalStorageValue("currentAIImageId"); |
41 | 243 | var selectedImageId = $rootScope.getLocalStorageValue("currentAIImageId"); |
42 | 244 | if (searchText != '' && searchText != null && searchText != undefined) { |
43 | - $scope.ApplySearch(searchText); | |
245 | + $scope.ApplySearch(searchText, windowviewid); | |
44 | 246 | if (inderectCall == true) { |
45 | 247 | if (curSelectedRowId != "") { |
46 | - $scope.showItem(curSelectedRowId); | |
248 | + $scope.showItem(curSelectedRowId, windowviewid); | |
47 | 249 | } |
48 | 250 | } else { |
49 | 251 | if (selectedImageId != "") { |
50 | 252 | $scope.filterstring = false; |
51 | - $scope.showItem(selectedImageId); | |
253 | + $scope.showItem(selectedImageId, windowviewid); | |
52 | 254 | $scope.filterstring = true; |
53 | 255 | } |
54 | - //$scope.ReloadListViewImageDiv(curSelectedRowId, ImageCount); | |
256 | + | |
55 | 257 | } |
56 | 258 | } |
57 | 259 | else if (SearchByAlphabet != "" && SearchByAlphabet != null && SearchByAlphabet != undefined) { |
58 | - $scope.ApplySearchByAlphabet(SearchByAlphabet); | |
260 | + $scope.ApplySearchByAlphabet(SearchByAlphabet, windowviewid); | |
59 | 261 | if (inderectCall == true) { |
60 | 262 | if (curSelectedRowId != "") { |
61 | - $scope.showItem(curSelectedRowId); | |
263 | + $scope.showItem(curSelectedRowId, windowviewid); | |
62 | 264 | } |
63 | 265 | } else { |
64 | 266 | if (selectedImageId != "") { |
65 | 267 | $scope.filterstring = false; |
66 | - $scope.showItem(selectedImageId); | |
268 | + $scope.showItem(selectedImageId, windowviewid); | |
67 | 269 | $scope.filterstring = true; |
68 | 270 | } |
69 | 271 | } |
70 | 272 | } |
71 | 273 | else { |
72 | - $scope.loadAllAI(ImageCount); | |
274 | + $scope.loadAllAI(ImageCount, windowviewid); | |
73 | 275 | if (inderectCall == true) { |
74 | 276 | if (curSelectedRowId != "") { |
75 | 277 | $scope.filterstring = true; |
76 | - $scope.showItem(curSelectedRowId); | |
278 | + $scope.showItem(curSelectedRowId, windowviewid); | |
77 | 279 | $scope.filterstring = false; |
78 | 280 | } |
79 | 281 | } else { |
80 | 282 | if (selectedImageId != "") { |
81 | 283 | $scope.filterstring = false; |
82 | - $scope.showItem(selectedImageId); | |
284 | + $scope.showItem(selectedImageId, windowviewid); | |
83 | 285 | } |
84 | 286 | } |
85 | 287 | } |
... | ... | @@ -95,13 +297,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
95 | 297 | |
96 | 298 | //Modified Code by sandeep for fixed bug-45300 |
97 | 299 | if (searchText != '' && searchText != null && searchText != undefined) { |
98 | - $scope.ApplySearch(searchText); | |
300 | + $scope.ApplySearch(searchText, windowviewid); | |
99 | 301 | } |
100 | 302 | else if (SearchByAlphabet != "" && SearchByAlphabet != null && SearchByAlphabet != undefined) { |
101 | - $scope.ApplySearchByAlphabet(SearchByAlphabet); | |
303 | + $scope.ApplySearchByAlphabet(SearchByAlphabet, windowviewid); | |
102 | 304 | } |
103 | 305 | else { |
104 | - $scope.loadAllAI(ImageCount); | |
306 | + $scope.loadAllAI(ImageCount, windowviewid); | |
105 | 307 | } |
106 | 308 | |
107 | 309 | $('#grid-view').css("display", "block"); |
... | ... | @@ -110,26 +312,42 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
110 | 312 | |
111 | 313 | setTimeout(function () { |
112 | 314 | $scope.setImgPosition(); |
113 | - }, 100); | |
315 | + }, 500); | |
114 | 316 | |
115 | 317 | }; |
116 | 318 | |
117 | 319 | $scope.loadAIModuleById = function (moduleId) { |
118 | - | |
320 | + $rootScope.isCallFromOtherModule = undefined; | |
321 | + $rootScope.MULTI_VIEW_ID += 1; | |
322 | + | |
323 | + $scope.DisableUI(); | |
324 | + | |
325 | + // store exist module in module service | |
326 | + var ExistData = ModuleService.getModuleData("ADAM_IMAGES"); | |
327 | + | |
328 | + if (ExistData != undefined && ExistData.length > 0) { | |
329 | + // clear all module data before open new module in cb | |
330 | + ModuleService.ClearWinDataByModule(ExistData.mType); | |
331 | + } | |
332 | + var newWindowData = { | |
333 | + "mType": 'ADAM_IMAGES', | |
334 | + }; | |
335 | + ModuleService.setModuleData(newWindowData, 0); | |
336 | + | |
337 | + $scope.initializeAIWindowData($rootScope.MULTI_VIEW_ID, true, undefined); | |
338 | + | |
119 | 339 | if ($rootScope.checkRefreshButtonClick == 1) { |
120 | 340 | var query = $scope.query; |
121 | - $scope.Reset(query); | |
341 | + $scope.ResetCurrentModule(query, $rootScope.MULTI_VIEW_ID); | |
122 | 342 | $rootScope.checkRefreshButtonClick = 0; |
123 | 343 | } |
124 | - var ImageCount = $rootScope.getLocalStorageValue("ImageCount"); | |
344 | + var ImageCount = $scope.GetAIwindowStoreData($rootScope.MULTI_VIEW_ID, 'ImageCount'); | |
345 | + | |
125 | 346 | |
126 | 347 | if ($rootScope.refreshcheck == null) { |
127 | 348 | $location.path('/'); |
128 | 349 | } |
129 | 350 | |
130 | - // code that will be executed ... | |
131 | - // every time this view is loaded | |
132 | - | |
133 | 351 | //get current path |
134 | 352 | var currentURL = $location.path(); |
135 | 353 | var selectedModuleName = ''; |
... | ... | @@ -141,40 +359,41 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
141 | 359 | $rootScope.currentActiveModuleTitle = selectedModuleName; |
142 | 360 | }) |
143 | 361 | |
144 | - $scope.LoadAIJsonData(ImageCount); | |
362 | + $scope.SetAIwindowStoreData($rootScope.MULTI_VIEW_ID, 'moduleName', "Adam Images"); | |
363 | + | |
364 | + $scope.LoadAIJsonData(ImageCount, $rootScope.MULTI_VIEW_ID); | |
145 | 365 | $scope.scroll(); |
146 | 366 | //push the details of open module in array $rootScope.openModules |
147 | - $rootScope.openModules.push({ "ModuleId": 13 }); | |
148 | - | |
367 | + $rootScope.openModules.push({ "ModuleId": 13 }); | |
149 | 368 | //set the local storage |
150 | - var curtab = $rootScope.getLocalStorageValue("currentAITabView"); | |
151 | - var inderectCall = true; | |
152 | - if (curtab == 2) { | |
153 | - $scope.setActiveTab(2, inderectCall); | |
154 | - var curSelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId"); | |
155 | - if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { | |
156 | - $scope.reRunSearchOnLoad(); | |
157 | - $scope.idSelected = curSelectedRowId; | |
158 | - $scope.ReloadListViewImageDiv($scope.idSelected, ImageCount); | |
369 | + setTimeout(function () { | |
370 | + var curtab = $rootScope.getLocalStorageValue("currentAITabView"); | |
371 | + var inderectCall = true; | |
372 | + if (curtab == 2) { | |
373 | + $scope.setActiveTab(2, inderectCall); | |
374 | + var curSelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId"); | |
375 | + if (typeof (curSelectedRowId) !== "undefined" && curSelectedRowId !== null && curSelectedRowId !== '') { | |
376 | + $scope.reRunSearchOnLoad($rootScope.MULTI_VIEW_ID); | |
377 | + $scope.idSelected = curSelectedRowId; | |
378 | + $scope.ReloadListViewImageDiv($scope.idSelected, ImageCount, $rootScope.MULTI_VIEW_ID); | |
379 | + } | |
380 | + else { | |
381 | + $scope.reRunSearchOnLoad($rootScope.MULTI_VIEW_ID) | |
382 | + $scope.idSelected = ''; | |
383 | + } | |
159 | 384 | } |
160 | 385 | else { |
161 | - $scope.reRunSearchOnLoad() | |
162 | - $scope.idSelected = ''; | |
163 | - } | |
164 | - } | |
165 | - else { | |
166 | - $scope.setActiveTab(1, inderectCall); | |
167 | - $scope.reRunSearchOnLoad(); | |
168 | - } | |
169 | - | |
386 | + $scope.setActiveTab(1, inderectCall); | |
387 | + $scope.reRunSearchOnLoad($rootScope.MULTI_VIEW_ID); | |
388 | + } | |
389 | + }, 500); | |
170 | 390 | } |
171 | 391 | |
172 | - $scope.reRunSearchOnLoad = function () { | |
392 | + $scope.reRunSearchOnLoad = function (windowviewid) { | |
173 | 393 | |
174 | 394 | var searchByText = $rootScope.getLocalStorageValue("SearchText"); |
175 | 395 | var searchTextByAlphabet = $rootScope.getLocalStorageValue("SearchByAlphabet"); |
176 | - var ImageCount = $rootScope.getLocalStorageValue("ImageCount"); | |
177 | - | |
396 | + | |
178 | 397 | if (typeof (searchByText) !== "undefined" && searchByText !== null && searchByText !== '') { |
179 | 398 | $scope.query.SearchText = searchByText; |
180 | 399 | } |
... | ... | @@ -185,84 +404,71 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
185 | 404 | $scope.query.SearchTextByAlphabet = ""; |
186 | 405 | } |
187 | 406 | |
188 | - //if ($scope.query.SearchText == "" && $scope.query.SearchTextByAlphabet == "") { | |
189 | - | |
190 | - // $scope.loadAllAI(ImageCount); | |
191 | - //} | |
192 | - | |
193 | 407 | } |
194 | 408 | |
195 | - $scope.LoadAIJsonData = function (ImageCount) { | |
409 | + $scope.LoadAIJsonData = function (ImageCount, windowviewid) { | |
410 | + | |
196 | 411 | $('ul li span').removeAttr("style"); |
412 | + | |
197 | 413 | var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') |
198 | 414 | promise.then( |
199 | 415 | function (result) { |
200 | - $scope.IllustrationData = result; | |
201 | - $scope.selectedAIListViewData = new jinqJs() | |
202 | - .from($scope.IllustrationData.root.AIData) | |
203 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | |
204 | - .select().slice(0, ImageCount); | |
416 | + | |
417 | + var IllustrationData = new jinqJs() | |
418 | + .from(result.root.AIData) | |
419 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
420 | + //.select().slice(0, ImageCount); | |
421 | + .select(); | |
422 | + $scope.AllAIListViewData = IllustrationData; | |
423 | + $scope.totalimage = IllustrationData.length; | |
424 | + // $scope.currentPage = 1; | |
205 | 425 | |
426 | + $scope.SetAIwindowStoreData(windowviewid, 'IllustrationData', IllustrationData); | |
427 | + | |
206 | 428 | }, |
207 | 429 | function (error) { |
430 | + $scope.EnableUI(); | |
208 | 431 | // handle errors here |
209 | 432 | console.log(' $scope.IllustrationData = ' + error.statusText); |
210 | 433 | } |
211 | 434 | ); |
435 | + | |
436 | + | |
212 | 437 | }; |
213 | 438 | |
214 | - $scope.loadAllAI = function (ImageCount) { | |
439 | + $scope.loadAllAI = function (ImageCount, windowviewid) { | |
215 | 440 | $rootScope.isLoading = true; |
216 | 441 | localStorage.setItem("SearchText", ''); |
217 | 442 | localStorage.setItem("SearchByAlphabet", ''); |
218 | 443 | $('ul li span').removeAttr("style"); |
219 | - $('#aiSpinner').css('visibility', 'visible'); | |
220 | - $('#aiSpinner').css('zIndex', '20000'); | |
221 | - if ($location.url() == "/ADAM-images") { | |
222 | - $scope.DisableUI(); | |
223 | - } | |
224 | - var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') | |
225 | - promise.then( | |
226 | - function (result) { | |
227 | - $scope.IllustrationData = result; | |
228 | - | |
229 | - $scope.selectedAIListViewData = new jinqJs() | |
230 | - .from($scope.IllustrationData.root.AIData) | |
231 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | |
232 | - //.select().slice(0, ImageCount); | |
233 | - .select(); //Fixed Bug-58419 by Sandeep | |
234 | - | |
235 | - //console.log($scope.selectedAIListViewData); | |
236 | - | |
237 | - $('#grid-view').empty(); | |
238 | - var $e1 = $('<ul><li ng-repeat="value in selectedAIListViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">' | |
239 | - + '<div class="thumbnail" >' | |
240 | - + '<img id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' | |
241 | - + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view'); | |
242 | - $compile($e1)($scope); | |
243 | - | |
244 | - $timeout(function () { | |
245 | - $('#' + $rootScope.getLocalStorageValue("currentAIImageId")).find('.thumbnail').addClass('HightLightThumbnail'); | |
246 | - if ($rootScope.getLocalStorageValue('AIGridViewScroll') !== null && $location.url() == "/ADAM-images" && $scope.query.SelectedDiv == 1) { | |
247 | - $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AIGridViewScroll') }); | |
248 | - } | |
444 | + | |
445 | + var IllustrationData = $scope.GetAIwindowStoreData(windowviewid, 'IllustrationData'); | |
446 | + // $scope.selectedAIListViewData = $scope.GetAIwindowStoreData(windowviewid, 'IllustrationData'); | |
447 | + | |
448 | + $scope.AllAIListViewData = IllustrationData; | |
449 | + $scope.totalimage = IllustrationData.length; | |
450 | + | |
451 | + $scope.selectedAIListViewData = new jinqJs() | |
452 | + .from(IllustrationData) | |
453 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
454 | + .select().slice(0, $scope.numPerImage); | |
455 | + | |
456 | + $('#grid-view').empty(); | |
457 | + var $e1 = $('<ul><li ng-repeat="value in selectedAIListViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">' | |
458 | + + '<div class="thumbnail" ><a href="#">' | |
459 | + + '<img class="tinyImg" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' | |
460 | + + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view'); | |
461 | + $compile($e1)($scope); | |
462 | + | |
463 | + $timeout(function () { | |
464 | + $('#' + $rootScope.getLocalStorageValue("currentAIImageId")).find('.thumbnail').addClass('HightLightThumbnail'); | |
465 | + if ($rootScope.getLocalStorageValue('AIGridViewScroll') !== null && $location.url() == "/ADAM-images" && $scope.query.SelectedDiv == 1) { | |
466 | + $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AIGridViewScroll') }); | |
467 | + } | |
249 | 468 | |
250 | - }, 100); | |
251 | - | |
252 | - $rootScope.isLoading = false; | |
253 | - $('#aiSpinner').css('visibility', 'hidden'); | |
254 | - if ($location.url() == "/ADAM-images") { | |
255 | - setTimeout(function () { | |
256 | - $scope.EnableUI(); | |
257 | - }, 10); | |
258 | - } | |
259 | - | |
260 | - }, | |
261 | - function (error) { | |
262 | - // handle errors here | |
263 | - console.log(' $scope.IllustrationData = ' + error.statusText); | |
264 | - } | |
265 | - ); | |
469 | + }, 100); | |
470 | + | |
471 | + $timeout(function () { $scope.EnableUI(); }, 500); | |
266 | 472 | |
267 | 473 | } |
268 | 474 | |
... | ... | @@ -271,7 +477,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
271 | 477 | |
272 | 478 | } |
273 | 479 | |
274 | - $scope.showItem = function (id) { | |
480 | + $scope.showItem = function (id, windowviewid) { | |
481 | + if (windowviewid == undefined) | |
482 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
483 | + | |
275 | 484 | //Modified code by sandeep for fixed issue of ADAM Images |
276 | 485 | $scope.idSelected = id; |
277 | 486 | localStorage.setItem("AISelectedRowId", id); |
... | ... | @@ -280,7 +489,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
280 | 489 | localStorage.setItem("AIListViewScroll", y); |
281 | 490 | //$('#' + id).find('.thumbnail').addClass('HightLightThumbnail'); |
282 | 491 | localStorage.setItem("currentAIImageId", id); |
283 | - $scope.hiderow = true; | |
492 | + | |
284 | 493 | if ($scope.filterstring == false) { |
285 | 494 | |
286 | 495 | var SelectedAIthumbImage = []; |
... | ... | @@ -293,14 +502,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
293 | 502 | $scope.SelectedAIthumbImage = "~/../content/images/ai/thumbnails/" + SelectedAIthumbImage[0]._ThumbnailImage; |
294 | 503 | $scope.SelectedAIId = SelectedAIthumbImage[0]._id; |
295 | 504 | $scope.SelectedAITitle = SelectedAIthumbImage[0]._Title; |
296 | - } else { $scope.hiderow = false; } | |
505 | + $scope.hiderow = true; | |
506 | + } | |
507 | + else | |
508 | + { $scope.hiderow = false; } | |
297 | 509 | } |
298 | 510 | else { |
299 | - if ($scope.searchAIListViewData.length > 0) { | |
511 | + var searchAIListViewData = $scope.GetAIwindowStoreData(windowviewid, 'searchAIListViewData'); | |
300 | 512 | |
513 | + if (searchAIListViewData.length > 0) { | |
301 | 514 | var SelectedAIthumbImage = []; |
302 | 515 | SelectedAIthumbImage = new jinqJs() |
303 | - .from($scope.searchAIListViewData) | |
516 | + .from(searchAIListViewData) | |
304 | 517 | .where('_id = ' + id) |
305 | 518 | .select('_ThumbnailImage', '_id', '_Title'); |
306 | 519 | |
... | ... | @@ -308,14 +521,41 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
308 | 521 | $scope.SelectedAIthumbImage = "~/../content/images/ai/thumbnails/" + SelectedAIthumbImage[0]._ThumbnailImage; |
309 | 522 | $scope.SelectedAIId = SelectedAIthumbImage[0]._id; |
310 | 523 | $scope.SelectedAITitle = SelectedAIthumbImage[0]._Title; |
524 | + $scope.hiderow = true; | |
311 | 525 | } else { $scope.hiderow = false; } |
312 | 526 | } |
313 | 527 | |
314 | 528 | } |
315 | 529 | }; |
316 | 530 | |
531 | + $scope.ResetCurrentModule = function (query) { | |
532 | + | |
533 | + $('ul li span').removeAttr("style"); | |
534 | + query.SearchText = ""; | |
535 | + $scope.idSelected = ''; | |
536 | + $scope.hideListViewDiv(); | |
537 | + //set localstorage values | |
538 | + localStorage.setItem("SearchText", ''); | |
539 | + localStorage.setItem("SearchByAlphabet", ''); | |
540 | + localStorage.setItem("AIListViewScroll", ''); | |
541 | + localStorage.setItem("AIGridViewScroll", ''); | |
542 | + localStorage.setItem("currentAITabView", ''); | |
543 | + localStorage.setItem("AIListViewScrollPosition", ''); | |
544 | + localStorage.setItem("AISelectedRowId", ''); | |
545 | + localStorage.setItem("currentAIImageId", ''); | |
546 | + localStorage.setItem("listViewSelectedID", ''); | |
547 | + localStorage.setItem("AIGridViewHighlightThumbnail", ''); | |
548 | + localStorage.setItem("currentViewTitle", ''); | |
549 | + if ($('.selected').hasClass("selected")) { | |
550 | + $('.selected').removeClass("selected"); | |
551 | + } | |
552 | + $('#ListViewDiv').scrollTop(0); | |
553 | + $scope.currentPage = 1; | |
554 | + } | |
317 | 555 | //Code changes by Sandeep for fixed bug-57854 |
318 | - $scope.Reset = function (query) { | |
556 | + $scope.Reset = function (query, windowviewid) { | |
557 | + if (windowviewid == undefined) | |
558 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
319 | 559 | $('ul li span').removeAttr("style"); |
320 | 560 | query.SearchText = ""; |
321 | 561 | $scope.idSelected = ''; |
... | ... | @@ -332,32 +572,34 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
332 | 572 | localStorage.setItem("listViewSelectedID", ''); |
333 | 573 | localStorage.setItem("AIGridViewHighlightThumbnail", ''); |
334 | 574 | localStorage.setItem("currentViewTitle", ''); |
335 | - localStorage.setItem("currentImageTitleFromJson", ''); | |
336 | - //localStorage.setItem("", ''); | |
337 | - //localStorage.setItem("", ''); | |
338 | - var ImageCount = $rootScope.getLocalStorageValue("ImageCount"); | |
575 | + | |
576 | + var ImageCount = $scope.GetAIwindowStoreData(windowviewid, 'ImageCount'); | |
339 | 577 | if ($('.selected').hasClass("selected")) { |
340 | 578 | $('.selected').removeClass("selected"); |
341 | 579 | } |
342 | - | |
343 | 580 | $('#ListViewDiv').scrollTop(0); |
344 | - | |
345 | - //$scope.hideListViewDiv(); | |
346 | - | |
581 | + $scope.SetAIwindowStoreData(windowviewid, 'searchAIListViewData', []); | |
347 | 582 | $scope.filterstring = false; |
348 | - while ($scope.searchAIListViewData.length) { | |
349 | - $scope.searchAIListViewData.pop(); | |
350 | - } | |
351 | - //$scope.loadAllAI(ImageCount); | |
583 | + $scope.currentPage = 1; | |
584 | + | |
585 | + $scope.DisableUI(); | |
586 | + $scope.loadAllAI(ImageCount, windowviewid); | |
352 | 587 | } |
353 | 588 | |
354 | - $scope.ApplySearch = function (query) { | |
589 | + $scope.ApplySearch = function (query, windowviewid) { | |
590 | + if (windowviewid == undefined) | |
591 | + { | |
592 | + $scope.currentPage = 1; | |
593 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
594 | + } | |
595 | + | |
596 | + $scope.DisableUI(); | |
597 | + $scope.SetAIwindowStoreData(windowviewid, 'searchAIListViewData', []); | |
355 | 598 | //Modified code by sandeep for fixed issue of ADAM Images |
356 | 599 | $('ul li span').removeAttr("style"); |
357 | 600 | |
358 | 601 | $scope.idSelected = ''; |
359 | - //$scope.hiderow = false; | |
360 | - $scope.hiderow = true; | |
602 | + $scope.hiderow = false; | |
361 | 603 | var currentSearchtext = $rootScope.getLocalStorageValue("SearchText"); |
362 | 604 | //localStorage.setItem("SearchText", ''); |
363 | 605 | localStorage.setItem("SearchByAlphabet", ''); |
... | ... | @@ -375,20 +617,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
375 | 617 | if ($scope.query.SearchText == "undefined" || ($scope.query.SearchText == null || $scope.query.SearchText == "")) { |
376 | 618 | $rootScope.errorMessage = AIAConstants.PLEASE_ENTER_SEARCH_TEXT; |
377 | 619 | $("#messageModal").modal('show'); |
620 | + $scope.EnableUI(); | |
378 | 621 | return false; |
379 | 622 | } |
380 | 623 | } |
381 | - | |
382 | - | |
383 | - //$scope.filterstring = false; | |
384 | - while ($scope.searchAIListViewData.length) { | |
385 | - $scope.searchAIListViewData.pop(); | |
386 | - } | |
387 | - | |
388 | - $rootScope.isLoading = true; | |
389 | - $('#aiSpinner').css('visibility', 'visible'); | |
390 | - $('#aiSpinner').css('zIndex', '20000'); | |
391 | - //$scope.DisableUI(); | |
624 | + | |
392 | 625 | $scope.filterstring = true; |
393 | 626 | if (typeof ($scope.query.SearchText) !== "undefined" && ($scope.query.SearchText !== null && $scope.query.SearchText !== "")) { |
394 | 627 | //localStorage.setItem("SearchText", query.SearchText); |
... | ... | @@ -397,83 +630,92 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
397 | 630 | else { |
398 | 631 | localStorage.setItem("SearchText", ''); |
399 | 632 | } |
633 | + var selectedAIListViewData = $scope.GetAIwindowStoreData(windowviewid, 'IllustrationData'); | |
400 | 634 | |
401 | - var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') | |
402 | - promise.then( | |
403 | - function (result) { | |
404 | - $scope.IllustrationData = result; | |
635 | + //$scope.selectedAIListViewData = $scope.GetAIwindowStoreData(windowviewid, 'IllustrationData'); | |
636 | + var ailistviewdata = []; | |
637 | + $('#grid-view').empty(); | |
638 | + angular.forEach(selectedAIListViewData, function (value, key) { | |
639 | + | |
640 | + var selectimg = true; | |
641 | + //var count = 0; | |
642 | + if (typeof ($scope.query.SearchText) !== "undefined" && ($scope.query.SearchText !== null && $scope.query.SearchText !== "")) { | |
643 | + var SearchText = $scope.query.SearchText | |
644 | + var posbodyregion = value._Title.toLowerCase().indexOf(SearchText.toLowerCase()); | |
645 | + if (posbodyregion > -1) { | |
646 | + selectimg = true; | |
647 | + //count = count + 1; | |
648 | + } | |
649 | + else { | |
650 | + selectimg = false; | |
651 | + //count = count - 1; | |
652 | + } | |
653 | + } | |
405 | 654 | |
406 | - $scope.selectedAIListViewData = new jinqJs() | |
407 | - .from($scope.IllustrationData.root.AIData) | |
408 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | |
409 | - .select(); | |
655 | + if (selectimg === true) { | |
656 | + //$scope.imagePath = "~/../content/images/ai/thumbnails/" + value._ThumbnailImage; | |
410 | 657 | |
411 | - $('#grid-view').empty(); | |
412 | - angular.forEach($scope.selectedAIListViewData, function (value, key) { | |
413 | - | |
414 | - var selectimg = true; | |
415 | - //var count = 0; | |
416 | - if (typeof ($scope.query.SearchText) !== "undefined" && ($scope.query.SearchText !== null && $scope.query.SearchText !== "")) { | |
417 | - var SearchText = $scope.query.SearchText | |
418 | - var posbodyregion = value._Title.toLowerCase().indexOf(SearchText.toLowerCase()); | |
419 | - if (posbodyregion > -1) { | |
420 | - selectimg = true; | |
421 | - //count = count + 1; | |
422 | - } | |
423 | - else { | |
424 | - selectimg = false; | |
425 | - //count = count - 1; | |
426 | - } | |
427 | - } | |
428 | - | |
429 | - if (selectimg === true) { | |
430 | - $scope.imagePath = "~/../content/images/ai/thumbnails/" + value._ThumbnailImage; | |
431 | - | |
432 | - var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="OpenAdamImage($event)">' | |
433 | - + '<div style="width:auto;height:auto;" class="thumbnail" >' | |
434 | - + '<img style="height:150px" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
435 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
436 | - | |
437 | - $compile($el)($scope); | |
438 | - | |
439 | - $scope.searchAIListViewData.push( | |
440 | - { | |
441 | - "_id": value._id, | |
442 | - //"_ImageId": value._ImageId, | |
443 | - "_Title": value._Title, | |
444 | - "_contentImage": value._contentImage, | |
445 | - "_ThumbnailImage": value._ThumbnailImage, | |
446 | - }); | |
447 | - } | |
448 | - }); | |
449 | - $('table > #ListViewDiv > #searchItem').remove(); | |
450 | - | |
451 | - //Show Error Message in case of gridview if no data is found | |
452 | - if ($scope.searchAIListViewData.length == 0) { | |
453 | - 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'); | |
454 | - $compile($el)($scope); | |
455 | - $('table > #ListViewDiv > #searchItem').remove(); | |
456 | - | |
457 | - $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); | |
458 | - localStorage.setItem("SearchText", ''); | |
459 | - } | |
658 | + //var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="OpenAdamImage($event)">' | |
659 | + // + '<div class="thumbnail" ><a href="#">' | |
660 | + // + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
661 | + // + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
460 | 662 | |
461 | - setTimeout(function () { | |
462 | - //$scope.setImgPosition(); | |
463 | - $scope.EnableUI(); | |
663 | + //$compile($el)($scope); | |
464 | 664 | |
465 | - }, 10); | |
665 | + ailistviewdata.push( | |
666 | + { | |
667 | + "_id": value._id, | |
668 | + //"_ImageId": value._ImageId, | |
669 | + "_Title": value._Title, | |
670 | + "_contentImage": value._contentImage, | |
671 | + "_ThumbnailImage": value._ThumbnailImage, | |
672 | + }); | |
673 | + } | |
674 | + }); | |
675 | + $('table > #ListViewDiv > #searchItem').remove(); | |
676 | + $scope.SetAIwindowStoreData(windowviewid, 'searchAIListViewData', ailistviewdata); | |
466 | 677 | |
467 | - $rootScope.isLoading = false; | |
468 | - $('#aiSpinner').css('visibility', 'hidden'); | |
469 | - | |
470 | - }, | |
471 | - | |
472 | - function (error) { | |
473 | - // handle errors here | |
474 | - console.log(' $scope.IllustrationData = ' + error.statusText); | |
475 | - } | |
476 | - ); | |
678 | + $scope.totalimage = ailistviewdata.length; | |
679 | + | |
680 | + $scope.AllsearchAIViewData = ailistviewdata; | |
681 | + | |
682 | + if ($scope.activeTab == 1) { | |
683 | + //for image view | |
684 | + $scope.searchAIImageViewData = new jinqJs() | |
685 | + .from(ailistviewdata) | |
686 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
687 | + .select().slice(0, $scope.numPerImage); | |
688 | + | |
689 | + | |
690 | + var $e1 = $('<ul><li ng-repeat="value in searchAIImageViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">' | |
691 | + + '<div class="thumbnail" ><a href="#">' | |
692 | + + '<img class="tinyImg" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' | |
693 | + + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view'); | |
694 | + $compile($e1)($scope); | |
695 | + | |
696 | + } | |
697 | + else { | |
698 | + // for list view | |
699 | + $scope.searchAIListViewData = new jinqJs() | |
700 | + .from(ailistviewdata) | |
701 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
702 | + .select().slice(0, $scope.numPerImage); | |
703 | + | |
704 | + } | |
705 | + | |
706 | + | |
707 | + //Show Error Message in case of gridview if no data is found | |
708 | + if ($scope.AllsearchAIViewData.length == 0) { | |
709 | + 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'); | |
710 | + $compile($el)($scope); | |
711 | + $('table > #ListViewDiv > #searchItem').remove(); | |
712 | + | |
713 | + $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); | |
714 | + localStorage.setItem("SearchText", ''); | |
715 | + } | |
716 | + | |
717 | + $timeout(function () { $scope.EnableUI(); }, 500); | |
718 | + | |
477 | 719 | } |
478 | 720 | |
479 | 721 | //Added method by sandeep for fixed Bug-57978 to selected Image |
... | ... | @@ -481,8 +723,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
481 | 723 | var _currentImgId = $rootScope.getLocalStorageValue("currentAIImageId"); |
482 | 724 | var aISelectedRowId = $rootScope.getLocalStorageValue("AISelectedRowId"); |
483 | 725 | if (_currentImgId != "null" && _currentImgId != null) { |
726 | + var dd = $('#' + _currentImgId).find('.thumbnail'); | |
484 | 727 | $('#' + _currentImgId).find('.thumbnail').addClass('HightLightThumbnail'); |
485 | - $scope.hiderow = true; | |
728 | + // $scope.hiderow = true; | |
486 | 729 | } |
487 | 730 | if ($('#grid-view').css("display") == "block") { |
488 | 731 | var aiGridViewScroll = $rootScope.getLocalStorageValue('AIGridViewScroll'); |
... | ... | @@ -507,254 +750,401 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
507 | 750 | } |
508 | 751 | } |
509 | 752 | } |
753 | + | |
510 | 754 | |
511 | - $scope.DisableUI = function () { | |
512 | - | |
513 | - $('#imgParent').css('z-index', '1'); | |
514 | - document.getElementById("imgParent").style.pointerEvents = "none"; | |
515 | - document.getElementById("imgParent").style.opacity = "0.5"; | |
516 | - } | |
755 | + $scope.ApplySearchByAlphabet = function (SearchTextByAlphabet, windowviewid) { | |
756 | + if (windowviewid == undefined) { | |
757 | + $scope.currentPage = 1; | |
758 | + windowviewid = $rootScope.MULTI_VIEW_ID; | |
759 | + } | |
517 | 760 | |
518 | - $scope.EnableUI = function () { | |
519 | - document.getElementById("imgParent").style.pointerEvents = "auto"; | |
520 | - document.getElementById("imgParent").style.opacity = "1.0"; | |
521 | - } | |
522 | - $scope.counter = 1; | |
523 | - $scope.ApplySearchByAlphabet = function (SearchTextByAlphabet) { | |
524 | 761 | //Modified code by sandeep for fixed issue of ADAM Images |
525 | 762 | $rootScope.SearchTextByAlphabet = SearchTextByAlphabet; |
526 | 763 | localStorage.setItem("SearchText", ''); |
527 | 764 | $('#txtSerachInput').val(""); |
528 | - //$rootScope.isLoading = true; | |
529 | 765 | $scope.idSelected = ''; |
530 | - //$scope.hiderow = false;//Comment by Sandeep | |
531 | - $scope.hiderow = true; | |
766 | + $scope.hiderow = false; | |
532 | 767 | $scope.DisableUI(); |
533 | 768 | $('ul li span').removeAttr("style"); |
534 | 769 | $('#' + $rootScope.SearchTextByAlphabet).css({ "color": "white", "background-color": "#1B92D0" }); |
535 | 770 | $scope.filterstring = true; |
536 | - while ($scope.searchAIListViewData.length) { | |
537 | - $scope.searchAIListViewData.pop(); | |
538 | - } | |
539 | - $rootScope.isLoading = true; | |
540 | - $('#aiSpinner').css('visibility', 'visible'); | |
541 | - $('#aiSpinner').css('zIndex', '20000'); | |
542 | 771 | |
772 | + $scope.SetAIwindowStoreData(windowviewid, 'searchAIListViewData', []); | |
773 | + | |
543 | 774 | if (typeof (SearchTextByAlphabet) !== "undefined" && (SearchTextByAlphabet !== null && SearchTextByAlphabet !== "")) { |
544 | 775 | localStorage.setItem("SearchByAlphabet", SearchTextByAlphabet); |
545 | 776 | } |
546 | 777 | else { |
547 | 778 | localStorage.setItem("SearchByAlphabet", ''); |
548 | 779 | } |
549 | - var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') | |
550 | - promise.then( | |
551 | - function (result) { | |
552 | - $scope.IllustrationData = result; | |
553 | - | |
554 | - $scope.selectedAIListViewData = new jinqJs() | |
555 | - .from($scope.IllustrationData.root.AIData) | |
556 | - .orderBy([{ field: '_Title', sort: 'asc' }]).select(); | |
557 | - | |
558 | - $('#grid-view').empty(); | |
559 | - | |
560 | - angular.forEach($scope.selectedAIListViewData, function (value, key) { | |
561 | - var selectimg = true; | |
562 | - //var count = 0; | |
563 | - if (typeof (SearchTextByAlphabet) !== "undefined" && (SearchTextByAlphabet !== null && SearchTextByAlphabet !== "")) { | |
564 | - var firstChar = value._Title[0]; | |
565 | - if (firstChar == SearchTextByAlphabet) { | |
566 | - selectimg = true; | |
567 | - } | |
568 | - else { | |
569 | - selectimg = false; | |
570 | - } | |
571 | - } | |
572 | - if (selectimg === true) { | |
573 | - $scope.imagePath = "~/../content/images/ai/thumbnails/" + value._ThumbnailImage; | |
574 | - | |
575 | - var $el = $('<div id="' + value._id + '" ng-disabled="' + $scope.IsDisable + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="OpenAdamImage($event)">' | |
576 | - + '<div style="width:auto;height:auto;" class="thumbnail" >' | |
577 | - + '<img style="height:150px" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
578 | - + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
579 | - | |
580 | - $compile($el)($scope); | |
581 | - | |
582 | - $scope.searchAIListViewData.push( | |
583 | - { | |
584 | - "_id": value._id, | |
585 | - //"_ImageId": value._ImageId, | |
586 | - "_Title": value._Title, | |
587 | - "_contentImage": value._contentImage, | |
588 | - "_ThumbnailImage": value._ThumbnailImage, | |
589 | - }); | |
780 | + | |
781 | + var selectedAIListViewData = $scope.GetAIwindowStoreData(windowviewid, 'IllustrationData'); | |
782 | + | |
783 | + | |
784 | + //$scope.selectedAIListViewData = $scope.GetAIwindowStoreData(windowviewid, 'IllustrationData'); | |
785 | + | |
786 | + var ailistviewdata = []; | |
787 | + $('#grid-view').empty(); | |
788 | + | |
789 | + angular.forEach(selectedAIListViewData, function (value, key) { | |
790 | + var selectimg = true; | |
791 | + //var count = 0; | |
792 | + if (typeof (SearchTextByAlphabet) !== "undefined" && (SearchTextByAlphabet !== null && SearchTextByAlphabet !== "")) { | |
793 | + var firstChar = value._Title[0]; | |
794 | + if (firstChar == SearchTextByAlphabet) { | |
795 | + selectimg = true; | |
796 | + } | |
797 | + else { | |
798 | + selectimg = false; | |
799 | + } | |
800 | + } | |
801 | + if (selectimg === true) { | |
802 | + //$scope.imagePath = "~/../content/images/ai/thumbnails/" + value._ThumbnailImage; | |
803 | + | |
804 | + //var $el = $('<div id="' + value._id + '" ng-disabled="' + $scope.IsDisable + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="OpenAdamImage($event)">' | |
805 | + // + '<div class="thumbnail" ><a href="#">' | |
806 | + // + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' | |
807 | + // + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); | |
808 | + | |
809 | + //$compile($el)($scope); | |
810 | + | |
811 | + ailistviewdata.push( | |
812 | + { | |
813 | + "_id": value._id, | |
814 | + //"_ImageId": value._ImageId, | |
815 | + "_Title": value._Title, | |
816 | + "_contentImage": value._contentImage, | |
817 | + "_ThumbnailImage": value._ThumbnailImage, | |
818 | + }); | |
590 | 819 | |
591 | - } | |
592 | - | |
593 | - }); | |
594 | - $('table > #ListViewDiv > #searchItem').remove(); | |
595 | - //Show Error Message in case of gridview if no data is found | |
596 | - if ($scope.searchAIListViewData.length == 0) { | |
597 | - 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'); | |
598 | - $compile($el)($scope); | |
599 | - $('table > #ListViewDiv > #searchItem').remove(); | |
600 | - | |
601 | - $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); | |
602 | - } | |
603 | - | |
604 | - setTimeout(function () { | |
605 | - //$scope.setImgPosition(); | |
606 | - $scope.EnableUI(); | |
607 | - }, 10); | |
608 | - | |
609 | - $rootScope.isLoading = false; | |
610 | - $('#aiSpinner').css('visibility', 'hidden'); | |
611 | - }, | |
612 | - function (error) { | |
613 | - console.log(' $scope.IllustrationData = ' + error.statusText); | |
614 | - } | |
615 | - ); | |
616 | - } | |
820 | + } | |
821 | + | |
822 | + }); | |
823 | + | |
824 | + $('table > #ListViewDiv > #searchItem').remove(); | |
825 | + | |
826 | + $scope.SetAIwindowStoreData(windowviewid, 'searchAIListViewData', ailistviewdata); | |
827 | + | |
828 | + $scope.totalimage = ailistviewdata.length; | |
829 | + | |
830 | + $scope.AllsearchAIViewData = ailistviewdata; | |
617 | 831 | |
832 | + | |
833 | + if ($scope.activeTab == 1) | |
834 | + { | |
835 | + //for image view | |
836 | + $scope.searchAIImageViewData = new jinqJs() | |
837 | + .from(ailistviewdata) | |
838 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
839 | + .select().slice(0, $scope.numPerImage); | |
840 | + | |
841 | + var $e1 = $('<ul><li ng-repeat="value in searchAIImageViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="OpenAdamImage($event)">' | |
842 | + + '<div class="thumbnail" ><a href="#">' | |
843 | + + '<img class="tinyImg" id="{{value._Title}}" ng-src="~/../content/images/ai/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' | |
844 | + + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view'); | |
845 | + $compile($e1)($scope); | |
846 | + } | |
847 | + else | |
848 | + { | |
849 | + // for list view | |
850 | + $scope.searchAIListViewData = new jinqJs() | |
851 | + .from(ailistviewdata) | |
852 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
853 | + .select().slice(0, $scope.numPerImage); | |
854 | + | |
855 | + } | |
856 | + | |
857 | + //Show Error Message in case of gridview if no data is found | |
858 | + if ($scope.AllsearchAIViewData.length == 0) { | |
859 | + 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'); | |
860 | + $compile($el)($scope); | |
861 | + $('table > #ListViewDiv > #searchItem').remove(); | |
862 | + | |
863 | + $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); | |
864 | + } | |
865 | + | |
866 | + $timeout(function () { $scope.EnableUI(); }, 500); | |
867 | + } | |
618 | 868 | |
619 | 869 | $scope.scroll = function () { |
620 | 870 | //$("html,body").scrollTop(0); |
621 | 871 | } |
622 | 872 | |
623 | - | |
624 | 873 | $scope.OpenAdamImage = function ($event) { |
625 | - | |
874 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
626 | 875 | $rootScope.MenuModuleName = "AI"; |
627 | 876 | $rootScope.disableAnnotationTB = false; |
628 | 877 | $rootScope.AIAnotationIdentifyModeOff = true; |
629 | 878 | $rootScope.currentAIImageId = $event.currentTarget.id; |
630 | 879 | if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { |
631 | 880 | var AITitle = []; |
632 | - AITitle = new jinqJs() | |
633 | - .from($scope.selectedAIListViewData) | |
634 | - .where('_id = ' + $event.currentTarget.id) | |
635 | - .select('_Title'); | |
881 | + | |
882 | + AITitle = new jinqJs() | |
883 | + .from($scope.AllAIListViewData) | |
884 | + .where('_id = ' + $event.currentTarget.id) | |
885 | + .select(); | |
886 | + | |
636 | 887 | $rootScope.ViewTitle = AITitle[0]._Title; |
637 | 888 | } |
638 | 889 | else { |
639 | 890 | $rootScope.ViewTitle = $event.currentTarget.textContent; |
640 | 891 | |
641 | 892 | } |
893 | + // open module bu openresource | |
894 | + var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); | |
895 | + if (isopenResourceRequest == "true") { | |
896 | + | |
897 | + //set default module data | |
898 | + var AIDopenData = { | |
899 | + "id": $event.currentTarget.id, | |
900 | + "mType": 'ADAM_IMAGES', | |
901 | + "windowTitle": $rootScope.ViewTitle, | |
902 | + "size": { height: 600, width: 900 } | |
903 | + }; | |
904 | + | |
905 | + window.parent.AIAModuleOpenResourceInfo(AIDopenData); | |
906 | + | |
907 | + } | |
908 | + else { | |
909 | + localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); | |
910 | + localStorage.setItem("currentAIImageId", $event.currentTarget.id); | |
911 | + | |
912 | + $scope.SetAIwindowStoreData(windowviewid, 'currentViewTitle', $rootScope.ViewTitle); | |
913 | + $scope.SetAIwindowStoreData(windowviewid, 'imageId', $event.currentTarget.id); | |
914 | + | |
915 | + var imageName = AITitle[0]._contentImage; | |
916 | + | |
917 | + $scope.SetAIwindowStoreData(windowviewid, 'imageName', imageName); | |
918 | + | |
919 | + var imagePath = "~/../content/images/ai/images/" + imageName; | |
920 | + | |
921 | + $scope.SetAIwindowStoreData(windowviewid, 'AIImagePath', imagePath); | |
642 | 922 | |
643 | - localStorage.setItem("currentImageTitleFromJson", $rootScope.ViewTitle); | |
644 | - localStorage.setItem("currentAIImageId", $event.currentTarget.id); | |
923 | + | |
924 | + // store image for export | |
925 | + var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); | |
926 | + $rootScope.StoreTitleName(tittle); | |
927 | + $rootScope.StoreOrgImageName(imageName); | |
645 | 928 | |
646 | - var moduleItemDataToBeSavedID = $event.currentTarget.id; | |
647 | - $("#list-view table tbody tr").removeClass("active"); | |
648 | - localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); | |
649 | - $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active"); | |
650 | - localStorage.setItem("AIListViewScrollPosition", $("#list-view table tbody").scrollTop()); | |
929 | + var moduleItemDataToBeSavedID = $event.currentTarget.id; | |
930 | + $("#list-view table tbody tr").removeClass("active"); | |
931 | + localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); | |
932 | + $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active"); | |
933 | + localStorage.setItem("AIListViewScrollPosition", $("#list-view table tbody").scrollTop()); | |
651 | 934 | |
652 | - //Set the vertical scroll value of the Grid-View. | |
653 | - var y = $($window).scrollTop(); | |
654 | - localStorage.setItem("AIGridViewScroll", y); | |
655 | - localStorage.setItem("AIGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); | |
656 | - var u = $location.url(); | |
657 | - $location.url('/adam-images-detail'); | |
935 | + //Set the vertical scroll value of the Grid-View. | |
936 | + var y = $($window).scrollTop(); | |
937 | + localStorage.setItem("AIGridViewScroll", y); | |
938 | + localStorage.setItem("AIGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id')); | |
939 | + var u = $location.url(); | |
940 | + $location.url('/adam-images-detail'); | |
941 | + } | |
942 | + | |
943 | + | |
658 | 944 | } |
659 | 945 | |
660 | - $scope.OpenAdamImageView = function () { | |
946 | + $rootScope.OpenAdamImageViewMain = function () { | |
947 | + | |
948 | + if ($rootScope.isCallFromOtherModule) { | |
949 | + $scope.AIModuleData = ModuleService.getModuleData("ADAM_IMAGES"); | |
950 | + $scope.readyToLoad = true; | |
951 | + $rootScope.AIWindowLoadComplete = false; | |
952 | + $scope.wincount = 1; | |
953 | + var winlen = $scope.AIModuleData.length; | |
954 | + var timeint = null; | |
955 | + timeint = $interval(function () { | |
956 | + | |
957 | + if ($scope.readyToLoad == true) { | |
958 | + var windata = $scope.AIModuleData[$scope.wincount - 1]; | |
959 | + $scope.OpenAdamImageView(windata); | |
960 | + | |
961 | + } | |
962 | + $scope.readyToLoad = false; | |
963 | + if ($scope.wincount < winlen && $rootScope.AIWindowLoadComplete == true) { | |
964 | + $scope.wincount = $scope.wincount + 1; | |
965 | + $rootScope.AIWindowLoadComplete = false; | |
966 | + $scope.readyToLoad = true; | |
967 | + } | |
968 | + | |
969 | + if ($scope.wincount == winlen && $rootScope.AIWindowLoadComplete == true) { | |
970 | + $scope.stopInterval(); | |
971 | + $scope.$emit("LoadModuleComplete", "ADAM_IMAGES"); | |
972 | + } | |
973 | + | |
974 | + | |
975 | + }, 100); | |
976 | + | |
977 | + $scope.stopInterval = function () { | |
978 | + if (angular.isDefined(timeint)) { | |
979 | + $interval.cancel(timeint); | |
980 | + timeint = undefined; | |
981 | + } | |
982 | + | |
983 | + }; | |
984 | + | |
985 | + } | |
986 | + else { | |
987 | + $scope.OpenAdamImageView(null); | |
988 | + } | |
989 | + } | |
990 | + | |
991 | + $scope.OpenAdamImageView = function (aiModuleData) { | |
992 | + | |
993 | + if ($rootScope.isCallFromOtherModule == true) { | |
994 | + $scope.aiOpenInOtherModules = aiModuleData; | |
995 | + $rootScope.MULTI_VIEW_ID += 1; | |
996 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
997 | + | |
998 | + $scope.initializeAIWindowData(windowviewid, false, $scope.aiOpenInOtherModules.currentWindowId); | |
999 | + | |
1000 | + var moduleName = $scope.aiOpenInOtherModules.mType; | |
1001 | + $scope.SetAIwindowStoreData(windowviewid, 'moduleName', moduleName); | |
1002 | + | |
1003 | + var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json'); | |
1004 | + promise.then( | |
1005 | + function (result) { | |
1006 | + var IllustrationData = new jinqJs() | |
1007 | + .from(result.root.AIData) | |
1008 | + .orderBy([{ field: '_Title', sort: 'asc' }]) | |
1009 | + .select(); | |
1010 | + | |
1011 | + // serial no of imageid | |
1012 | + var imageId = $scope.aiOpenInOtherModules.id; | |
1013 | + | |
1014 | + $scope.SetAIwindowStoreData(windowviewid, 'imageId', imageId); | |
1015 | + | |
1016 | + var selectedTileData = []; | |
1017 | + selectedTileData = new jinqJs() | |
1018 | + .from(IllustrationData) | |
1019 | + .where('_id == ' + imageId) | |
1020 | + .select(); | |
1021 | + | |
1022 | + | |
1023 | + var imageName = selectedTileData[0]._contentImage; | |
1024 | + | |
1025 | + $scope.SetAIwindowStoreData(windowviewid, 'imageName', imageName); | |
661 | 1026 | |
662 | - // $rootScope.currentActiveModuleTitle = "A.D.A.M. Images"; | |
1027 | + var imagePath = "~/../content/images/ai/images/" + imageName; | |
1028 | + | |
1029 | + $scope.SetAIwindowStoreData(windowviewid, 'AIImagePath', imagePath); | |
1030 | + | |
1031 | + var aiTitle = $scope.aiOpenInOtherModules.anatomyTitle; | |
1032 | + $scope.SetAIwindowStoreData(windowviewid, 'currentViewTitle', aiTitle); | |
1033 | + localStorage.setItem("currentViewTitle", aiTitle); | |
1034 | + | |
1035 | + // store image for export | |
1036 | + $rootScope.StoreTitleName(aiTitle); | |
1037 | + $rootScope.StoreOrgImageName(selectedTileData[0]._contentImage); | |
1038 | + | |
1039 | + $scope.SetAIwindowStoreData(windowviewid, 'parentSlugName', ($location.url()).replace('/', '')); | |
1040 | + | |
1041 | + $scope.loadAIllustration(windowviewid); | |
1042 | + | |
1043 | + }, | |
1044 | + function (error) { | |
1045 | + // handle errors here | |
1046 | + console.log(' $scope.AIllustrationData = ' + error.statusText); | |
1047 | + } | |
1048 | + | |
1049 | + ); | |
1050 | + } | |
1051 | + else { | |
1052 | + $scope.SetAIwindowStoreData($rootScope.MULTI_VIEW_ID, 'parentSlugName', 'ADAM-images'); | |
1053 | + $scope.loadAIllustration($rootScope.MULTI_VIEW_ID); | |
1054 | + } | |
1055 | + } | |
1056 | + | |
1057 | + $scope.loadAIllustration = function (windowviewid) { | |
663 | 1058 | |
664 | 1059 | if ($rootScope.refreshcheck == null) { |
665 | 1060 | $location.path('/'); |
666 | 1061 | } |
667 | - $rootScope.isLoading = true; | |
668 | - $('#aiSpinner').css('visibility', 'visible'); | |
669 | - //$scope.DisableUI(); | |
670 | - $scope.voId = $rootScope.getLocalStorageValue("currentAIImageId"); | |
1062 | + | |
1063 | + $scope.jsPanelID = 'aiImagePanel' + '_' + windowviewid; | |
1064 | + var selectedCIImage = $scope.GetAIwindowStoreData(windowviewid, 'AIImagePath'); | |
1065 | + | |
1066 | + var tittle = $scope.GetAIwindowStoreData(windowviewid, 'currentViewTitle'); | |
1067 | + var imageId = $scope.GetAIwindowStoreData(windowviewid, 'imageId'); | |
1068 | + | |
1069 | + if ($rootScope.isCallFromOtherModule) { | |
1070 | + // open JS panel for curriculum with define cornonate in CB jason | |
1071 | + $scope.jsPanelWidth = $scope.aiOpenInOtherModules.size.width;//1000; | |
1072 | + $scope.jsPanelHeight = $scope.aiOpenInOtherModules.size.height; | |
1073 | + if ($scope.aiOpenInOtherModules.size.height > 540) | |
1074 | + $scope.jsPanelHeight = 540; | |
1075 | + $scope.jsPanelLeft = 320; | |
1076 | + $scope.jsPanelTop = $rootScope.cBModulejsPanelTop(); | |
671 | 1077 | |
672 | - var counter = 1; | |
673 | - var tittle = $rootScope.getLocalStorageValue("currentImageTitleFromJson"); | |
674 | - localStorage.setItem("currentViewTitle", tittle); | |
1078 | + } | |
1079 | + else { | |
1080 | + $scope.jsPanelWidth = $(window).outerWidth() - 30; | |
1081 | + $scope.jsPanelHeight = $(window).outerHeight() - 125; | |
1082 | + $scope.jsPanelLeft = 15; | |
1083 | + $scope.jsPanelTop = 70; | |
1084 | + } | |
675 | 1085 | |
676 | - var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') | |
677 | - promise.then( | |
678 | - function (result) { | |
679 | - $scope.AIllustrationData = result; | |
680 | - $scope.AIlistViewData = $scope.AIllustrationData.root.AIData; | |
681 | - | |
682 | - var clickedAIImage = []; | |
683 | - clickedAIImage = new jinqJs() | |
684 | - .from($scope.AIlistViewData) | |
685 | - .where('_id == ' + $scope.voId) | |
686 | - .select('_contentImage'); | |
687 | - | |
688 | - $scope.clickedAIImage = "~/../content/images/ai/images/" + clickedAIImage[0]._contentImage; | |
689 | - | |
690 | - // store image for export | |
691 | - var tittle = $rootScope.getLocalStorageValue("currentViewTitle"); | |
692 | - $rootScope.StoreTitleName(tittle); | |
693 | - $rootScope.StoreOrgImageName(clickedAIImage[0]._contentImage); | |
694 | - | |
695 | - if (clickedAIImage.length > 0) { | |
696 | - | |
697 | - $.jsPanel({ | |
698 | - id: 'aiImagePanel', | |
699 | - selector: '.aiView', | |
700 | - theme: 'success', | |
701 | - currentController: 'AIController', | |
702 | - parentSlug: 'ADAM-images', | |
703 | - content: '<div class="row" id="canvasDiv"><div style="align:left;"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1340" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1340" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas></div>' + | |
704 | - '<div class="col-sm-12 img-thumbnail" align="center">' + | |
705 | - '<img src="' + $scope.clickedAIImage + '" id="aimage" alt="" title="" class="img-responsive " style="height:400px;">' + | |
1086 | + if (selectedCIImage.length > 0) { | |
1087 | + | |
1088 | + $.jsPanel({ | |
1089 | + id: $scope.jsPanelID, | |
1090 | + selector: '.aiView', | |
1091 | + theme: 'success', | |
1092 | + currentController: 'AIController', | |
1093 | + parentSlug: $scope.GetAIwindowStoreData(windowviewid, 'parentSlugName'), | |
1094 | + content: '<div class="row" id="canvasDivAI_' + windowviewid + '"><div style="align:left;"><canvas id="canvasAI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="1340" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas> <canvas id="canvasPaintAI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="1340" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas></div>' + | |
1095 | + '<div class="col-sm-12 img-thumbnail" align="center">' + | |
1096 | + '<img src="' + selectedCIImage + '" id="aimage" alt="" title="" class="img-responsive " style="height:400px;">' + | |
706 | 1097 | |
707 | - '</div></div>', | |
708 | - //ajax: { | |
709 | - // url: 'app/views/ci/ci-view-detail.html' | |
710 | - //}, | |
711 | - title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
712 | - position: { | |
713 | - top: 70, | |
714 | - left: 15, | |
715 | - }, | |
716 | - | |
717 | - size: { width: $(window).outerWidth() - 30, height: $(window).outerHeight() - 125 }, | |
718 | - | |
719 | - }); | |
1098 | + '</div></div>', | |
1099 | + | |
1100 | + title: tittle, | |
1101 | + position: { | |
1102 | + top: $scope.jsPanelTop, | |
1103 | + left: $scope.jsPanelLeft | |
1104 | + }, | |
1105 | + | |
1106 | + size: { | |
1107 | + width: $scope.jsPanelWidth, | |
1108 | + height: $scope.jsPanelHeight | |
1109 | + }, | |
1110 | + | |
1111 | + }); | |
720 | 1112 | |
721 | - $('#canvasDiv img').load(function () { | |
722 | - $rootScope.isLoading = false; | |
723 | - $('#aiSpinner').css('visibility', 'hidden'); | |
724 | - var canvas = document.getElementById("canvas"); | |
725 | - var canvasPaint = document.getElementById("canvasPaint"); | |
1113 | + $('#canvasDivAI_' + windowviewid + ' img').load(function () { | |
726 | 1114 | |
727 | - canvas.height = $("#aiImagePanel .jsPanel-content").height(); | |
728 | - canvasPaint.height = $("#aiImagePanel .jsPanel-content").height(); | |
729 | - }); | |
730 | - $rootScope.currentSlug = 'adam-images-detail'; | |
731 | - $rootScope.openViews.push( | |
732 | - { | |
733 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentAIImageId, | |
734 | - "slug": $rootScope.currentSlug | |
735 | - }); | |
1115 | + $scope.JsPanelclick(windowviewid); | |
736 | 1116 | |
737 | - $("#aiImagePanel .img-thumbnail").css("min-height", $("#aiImagePanel .jsPanel-content").height()); | |
738 | - $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important') | |
739 | - var jspContentHeight = $('.jsPanel-content').height(); | |
1117 | + $rootScope.AIWindowLoadComplete = true; | |
740 | 1118 | |
741 | - // console.log($rootScope.OpenAdamImages); | |
742 | - $('#AIView').css("height", $(window).outerHeight() - 65); | |
1119 | + var canvas = document.getElementById("canvasAI_" + windowviewid); | |
1120 | + var canvasPaint = document.getElementById("canvasPaintAI_" + windowviewid); | |
1121 | + | |
1122 | + canvas.height = $("#" + $scope.jsPanelID + " .jsPanel-content").height(); | |
1123 | + canvasPaint.height = $("#" + $scope.jsPanelID + " .jsPanel-content").height(); | |
1124 | + }); | |
743 | 1125 | |
744 | - $('#AIView').css("width", $(window).outerWidth() - 15); | |
1126 | + $scope.SetAIwindowStoreData(windowviewid, 'currentSlug', 'adam-images-detail'); | |
1127 | + $rootScope.openViews.push( | |
1128 | + { | |
1129 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": imageId, | |
1130 | + "slug": $scope.GetAIwindowStoreData(windowviewid, 'currentSlug') | |
1131 | + }); | |
745 | 1132 | |
746 | - //var canvasDIvHeight = parseInt($('#aiImagePanel').outerHeight()) - 30; | |
747 | - var canvasDIvHeight = $("#aiImagePanel .jsPanel-content").height(); | |
1133 | + $("#" + $scope.jsPanelID + " .img-thumbnail").css("min-height", $("#" + $scope.jsPanelID + " .jsPanel-content").height()); | |
1134 | + $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important') | |
1135 | + var jspContentHeight = $('.jsPanel-content').height(); | |
748 | 1136 | |
749 | - $('#canvasDiv').css('height', canvasDIvHeight); | |
750 | - } | |
751 | - }, | |
752 | - function (error) { | |
753 | - // handle errors here | |
754 | - console.log(' $scope.AIllustrationData = ' + error.statusText); | |
755 | - } | |
756 | - ); | |
1137 | + // console.log($rootScope.OpenAdamImages); | |
1138 | + $('#AIView').css("height", $(window).outerHeight() - 65); | |
1139 | + | |
1140 | + $('#AIView').css("width", $(window).outerWidth() - 15); | |
1141 | + | |
1142 | + //var canvasDIvHeight = parseInt($('#aiImagePanel').outerHeight()) - 30; | |
1143 | + var canvasDIvHeight = $("#" + $scope.jsPanelID + " .jsPanel-content").height(); | |
757 | 1144 | |
1145 | + $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); | |
1146 | + } | |
1147 | + $scope.PanelActivity(); | |
758 | 1148 | } |
759 | 1149 | |
760 | 1150 | $scope.$on('annotationToolEvent', function (event, data) { |
... | ... | @@ -764,52 +1154,32 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
764 | 1154 | $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)") |
765 | 1155 | $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); |
766 | 1156 | |
767 | - $("#canvas").css("display", "block"); | |
768 | - $("#canvasPaint").css("display", "block"); | |
1157 | + $('#canvasAI_' + $rootScope.MULTI_VIEW_ID).css("display", "block"); | |
1158 | + $('#canvasPaintAI_' + $rootScope.MULTI_VIEW_ID).css("display", "block"); | |
769 | 1159 | |
770 | 1160 | $rootScope.onDrawingCanvasClick(); |
771 | - //Commented by Sandeep | |
772 | - //$rootScope.FreeStylePaint(); | |
773 | - }); | |
774 | - | |
775 | - $scope.ReloadListViewImageDiv = function (id, imgCount) { | |
776 | 1161 | |
777 | - //console.log(id); | |
778 | - $scope.idSelected = id; | |
779 | - $scope.hiderow = true; | |
780 | - $rootScope.isLoading = true; | |
781 | - $('#aiSpinner').css('visibility', 'visible'); | |
782 | - $('#aiSpinner').css('zIndex', '20000'); | |
783 | - var promise = DataService.getJson('~/../content/data/json/ai/ai_dat_contentlist.json') | |
784 | - promise.then( | |
785 | - function (result) { | |
786 | - $scope.IllustrationData = result; | |
1162 | + }); | |
787 | 1163 | |
788 | - var SelectedAIthumbImage = []; | |
789 | - SelectedAIthumbImage = new jinqJs() | |
790 | - .from($scope.IllustrationData.root.AIData) | |
791 | - .where('_id = ' + id) | |
792 | - .select('_ThumbnailImage', '_id', '_Title').slice(0, imgCount); | |
1164 | + $scope.ReloadListViewImageDiv = function (id, imgCount, windowviewid) { | |
793 | 1165 | |
794 | - if (SelectedAIthumbImage.length > 0) { | |
795 | - $scope.SelectedAIthumbImage = "~/../content/images/ai/thumbnails/" + SelectedAIthumbImage[0]._ThumbnailImage; | |
796 | - $scope.SelectedAIId = SelectedAIthumbImage[0]._id; | |
797 | - $scope.SelectedAITitle = SelectedAIthumbImage[0]._Title; | |
798 | - } else { $scope.hiderow = false; } | |
1166 | + $scope.idSelected = id; | |
799 | 1167 | |
800 | - //Set the scroll position of the tablebody to show selected row | |
801 | - | |
802 | - //$scope.setImgPosition(); | |
1168 | + var IllustrationData = $scope.GetAIwindowStoreData(windowviewid, 'IllustrationData'); | |
803 | 1169 | |
804 | - $rootScope.isLoading = false; | |
805 | - $('#aiSpinner').css('visibility', 'hidden'); | |
1170 | + var SelectedAIthumbImage = []; | |
1171 | + SelectedAIthumbImage = new jinqJs() | |
1172 | + .from(IllustrationData) | |
1173 | + .where('_id = ' + id) | |
1174 | + .select('_ThumbnailImage', '_id', '_Title').slice(0, imgCount); | |
806 | 1175 | |
807 | - }, | |
808 | - function (error) { | |
809 | - // handle errors here | |
810 | - console.log(' $scope.AnimationData = ' + error.statusText); | |
811 | - } | |
812 | - ); | |
1176 | + if (SelectedAIthumbImage.length > 0) { | |
1177 | + $scope.SelectedAIthumbImage = "~/../content/images/ai/thumbnails/" + SelectedAIthumbImage[0]._ThumbnailImage; | |
1178 | + $scope.SelectedAIId = SelectedAIthumbImage[0]._id; | |
1179 | + $scope.SelectedAITitle = SelectedAIthumbImage[0]._Title; | |
1180 | + $scope.hiderow = true; | |
1181 | + } else { $scope.hiderow = false; } | |
1182 | + | |
813 | 1183 | }; |
814 | 1184 | |
815 | 1185 | $scope.hideListViewDiv = function () { |
... | ... | @@ -818,7 +1188,23 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
818 | 1188 | if ($('.selected').hasClass("selected")) { $('.selected').removeClass("selected"); } |
819 | 1189 | $scope.hiderow = false; |
820 | 1190 | } |
821 | - } | |
1191 | + } | |
1192 | + | |
1193 | + $scope.JsPanelclick = function (windowviewid) { | |
1194 | + // call from while open module in CB | |
1195 | + $("#aiImagePanel_" + windowviewid).on('click', function (event) { | |
1196 | + | |
1197 | + var pnlName = event.currentTarget.id; | |
1198 | + $scope.$emit("cBEnableDisableMenuOption", pnlName); | |
1199 | + | |
1200 | + // store image for export while click on panel | |
1201 | + | |
1202 | + var currentViewTitle = $scope.GetAIwindowStoreData(windowviewid, 'currentViewTitle'); | |
1203 | + var imageName = $scope.GetAIwindowStoreData(windowviewid, 'imageName'); | |
1204 | + $rootScope.StoreTitleName(currentViewTitle); | |
1205 | + $rootScope.StoreOrgImageName(imageName); | |
1206 | + }); | |
1207 | + } | |
822 | 1208 | |
823 | 1209 | }] |
824 | 1210 | ); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -26,8 +26,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
26 | 26 | localStorage.setItem("currentCATabView", $scope.activeTab); |
27 | 27 | }; |
28 | 28 | |
29 | - $scope.initializeCAWindowData = function (windowviewid, isOpenWithExistsModule, cbwindowid) { | |
30 | - if (isOpenWithExistsModule || cbwindowid == 0) { | |
29 | + $scope.initializeCAWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { | |
30 | + if (isOpenWithExistsModule || openPanelNo == 0) { | |
31 | 31 | if ($rootScope.CAWindowData != undefined) { |
32 | 32 | $rootScope.CAWindowData.length = 0; |
33 | 33 | } |
... | ... | @@ -168,6 +168,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
168 | 168 | if (index != -1) { |
169 | 169 | // remove module which one is loaded |
170 | 170 | $scope.CAWindowData.splice(index, 1); |
171 | + if ($('#' + panelid).html() != undefined) { | |
172 | + | |
173 | + $('#' + panelid).remove(); | |
174 | + | |
175 | + } | |
171 | 176 | $rootScope.resetjsPanelTop(); |
172 | 177 | } |
173 | 178 | } |
... | ... | @@ -181,6 +186,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
181 | 186 | $rootScope.isCallFromOtherModule = undefined; |
182 | 187 | |
183 | 188 | $rootScope.MULTI_VIEW_ID += 1 |
189 | + // store exist module in module service | |
190 | + var ExistData = ModuleService.getModuleData("CLINICAL_ANIMATIONS"); | |
191 | + | |
192 | + if (ExistData != undefined && ExistData.length > 0) { | |
193 | + // clear all module data before open new module in cb | |
194 | + ModuleService.ClearWinDataByModule(ExistData.mType); | |
195 | + } | |
196 | + var newWindowData = { | |
197 | + "mType": 'CLINICAL_ANIMATIONS', | |
198 | + }; | |
199 | + ModuleService.setModuleData(newWindowData, 0); | |
184 | 200 | |
185 | 201 | $scope.initializeCAWindowData($rootScope.MULTI_VIEW_ID, true, undefined); |
186 | 202 | |
... | ... | @@ -390,44 +406,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
390 | 406 | $scope.SelectedCAId = SelectedCAthumbImage[0]._id; |
391 | 407 | $scope.SelectedCATitle = SelectedCAthumbImage[0]._Title; |
392 | 408 | |
393 | - } | |
394 | - | |
409 | + } | |
395 | 410 | } |
396 | - | |
397 | - $scope.hiderow = true; | |
398 | - if ($scope.filterstring == false) { | |
399 | - | |
400 | - var SelectedCIthumbImage = []; | |
401 | - SelectedCIthumbImage = new jinqJs() | |
402 | - .from($scope.selectedCIListViewData) | |
403 | - .where('_id = ' + id) | |
404 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | |
405 | - | |
406 | - $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | |
407 | - $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | |
408 | - $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | |
409 | - $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | |
410 | - | |
411 | - } | |
412 | - else { | |
413 | - var searchCIListViewData = $scope.GetCAwindowStoreData(windowviewid, 'searchCIListViewData'); | |
414 | - | |
415 | - if (searchCIListViewData.length > 0) { | |
416 | - | |
417 | - var SelectedCIthumbImage = []; | |
418 | - SelectedCIthumbImage = new jinqJs() | |
419 | - .from(searchCIListViewData) | |
420 | - .where('_id = ' + id) | |
421 | - .select('_ThumbnailImage', '_Summary', '_id', '_Title'); | |
422 | - | |
423 | - $scope.SelectedCIthumbImage = "~/../content/images/ci/thumbnails/" + SelectedCIthumbImage[0]._ThumbnailImage; | |
424 | - $scope.SelectedCISummary = SelectedCIthumbImage[0]._Summary; | |
425 | - $scope.SelectedCIId = SelectedCIthumbImage[0]._id; | |
426 | - $scope.SelectedCITitle = SelectedCIthumbImage[0]._Title; | |
427 | - | |
428 | - } | |
429 | - } | |
430 | - | |
431 | 411 | }; |
432 | 412 | |
433 | 413 | $scope.Reset = function (query, windowviewid) { |
... | ... | @@ -615,6 +595,25 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
615 | 595 | } |
616 | 596 | |
617 | 597 | $scope.openView = function ($event) { |
598 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
599 | + | |
600 | + $rootScope.disableAnnotationTBFn(); | |
601 | + $rootScope.MenuModuleName = "CA"; | |
602 | + //alert($rootScope.MenuModuleName); | |
603 | + $rootScope.currentBodyViewId = $event.currentTarget.id; | |
604 | + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | |
605 | + var selectedTileData = []; | |
606 | + selectedTileData = new jinqJs() | |
607 | + .from($scope.selectedCAListViewData) | |
608 | + .where('_id = ' + $event.currentTarget.id) | |
609 | + .select(); | |
610 | + | |
611 | + $rootScope.ViewTitle = selectedTileData[0]._Title; | |
612 | + } | |
613 | + else { | |
614 | + $rootScope.ViewTitle = $event.currentTarget.textContent; | |
615 | + } | |
616 | + | |
618 | 617 | var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); |
619 | 618 | if (isopenResourceRequest == "true") { |
620 | 619 | |
... | ... | @@ -623,37 +622,14 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
623 | 622 | "id": $event.currentTarget.id, |
624 | 623 | "mType": 'CLINICAL_ANIMATIONS', |
625 | 624 | "textVisible": true, |
626 | - "windowTitle": $event.currentTarget.textContent, | |
625 | + "windowTitle": $rootScope.ViewTitle, | |
627 | 626 | "size": { height: 600, width: 900 } |
628 | 627 | }; |
629 | 628 | |
630 | 629 | window.parent.AIAModuleOpenResourceInfo(CADopenData); |
631 | - | |
632 | - window.parent.closeIFrame(); | |
633 | - | |
634 | 630 | } |
635 | 631 | else |
636 | - { | |
637 | - var windowviewid = $rootScope.MULTI_VIEW_ID; | |
638 | - | |
639 | - $rootScope.disableAnnotationTBFn(); | |
640 | - $rootScope.MenuModuleName = "CA"; | |
641 | - //alert($rootScope.MenuModuleName); | |
642 | - $rootScope.currentBodyViewId = $event.currentTarget.id; | |
643 | - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | |
644 | - var selectedTileData = []; | |
645 | - selectedTileData = new jinqJs() | |
646 | - .from($scope.selectedCAListViewData) | |
647 | - .where('_id = ' + $event.currentTarget.id) | |
648 | - .select(); | |
649 | - | |
650 | - $rootScope.ViewTitle = selectedTileData[0]._Title; | |
651 | - } | |
652 | - else { | |
653 | - $rootScope.ViewTitle = $event.currentTarget.textContent; | |
654 | - | |
655 | - } | |
656 | - | |
632 | + { | |
657 | 633 | localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); |
658 | 634 | localStorage.setItem("currentBodyViewId", $event.currentTarget.id); |
659 | 635 | |
... | ... | @@ -706,12 +682,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
706 | 682 | $scope.wincount = 1; |
707 | 683 | var winlen = $scope.CAModuleData.length; |
708 | 684 | var timeint = null; |
709 | - var slideId = ""; | |
710 | 685 | timeint = $interval(function () { |
711 | 686 | |
712 | 687 | if ($scope.readyToLoad == true) { |
713 | 688 | var windata = $scope.CAModuleData[$scope.wincount - 1]; |
714 | - slideId = windata.slideId; | |
715 | 689 | $scope.openBodyView(windata); |
716 | 690 | |
717 | 691 | } |
... | ... | @@ -724,7 +698,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
724 | 698 | |
725 | 699 | if ($scope.wincount == winlen && $rootScope.CAWindowLoadComplete == true) { |
726 | 700 | $scope.stopInterval(); |
727 | - $scope.$emit("LoadModuleComplete", "CLINICAL_ANIMATIONS", slideId); | |
701 | + $scope.$emit("LoadModuleComplete", "CLINICAL_ANIMATIONS"); | |
728 | 702 | } |
729 | 703 | |
730 | 704 | |
... | ... | @@ -866,7 +840,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
866 | 840 | |
867 | 841 | } |
868 | 842 | else { |
869 | - $scope.jsPanelWidth = $(window).outerWidth() - 10; | |
843 | + $scope.jsPanelWidth = $(window).outerWidth() - 20; | |
870 | 844 | $scope.jsPanelHeight = $(window).outerHeight() - 105; |
871 | 845 | $scope.jsPanelLeft = 1; |
872 | 846 | $scope.jsPanelTop = 70; |
... | ... | @@ -959,9 +933,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
959 | 933 | $('#spinner').css('visibility', 'hidden'); |
960 | 934 | |
961 | 935 | if ($rootScope.isCallFromOtherModule) { |
962 | - $scope.JsPanelclick(windowviewid); | |
936 | + //$scope.JsPanelclick(windowviewid); | |
963 | 937 | $rootScope.CAWindowLoadComplete = true; |
964 | 938 | } |
939 | + $scope.JsPanelclick(windowviewid); | |
965 | 940 | |
966 | 941 | var isTextVisible = $scope.GetCAwindowStoreData(windowviewid, 'isTextVisible'); |
967 | 942 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -36,8 +36,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
36 | 36 | localStorage.setItem("currentCITabView", $scope.activeTab); |
37 | 37 | }; |
38 | 38 | |
39 | - $scope.initializeCIWindowData = function (windowviewid, isOpenWithExistsModule, cbwindowid) { | |
40 | - if (isOpenWithExistsModule || cbwindowid == 0) { | |
39 | + $scope.initializeCIWindowData = function (windowviewid, isOpenWithExistsModule, openPanelNo) { | |
40 | + if (isOpenWithExistsModule || openPanelNo == 0) { | |
41 | 41 | if ($rootScope.CIWindowData != undefined) { |
42 | 42 | $rootScope.CIWindowData.length = 0; |
43 | 43 | } |
... | ... | @@ -174,6 +174,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
174 | 174 | if (index != -1) { |
175 | 175 | // remove module which one is loaded |
176 | 176 | $scope.CIWindowData.splice(index, 1); |
177 | + if ($('#' + panelid).html() != undefined) { | |
178 | + | |
179 | + $('#' + panelid).remove(); | |
180 | + | |
181 | + } | |
177 | 182 | $rootScope.resetjsPanelTop(); |
178 | 183 | } |
179 | 184 | } |
... | ... | @@ -187,6 +192,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
187 | 192 | $rootScope.isCallFromOtherModule = undefined; |
188 | 193 | |
189 | 194 | $rootScope.MULTI_VIEW_ID += 1 |
195 | + | |
196 | + // store exist module in module service | |
197 | + var ExistData = ModuleService.getModuleData("CLINICAL_ILLUSTRATIONS"); | |
198 | + | |
199 | + if (ExistData != undefined && ExistData.length > 0) { | |
200 | + // clear all module data before open new module in cb | |
201 | + ModuleService.ClearWinDataByModule(ExistData.mType); | |
202 | + } | |
203 | + var newWindowData = { | |
204 | + "mType": 'CLINICAL_ILLUSTRATIONS', | |
205 | + }; | |
206 | + ModuleService.setModuleData(newWindowData, 0); | |
190 | 207 | |
191 | 208 | $scope.initializeCIWindowData($rootScope.MULTI_VIEW_ID, true, undefined); |
192 | 209 | |
... | ... | @@ -295,7 +312,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
295 | 312 | $scope.loadAllCI(windowviewid); |
296 | 313 | } |
297 | 314 | else { |
298 | - $scope.ApplySearch($scope.query); | |
315 | + $scope.ApplySearch($scope.query, windowviewid); | |
299 | 316 | } |
300 | 317 | |
301 | 318 | } |
... | ... | @@ -332,7 +349,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
332 | 349 | |
333 | 350 | $('#grid-view').empty(); |
334 | 351 | var $e1 = $('<ul><li ng-repeat="value in selectedCIListViewData" class="col-sm-3 col-md-2"><div id="{{value._id}}" title = "{{value._Title}}" class="GridViewDataDivHeight" data-ng-click="openView($event)">' |
335 | - + '<div class="thumbnail" >' | |
352 | + + '<div class="thumbnail" ><a href="#">' | |
336 | 353 | + '<img id="{{value._Title}}" ng-src="~/../content/images/ci/thumbnails/{{value._ThumbnailImage}}" >'//alt="{{value._Title}}" >' |
337 | 354 | + '<div class="caption"><p> {{value._Title}}</p></div></a></div></div></li></ul>').appendTo('#grid-view'); |
338 | 355 | $compile($e1)($scope); |
... | ... | @@ -435,7 +452,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
435 | 452 | $scope.filterstring = false; |
436 | 453 | |
437 | 454 | $scope.SetCIwindowStoreData(windowviewid, 'searchCIListViewData', []); |
438 | - | |
455 | + $scope.DisableUI(); | |
439 | 456 | $scope.loadAllCI(windowviewid); |
440 | 457 | |
441 | 458 | } |
... | ... | @@ -583,7 +600,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
583 | 600 | $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; |
584 | 601 | |
585 | 602 | var $el = $('<div id="' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '" data-ng-click="openView($event)">' |
586 | - + '<div class="thumbnail" >' | |
603 | + + '<div class="thumbnail" ><a href="#">' | |
587 | 604 | + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' |
588 | 605 | + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); |
589 | 606 | |
... | ... | @@ -636,7 +653,24 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
636 | 653 | } |
637 | 654 | |
638 | 655 | |
639 | - $scope.openView = function ($event) { | |
656 | + $scope.openView = function ($event) { | |
657 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
658 | + $rootScope.MenuModuleName = "CI"; | |
659 | + $rootScope.disableAnnotationTB = false; | |
660 | + $rootScope.CIAnotationIdentifyModeOff = true; | |
661 | + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | |
662 | + var selectedTileData = []; | |
663 | + selectedTileData = new jinqJs() | |
664 | + .from($scope.selectedCIListViewData) | |
665 | + .where('_id = ' + $event.currentTarget.id) | |
666 | + .select(); | |
667 | + | |
668 | + $rootScope.ViewTitle = selectedTileData[0]._Title; | |
669 | + } | |
670 | + else { | |
671 | + $rootScope.ViewTitle = $event.currentTarget.textContent; | |
672 | + | |
673 | + } | |
640 | 674 | // open module bu openresource |
641 | 675 | var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); |
642 | 676 | if (isopenResourceRequest == "true") { |
... | ... | @@ -646,35 +680,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
646 | 680 | "id": $event.currentTarget.id, |
647 | 681 | "mType": 'CLINICAL_ILLUSTRATIONS', |
648 | 682 | "textVisible": true, |
649 | - "windowTitle": $event.currentTarget.textContent, | |
683 | + "windowTitle": $rootScope.ViewTitle, | |
650 | 684 | "size": { height: 600, width: 900 } |
651 | 685 | }; |
652 | 686 | |
653 | 687 | window.parent.AIAModuleOpenResourceInfo(CIDopenData); |
654 | 688 | |
655 | - window.parent.closeIFrame(); | |
656 | - | |
657 | 689 | } |
658 | 690 | else |
659 | - { | |
660 | - var windowviewid = $rootScope.MULTI_VIEW_ID; | |
661 | - $rootScope.MenuModuleName = "CI"; | |
662 | - $rootScope.disableAnnotationTB = false; | |
663 | - $rootScope.CIAnotationIdentifyModeOff = true; | |
664 | - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | |
665 | - var selectedTileData = []; | |
666 | - selectedTileData = new jinqJs() | |
667 | - .from($scope.selectedCIListViewData) | |
668 | - .where('_id = ' + $event.currentTarget.id) | |
669 | - .select(); | |
670 | - | |
671 | - $rootScope.ViewTitle = selectedTileData[0]._Title; | |
672 | - } | |
673 | - else { | |
674 | - $rootScope.ViewTitle = $event.currentTarget.textContent; | |
675 | - | |
676 | - } | |
677 | - | |
691 | + { | |
678 | 692 | localStorage.setItem("currentViewTitle", $rootScope.ViewTitle); |
679 | 693 | localStorage.setItem("currentImageId", $event.currentTarget.id); |
680 | 694 | |
... | ... | @@ -717,12 +731,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
717 | 731 | $scope.wincount = 1; |
718 | 732 | var winlen = $scope.CIModuleData.length; |
719 | 733 | var timeint = null; |
720 | - var slideId = ""; | |
721 | 734 | timeint = $interval(function () { |
722 | 735 | |
723 | 736 | if ($scope.readyToLoad == true) { |
724 | 737 | var windata = $scope.CIModuleData[$scope.wincount - 1]; |
725 | - slideId = windata.slideId; | |
726 | 738 | $scope.openBodyView(windata); |
727 | 739 | |
728 | 740 | } |
... | ... | @@ -735,7 +747,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
735 | 747 | |
736 | 748 | if ($scope.wincount == winlen && $rootScope.CIWindowLoadComplete == true) { |
737 | 749 | $scope.stopInterval(); |
738 | - $scope.$emit("LoadModuleComplete", "CLINICAL_ILLUSTRATIONS", slideId); | |
750 | + $scope.$emit("LoadModuleComplete", "CLINICAL_ILLUSTRATIONS"); | |
739 | 751 | } |
740 | 752 | |
741 | 753 | |
... | ... | @@ -859,8 +871,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
859 | 871 | $scope.jsPanelTop = 70; |
860 | 872 | } |
861 | 873 | |
862 | - | |
863 | - | |
864 | 874 | $.jsPanel({ |
865 | 875 | id: $scope.jsPanelID, |
866 | 876 | selector: '.ciView', |
... | ... | @@ -873,7 +883,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
873 | 883 | '<div align="left" id="sid_' + windowviewid + '"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' + |
874 | 884 | '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");}});});</script></div>' + |
875 | 885 | '</div></div>', |
876 | - title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
886 | + title: tittle, | |
877 | 887 | position: { |
878 | 888 | top: $scope.jsPanelTop, |
879 | 889 | left: $scope.jsPanelLeft |
... | ... | @@ -921,9 +931,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
921 | 931 | $rootScope.isLoading = false; |
922 | 932 | $('#spinner').css('visibility', 'hidden'); |
923 | 933 | |
924 | - if ($rootScope.isCallFromOtherModule) { | |
925 | - $scope.JsPanelclick(windowviewid); | |
926 | - } | |
934 | + //if ($rootScope.isCallFromOtherModule) { | |
935 | + // $scope.JsPanelclick(windowviewid); | |
936 | + //} | |
937 | + $scope.JsPanelclick(windowviewid); | |
927 | 938 | |
928 | 939 | $rootScope.CIWindowLoadComplete = true; |
929 | 940 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -38,16 +38,16 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
38 | 38 | tinymce.execCommand('mceRemoveEditor', true, 'CBTextArea'); |
39 | 39 | tinymce.execCommand('mceAddEditor', true, 'CBTextArea'); |
40 | 40 | |
41 | - } | |
42 | - | |
43 | - if ($('#' + id).html() != undefined) { | |
41 | + if ($('#' + id).html() != undefined) { | |
44 | 42 | |
45 | - $('#' + id).remove(); | |
43 | + $('#' + id).remove(); | |
46 | 44 | |
47 | - // remove panel name from dropdown | |
48 | - $('#viwerSelect option[value="' + id + '"]').remove(); | |
49 | - | |
45 | + } | |
50 | 46 | } |
47 | + | |
48 | + // remove panel name from dropdown | |
49 | + $('#viwerSelect option[value="' + id + '"]').remove(); | |
50 | + | |
51 | 51 | //Added code by sandeep for fixed Bug-58066 |
52 | 52 | var ddlViewerLen = $("#viwerSelect option").length; |
53 | 53 | if (ddlViewerLen == 0) { |
... | ... | @@ -487,18 +487,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
487 | 487 | $scope.TinyMCEPanelclick(); |
488 | 488 | },1000); |
489 | 489 | |
490 | - if ($rootScope.isOpenResourceBtnClicked == true) { | |
491 | - switch ($rootScope.MenuModuleName) { | |
492 | - case 'DA': | |
493 | - $e = $('#resourceModuleDiv').append("<div da-directive></div>"); | |
494 | - $compile($e)($scope); | |
495 | - break; | |
496 | - } | |
497 | - //$compile($e)($scope); | |
498 | - | |
499 | - } | |
500 | - | |
501 | - | |
502 | 490 | } |
503 | 491 | |
504 | 492 | |
... | ... | @@ -605,8 +593,8 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
605 | 593 | |
606 | 594 | $("#viwerSelect").empty(); |
607 | 595 | $("#viwerSelect").hide(); |
608 | - if ($('#parentcustomDiv').html() != "") { | |
609 | - $('#parentcustomDiv').empty(); | |
596 | + if ($('#cbparentcustomDiv').html() != "") { | |
597 | + $('#cbparentcustomDiv').empty(); | |
610 | 598 | } |
611 | 599 | |
612 | 600 | if ($scope.SelectedNotes != "" && $scope.SelectedNotes != undefined) { |
... | ... | @@ -1245,7 +1233,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1245 | 1233 | // } |
1246 | 1234 | |
1247 | 1235 | if (windowData.mType == "DISSECTIBLE_ANATOMY") { |
1248 | - ModuleService.setModuleData(windowData, DawindowId, $scope.Slidenumber); | |
1236 | + ModuleService.setModuleData(windowData, DawindowId); | |
1249 | 1237 | DawindowId = DawindowId + 1; |
1250 | 1238 | |
1251 | 1239 | var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) |
... | ... | @@ -1256,7 +1244,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1256 | 1244 | |
1257 | 1245 | } |
1258 | 1246 | else if (windowData.mType == "ATLAS_ANATOMY") { |
1259 | - ModuleService.setModuleData(windowData, AtlasWindowId, $scope.Slidenumber); | |
1247 | + ModuleService.setModuleData(windowData, AtlasWindowId); | |
1260 | 1248 | AtlasWindowId = AtlasWindowId + 1; |
1261 | 1249 | var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) |
1262 | 1250 | if (isFound == -1) { |
... | ... | @@ -1264,7 +1252,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1264 | 1252 | } |
1265 | 1253 | } |
1266 | 1254 | else if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { |
1267 | - ModuleService.setModuleData(windowData, CIWindowId, $scope.Slidenumber); | |
1255 | + ModuleService.setModuleData(windowData, CIWindowId); | |
1268 | 1256 | CIWindowId = CIWindowId + 1; |
1269 | 1257 | var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) |
1270 | 1258 | if (isFound == -1) { |
... | ... | @@ -1272,7 +1260,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1272 | 1260 | } |
1273 | 1261 | } |
1274 | 1262 | else if (windowData.mType == "CLINICAL_ANIMATIONS") { |
1275 | - ModuleService.setModuleData(windowData, CAWindowId, $scope.Slidenumber); | |
1263 | + ModuleService.setModuleData(windowData, CAWindowId); | |
1276 | 1264 | CAWindowId = CAWindowId + 1; |
1277 | 1265 | var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) |
1278 | 1266 | if (isFound == -1) { |
... | ... | @@ -1280,7 +1268,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1280 | 1268 | } |
1281 | 1269 | } |
1282 | 1270 | else if (windowData.mType == "THREE_D_ANATOMY") { |
1283 | - ModuleService.setModuleData(windowData, ThreeDWindowId, $scope.Slidenumber); | |
1271 | + ModuleService.setModuleData(windowData, ThreeDWindowId); | |
1284 | 1272 | ThreeDWindowId = ThreeDWindowId + 1; |
1285 | 1273 | var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) |
1286 | 1274 | if (isFound == -1) { |
... | ... | @@ -1307,21 +1295,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1307 | 1295 | $scope.LoadModuleName.push(windowData.mType); |
1308 | 1296 | } |
1309 | 1297 | |
1310 | - ModuleService.setModuleData(windowData, DawindowId, $scope.Slidenumber); | |
1298 | + ModuleService.setModuleData(windowData, DawindowId); | |
1311 | 1299 | } |
1312 | 1300 | else if (windowData.mType == "ATLAS_ANATOMY") { |
1313 | 1301 | var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) |
1314 | 1302 | if (isFound == -1) { |
1315 | 1303 | $scope.LoadModuleName.push(windowData.mType); |
1316 | 1304 | } |
1317 | - ModuleService.setModuleData(windowData, AtlasWindowId, $scope.Slidenumber); | |
1305 | + ModuleService.setModuleData(windowData, AtlasWindowId); | |
1318 | 1306 | } |
1319 | 1307 | else if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { |
1320 | 1308 | var isFound = jQuery.inArray(windowData.mType, $scope.LoadModuleName) |
1321 | 1309 | if (isFound == -1) { |
1322 | 1310 | $scope.LoadModuleName.push(windowData.mType); |
1323 | 1311 | } |
1324 | - ModuleService.setModuleData(windowData, CIWindowId, $scope.Slidenumber); | |
1312 | + ModuleService.setModuleData(windowData, CIWindowId); | |
1325 | 1313 | |
1326 | 1314 | } |
1327 | 1315 | else if (windowData.mType == "CLINICAL_ANIMATIONS") { |
... | ... | @@ -1329,7 +1317,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1329 | 1317 | if (isFound == -1) { |
1330 | 1318 | $scope.LoadModuleName.push(windowData.mType); |
1331 | 1319 | } |
1332 | - ModuleService.setModuleData(windowData, CAWindowId, $scope.Slidenumber); | |
1320 | + ModuleService.setModuleData(windowData, CAWindowId); | |
1333 | 1321 | |
1334 | 1322 | } |
1335 | 1323 | else if (windowData.mType == "THREE_D_ANATOMY") { |
... | ... | @@ -1337,22 +1325,21 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1337 | 1325 | if (isFound == -1) { |
1338 | 1326 | $scope.LoadModuleName.push(windowData.mType); |
1339 | 1327 | } |
1340 | - ModuleService.setModuleData(windowData, ThreeDWindowId, $scope.Slidenumber); | |
1328 | + ModuleService.setModuleData(windowData, ThreeDWindowId); | |
1341 | 1329 | |
1342 | 1330 | } |
1343 | 1331 | |
1344 | 1332 | } |
1345 | 1333 | |
1346 | 1334 | // intially call module at index 0 |
1347 | - $scope.$emit("LoadModuleComplete", "", $scope.Slidenumber); | |
1335 | + $scope.$emit("LoadModuleComplete", ""); | |
1348 | 1336 | |
1349 | 1337 | } |
1350 | 1338 | |
1351 | - $scope.$on("LoadModuleComplete", function (evt, name, slideno) { | |
1339 | + $scope.$on("LoadModuleComplete", function (evt, name) { | |
1352 | 1340 | |
1353 | 1341 | if ($scope.LoadModuleName != undefined) { |
1354 | 1342 | |
1355 | - if (slideno == $scope.Slidenumber) { | |
1356 | 1343 | var index = $scope.LoadModuleName.indexOf(name); |
1357 | 1344 | if (index != -1) { |
1358 | 1345 | // remove module which one is loaded |
... | ... | @@ -1391,8 +1378,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1391 | 1378 | |
1392 | 1379 | } |
1393 | 1380 | |
1394 | - } | |
1395 | - | |
1396 | 1381 | } |
1397 | 1382 | |
1398 | 1383 | }); |
... | ... | @@ -1425,11 +1410,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1425 | 1410 | if (ThreeDData != undefined && ThreeDData.length > 0) { |
1426 | 1411 | $rootScope.isCallFromOtherModule = true; |
1427 | 1412 | |
1428 | - var threeDSectionExist = document.getElementById('theeDCustomModuleDiv' + $scope.Slidenumber); | |
1413 | + var threeDSectionExist = document.getElementById('theeDCustomModuleDiv'); | |
1429 | 1414 | |
1430 | 1415 | if (threeDSectionExist == null) { |
1431 | - $('#parentcustomDiv').append($('<div id="theeDCustomModuleDiv' + $scope.Slidenumber + '"></div>')); | |
1432 | - $e = $('#theeDCustomModuleDiv' + $scope.Slidenumber).append("<threed-anatomy-directive></threed-anatomy-directive>"); | |
1416 | + $('#cbparentcustomDiv').append($('<div id="theeDCustomModuleDiv"></div>')); | |
1417 | + $e = $('#theeDCustomModuleDiv').append("<threed-anatomy-directive></threed-anatomy-directive>"); | |
1433 | 1418 | $compile($e)($scope); |
1434 | 1419 | } |
1435 | 1420 | else { |
... | ... | @@ -1445,11 +1430,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1445 | 1430 | if (CAData != undefined && CAData.length > 0) { |
1446 | 1431 | $rootScope.isCallFromOtherModule = true; |
1447 | 1432 | |
1448 | - var caSectionExist = document.getElementById('caCustomModuleDiv' + $scope.Slidenumber); | |
1433 | + var caSectionExist = document.getElementById('caCustomModuleDiv'); | |
1449 | 1434 | |
1450 | 1435 | if (caSectionExist == null) { |
1451 | - $('#parentcustomDiv').append($('<div id="caCustomModuleDiv' + $scope.Slidenumber + '"></div>')); | |
1452 | - $e = $('#caCustomModuleDiv' + $scope.Slidenumber).append("<clinical-animation-directive></clinical-animation-directive>"); | |
1436 | + $('#cbparentcustomDiv').append($('<div id="caCustomModuleDiv"></div>')); | |
1437 | + $e = $('#caCustomModuleDiv').append("<clinical-animation-directive></clinical-animation-directive>"); | |
1453 | 1438 | $compile($e)($scope); |
1454 | 1439 | } |
1455 | 1440 | else { |
... | ... | @@ -1467,11 +1452,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1467 | 1452 | if (CIData != undefined && CIData.length > 0) { |
1468 | 1453 | $rootScope.isCallFromOtherModule = true; |
1469 | 1454 | |
1470 | - var ciSectionExist = document.getElementById('ciCustomModuleDiv' + $scope.Slidenumber); | |
1455 | + var ciSectionExist = document.getElementById('ciCustomModuleDiv'); | |
1471 | 1456 | |
1472 | 1457 | if (ciSectionExist == null) { |
1473 | - $('#parentcustomDiv').append($('<div id="ciCustomModuleDiv' + $scope.Slidenumber + '"></div>')); | |
1474 | - $e = $('#ciCustomModuleDiv' + $scope.Slidenumber).append("<clinical-illustration-directive></clinical-illustration-directive>"); | |
1458 | + $('#cbparentcustomDiv').append($('<div id="ciCustomModuleDiv"></div>')); | |
1459 | + $e = $('#ciCustomModuleDiv').append("<clinical-illustration-directive></clinical-illustration-directive>"); | |
1475 | 1460 | $compile($e)($scope); |
1476 | 1461 | } |
1477 | 1462 | else { |
... | ... | @@ -1489,11 +1474,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1489 | 1474 | if (AAData != undefined && AAData.length > 0) { |
1490 | 1475 | $rootScope.isCallFromOtherModule = true; |
1491 | 1476 | |
1492 | - var aaSectionExist = document.getElementById('aaCustomModuleDiv' + $scope.Slidenumber); | |
1477 | + var aaSectionExist = document.getElementById('aaCustomModuleDiv'); | |
1493 | 1478 | |
1494 | 1479 | if (aaSectionExist == null) { |
1495 | - $('#parentcustomDiv').append($('<div id="aaCustomModuleDiv' + $scope.Slidenumber + '"></div>')); | |
1496 | - $e = $('#aaCustomModuleDiv' + $scope.Slidenumber).append("<atlas-anatomy-directive></atlas-anatomy-directive>"); | |
1480 | + $('#cbparentcustomDiv').append($('<div id="aaCustomModuleDiv"></div>')); | |
1481 | + $e = $('#aaCustomModuleDiv').append("<atlas-anatomy-directive></atlas-anatomy-directive>"); | |
1497 | 1482 | $compile($e)($scope); |
1498 | 1483 | } |
1499 | 1484 | else { |
... | ... | @@ -1510,11 +1495,11 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1510 | 1495 | if (DAData != undefined && DAData.length > 0) { |
1511 | 1496 | $rootScope.isCallFromOtherModule = true; |
1512 | 1497 | |
1513 | - var daSectionExist = document.getElementById('daCustomModuleDiv' + $scope.Slidenumber); | |
1498 | + var daSectionExist = document.getElementById('daCustomModuleDiv'); | |
1514 | 1499 | |
1515 | 1500 | if (daSectionExist==null){ |
1516 | - $('#parentcustomDiv').append($('<div id="daCustomModuleDiv' + $scope.Slidenumber + '"></div>')); | |
1517 | - $e = $('#daCustomModuleDiv' + $scope.Slidenumber).append("<da-directive></da-directive>"); | |
1501 | + $('#cbparentcustomDiv').append($('<div id="daCustomModuleDiv"></div>')); | |
1502 | + $e = $('#daCustomModuleDiv').append("<da-directive></da-directive>"); | |
1518 | 1503 | $compile($e)($scope); |
1519 | 1504 | } |
1520 | 1505 | else |
... | ... | @@ -1539,13 +1524,13 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1539 | 1524 | //open resoruce on slide |
1540 | 1525 | $scope.loadResourceOnCurrentSlide = function (newWindowData) { |
1541 | 1526 | |
1542 | - var newwindowid = 0; | |
1527 | + var newwindowNo = 0; | |
1543 | 1528 | |
1544 | 1529 | var ExistData = ModuleService.getModuleData(newWindowData.mType); |
1545 | 1530 | |
1546 | 1531 | if (ExistData != undefined && ExistData.length > 0) { |
1547 | 1532 | |
1548 | - newwindowid = newwindowid + ExistData.length; | |
1533 | + newwindowNo = newwindowNo + ExistData.length; | |
1549 | 1534 | |
1550 | 1535 | // clear all module data before open new module in cb |
1551 | 1536 | ModuleService.ClearWinDataByModule(newWindowData.mType); |
... | ... | @@ -1554,23 +1539,22 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
1554 | 1539 | if (isFound == -1) { |
1555 | 1540 | $scope.LoadModuleName.push(newWindowData.mType); |
1556 | 1541 | } |
1557 | - | |
1558 | - ModuleService.setModuleData(newWindowData, newwindowid, $scope.Slidenumber); | |
1542 | + ModuleService.setModuleData(newWindowData, newwindowNo); | |
1559 | 1543 | |
1560 | 1544 | // intially call module at index 0 |
1561 | - $scope.$emit("LoadModuleComplete", "", $scope.Slidenumber); | |
1545 | + $scope.$emit("LoadModuleComplete", ""); | |
1562 | 1546 | |
1563 | 1547 | } |
1564 | 1548 | |
1565 | 1549 | }] |
1566 | 1550 | ); |
1567 | 1551 | |
1568 | -function AIAModuleOpenResourceInfo(windowData) { | |
1569 | - sessionStorage.removeItem('isModuleOpenByOpenResource'); | |
1570 | - | |
1552 | +function AIAModuleOpenResoureInCB(windowData) { | |
1553 | + | |
1571 | 1554 | var scope = angular.element(document.querySelector('[ng-controller="CurrBuildController"]')).scope(); |
1572 | 1555 | scope.$apply(function () { |
1573 | 1556 | scope.loadResourceOnCurrentSlide(windowData); |
1574 | 1557 | }); |
1558 | + | |
1575 | 1559 | } |
1576 | 1560 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -50,9 +50,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
50 | 50 | |
51 | 51 | } |
52 | 52 | |
53 | - $scope.initializeDAWindowData = function(windowviewid,isOpenWithExistsModule,cbwindowid){ | |
53 | + $scope.initializeDAWindowData = function(windowviewid,isOpenWithExistsModule,openPanelNo){ | |
54 | 54 | |
55 | - if(isOpenWithExistsModule ||cbwindowid==0) | |
55 | + if (isOpenWithExistsModule || openPanelNo == 0) | |
56 | 56 | { |
57 | 57 | if ($rootScope.DaWindowData != undefined) |
58 | 58 | { |
... | ... | @@ -525,10 +525,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
525 | 525 | |
526 | 526 | } ; |
527 | 527 | |
528 | - window.parent.AIAModuleOpenResourceInfo(DaopenData); | |
529 | - | |
530 | - window.parent.closeIFrame(); | |
531 | - | |
528 | + //window.parent.closeIFrame(); | |
529 | + window.parent.AIAModuleOpenResourceInfo(DaopenData); | |
530 | + | |
532 | 531 | } |
533 | 532 | else |
534 | 533 | { |
... | ... | @@ -563,7 +562,20 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
563 | 562 | $location.path('/'); |
564 | 563 | } |
565 | 564 | $scope.ScopeVariablesDeclare(); |
566 | - | |
565 | + | |
566 | + // store exist module in module service | |
567 | + var ExistData = ModuleService.getModuleData("DISSECTIBLE_ANATOMY"); | |
568 | + | |
569 | + if (ExistData != undefined && ExistData.length > 0) { | |
570 | + // clear all module data before open new module in cb | |
571 | + ModuleService.ClearWinDataByModule(ExistData.mType); | |
572 | + } | |
573 | + var newWindowData = { | |
574 | + "mType": 'DISSECTIBLE_ANATOMY', | |
575 | + }; | |
576 | + ModuleService.setModuleData(newWindowData, 0); | |
577 | + | |
578 | + | |
567 | 579 | $scope.initializeDAWindowData(windowviewid, true, undefined); |
568 | 580 | |
569 | 581 | //get current path |
... | ... | @@ -625,13 +637,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
625 | 637 | $scope.wincount=1; |
626 | 638 | var winlen=$scope.DAModuleData.length; |
627 | 639 | var timeint = null; |
628 | - var slideId = ""; | |
629 | 640 | timeint = $interval(function() { |
630 | 641 | |
631 | 642 | if($scope.readyToLoad==true) |
632 | 643 | { |
633 | 644 | var windata = $scope.DAModuleData[$scope.wincount - 1]; |
634 | - slideId = windata.slideId; //use to skip last execution slide | |
635 | 645 | $scope.openBodyView(windata); |
636 | 646 | |
637 | 647 | } |
... | ... | @@ -648,7 +658,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
648 | 658 | $scope.stopInterval(); |
649 | 659 | // scope variable to use for other module |
650 | 660 | // $rootScope.CBWindowLoadComplete==true |
651 | - $scope.$emit("LoadModuleComplete", "DISSECTIBLE_ANATOMY", slideId); | |
661 | + $scope.$emit("LoadModuleComplete", "DISSECTIBLE_ANATOMY"); | |
652 | 662 | } |
653 | 663 | |
654 | 664 | |
... | ... | @@ -814,7 +824,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
814 | 824 | |
815 | 825 | } |
816 | 826 | else { |
817 | - $rootScope.jsPanelWidth = $(window).outerWidth() - 10; | |
827 | + $rootScope.jsPanelWidth = $(window).outerWidth() - 20; | |
818 | 828 | $rootScope.jsPanelHeight = $(window).outerHeight() - 110; |
819 | 829 | $rootScope.jsPanelLeft = 1; |
820 | 830 | $rootScope.jsPanelTop = 70; |
... | ... | @@ -905,9 +915,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
905 | 915 | |
906 | 916 | $scope.setControlIDs(); |
907 | 917 | |
908 | - if ($rootScope.isCallFromOtherModule) { | |
909 | - $scope.JsPanelclick(windowviewid); | |
910 | - } | |
918 | + //if ($rootScope.isCallFromOtherModule) { | |
919 | + // $scope.JsPanelclick(windowviewid); | |
920 | + //} | |
921 | + | |
922 | + $scope.JsPanelclick(windowviewid); | |
923 | + | |
911 | 924 | |
912 | 925 | $scope.NavigatorDraggable(windowviewid) |
913 | 926 | $scope.loadbtnNavigator(windowviewid); |
... | ... | @@ -1337,6 +1350,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1337 | 1350 | if (index != -1) { |
1338 | 1351 | // remove module which one is loaded |
1339 | 1352 | $scope.DaWindowData.splice(index, 1); |
1353 | + | |
1354 | + if ($('#' + panelid).html() != undefined) { | |
1355 | + | |
1356 | + $('#' + panelid).remove(); | |
1357 | + | |
1358 | + } | |
1340 | 1359 | $rootScope.resetjsPanelTop(); |
1341 | 1360 | } |
1342 | 1361 | } |
... | ... | @@ -10679,4 +10698,4 @@ function viewChange(event) { |
10679 | 10698 | $("#" + event.currentTarget.id).parent().toggleClass('active'); |
10680 | 10699 | $("#da-input_" + windowviewid).parent().parent().parent().parent().toggleClass('active'); |
10681 | 10700 | |
10682 | - } | |
10683 | 10701 | \ No newline at end of file |
10702 | + } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
1 | 1 | 'use strict'; |
2 | 2 | |
3 | -AIA.controller("HomeController", ["$rootScope", "$scope", "Modules", "$log", "$location", "$timeout", "DataService", "AuthenticationService", "ConfigurationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", "AIAConstants", | |
4 | -function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, AuthenticationService, ConfigurationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants, AIAConstants) { | |
3 | +AIA.controller("HomeController", ["$rootScope", "$scope", "Modules", "$log", "$location", "$compile", "$timeout", "DataService", "AuthenticationService", "ConfigurationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", "AIAConstants","ModuleService", | |
4 | +function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, DataService, AuthenticationService, ConfigurationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants, AIAConstants, ModuleService) { | |
5 | 5 | |
6 | 6 | //$scope.pageToOpen = { |
7 | 7 | // name: 'MainMenu' |
... | ... | @@ -130,19 +130,56 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
130 | 130 | |
131 | 131 | // var homepath = $location.protocol() + "//" + $location.host() + ":" + $location.port() + "/"; |
132 | 132 | var homepath = $rootScope.homeURL; |
133 | - $("#CBDetailPageDiv").css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); | |
133 | + $("#HomeContainerDiv").css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); | |
134 | 134 | $(".navbar-fixed-top").css({"display": "none", "pointer-events": "none", "opacity": ".5" }); |
135 | 135 | |
136 | + var parentslag = ""; | |
137 | + var openNewlink = ""; | |
138 | + if ($location.url() == "/curriculum-builder") { | |
136 | 139 | |
140 | + parentslag = "curriculum-builder"; | |
141 | + openNewlink = "curriculum-builder"; | |
142 | + } | |
143 | + else if ($location.url() == "/curriculum-builder-detail") { | |
144 | + | |
145 | + parentslag = "curriculum-builder-detail" | |
146 | + openNewlink = "curriculum-builder"; | |
147 | + } | |
148 | + else if (($location.url() == "/da-body-view")) { | |
149 | + parentslag = "da-body-view"; | |
150 | + openNewlink = "da-view-list"; | |
151 | + } | |
152 | + else if ($location.url() == "/clinical-illustrations-detail") { | |
153 | + parentslag = "clinical-illustrations-detail" | |
154 | + openNewlink = "clinical-illustrations"; | |
155 | + } | |
156 | + else if ($location.url() == "/module-item-view") { | |
157 | + parentslag = "module-item-view"; | |
158 | + openNewlink = "tile-view-list"; | |
159 | + } | |
160 | + | |
161 | + else if ($location.url() == "/clinical-animations-detail") { | |
162 | + parentslag = "clinical-animations-detail"; | |
163 | + openNewlink = "clinical-animations"; | |
164 | + } | |
165 | + else if ($location.url() == "/adam-images-detail") { | |
166 | + parentslag = "adam-images-detail"; | |
167 | + openNewlink = "ADAM-images"; | |
168 | + } | |
169 | + else if ($location.url() == "/3d-anatomy-details") { | |
170 | + parentslag = "3d-anatomy-details"; | |
171 | + openNewlink = "3d-anatomy-list"; | |
172 | + } | |
173 | + | |
137 | 174 | $.jsPanel({ |
138 | - id: 'OpenResourcePanel', | |
175 | + id: 'dvOpenResourcePanel', | |
139 | 176 | selector: '#dvOpenResoucePanel', |
140 | 177 | theme: 'success', |
141 | 178 | currentController: 'HomeController', |
142 | - parentSlug: 'curriculum-builder-detail', | |
179 | + parentSlug: parentslag, | |
143 | 180 | content: '<div class="col-sm-12" >' + |
144 | - '<iframe src="' + homepath + '" width="100%" height="610px" frameBorder="0" id="OpenModuleInCB" onload="loadOpenResource(this)"></iframe>', | |
145 | - title: "Open Module in Curriculum Builder", | |
181 | + '<iframe src="' + homepath + '" width="100%" height="610px" frameBorder="0" name="' + openNewlink + '" id="OpenModuleInCB" onload="OpenResourcePanel(this)"></iframe>', | |
182 | + title: "", | |
146 | 183 | position: { |
147 | 184 | top: 1, |
148 | 185 | left: 1 |
... | ... | @@ -159,7 +196,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
159 | 196 | |
160 | 197 | } |
161 | 198 | |
162 | - $scope.loadOpenResource = function (iframe) { | |
199 | + $scope.OpenResourcePanel = function (iframe) { | |
163 | 200 | |
164 | 201 | //var iframe = document.getElementById('OpenModuleInCB'); |
165 | 202 | var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document; |
... | ... | @@ -187,13 +224,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
187 | 224 | '#topMenuBar{pointer-events: none; opacity: .3} ' + |
188 | 225 | |
189 | 226 | '#Link\\/encyclopedia{pointer-events: none; opacity: .3} ' + |
190 | - '#curriculum-builder{pointer-events: none; opacity: .3} ' + | |
227 | + // '#curriculum-builder{pointer-events: none; opacity: .3} ' + | |
191 | 228 | '#anatomy-test{pointer-events: none; opacity: .3} ' + |
192 | 229 | '#Link\\/IP-10{pointer-events: none; opacity: .3} ' + |
193 | 230 | '#lab-exercises{pointer-events: none; opacity: .3} ' + |
194 | 231 | '#Link\\/indepth-reports{pointer-events: none; opacity: .3} ' + |
195 | 232 | '#Link\\/complementary-and-alternate-medicine{pointer-events: none; opacity: .3} ' + |
196 | - '#ADAM-images{pointer-events: none; opacity: .3} ' + | |
233 | + // '#ADAM-images{pointer-events: none; opacity: .3} ' + | |
197 | 234 | '#Link\\/bodyguide{pointer-events: none; opacity: .3} ' + |
198 | 235 | '#Link\\/symptom-navigator{pointer-events: none; opacity: .3} ' + |
199 | 236 | '#Link\\/health-navigator{pointer-events: none; opacity: .3} ' + |
... | ... | @@ -203,7 +240,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
203 | 240 | |
204 | 241 | '</style>'; |
205 | 242 | |
206 | - var storefunc = '<script> function OpenDefaultModule(iframe){ iframe.contentWindow.document.getElementById("da-view-list").click();}</script>'; | |
243 | + var storefunc = '<script> function OpenDefaultModule(iframe){ iframe.contentWindow.document.getElementById(iframe.name).click();}</script>'; | |
207 | 244 | |
208 | 245 | $(header).append(css); |
209 | 246 | $(header).append(storefunc); |
... | ... | @@ -218,6 +255,148 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
218 | 255 | |
219 | 256 | } |
220 | 257 | |
258 | + $scope.AIAModuleOpenResourceInfo = function (newWindowData) | |
259 | + { | |
260 | + $timeout(function () { | |
261 | + $rootScope.isCallFromOtherModule = true; | |
262 | + | |
263 | + if ($location.url() != "/curriculum-builder-detail") { | |
264 | + var newwindowNo = 0; | |
265 | + | |
266 | + var ExistData = ModuleService.getModuleData(newWindowData.mType); | |
267 | + | |
268 | + if (ExistData != undefined && ExistData.length > 0) { | |
269 | + | |
270 | + newwindowNo = newwindowNo + ExistData.length; | |
271 | + | |
272 | + // clear module type data before open new module | |
273 | + ModuleService.ClearWinDataByModule(newWindowData.mType); | |
274 | + } | |
275 | + | |
276 | + ModuleService.setModuleData(newWindowData, newwindowNo); | |
277 | + } | |
278 | + | |
279 | + if ($location.url() == "/curriculum-builder") { | |
280 | + | |
281 | + // open exist cb here | |
282 | + } | |
283 | + else if ($location.url() == "/curriculum-builder-detail") { | |
284 | + | |
285 | + window.parent.AIAModuleOpenResoureInCB(newWindowData); | |
286 | + } | |
287 | + else if (($location.url() == "/da-body-view")) { | |
288 | + | |
289 | + $scope.loadOpenResourceWindow(newWindowData.mType, '#daBodyview'); | |
290 | + } | |
291 | + else if ($location.url() == "/clinical-illustrations-detail") { | |
292 | + $scope.loadOpenResourceWindow(newWindowData.mType, '#CIView'); | |
293 | + } | |
294 | + else if ($location.url() == "/module-item-view") { | |
295 | + | |
296 | + $scope.loadOpenResourceWindow(newWindowData.mType, '#aaBodyView'); | |
297 | + } | |
298 | + else if ($location.url() == "/clinical-animations-detail") { | |
299 | + $scope.loadOpenResourceWindow(newWindowData.mType, '#CAView'); | |
300 | + } | |
301 | + else if ($location.url() == "/adam-images-detail") { | |
302 | + $scope.loadOpenResourceWindow(newWindowData.mType, '#AIView'); | |
303 | + } | |
304 | + else if ($location.url() == "/3d-anatomy-details") { | |
305 | + | |
306 | + $scope.loadOpenResourceWindow(newWindowData.mType, '#ThreeDView'); | |
307 | + } | |
308 | + | |
309 | + }, 500); | |
310 | + | |
311 | + | |
312 | + } | |
313 | + | |
314 | + $scope.loadOpenResourceWindow = function (moduleName,BasemoduleDivId) | |
315 | + { | |
316 | + switch (moduleName) { | |
317 | + case "DISSECTIBLE_ANATOMY": | |
318 | + var daSectionExist = document.getElementById('daCustomModuleDiv'); | |
319 | + | |
320 | + if (daSectionExist == null && BasemoduleDivId != "#daBodyview") { | |
321 | + $(BasemoduleDivId).append($('<div id="daCustomModuleDiv"></div>')); | |
322 | + var html = $('#daCustomModuleDiv').append("<da-directive></da-directive>"); | |
323 | + $compile(html)($scope); | |
324 | + } | |
325 | + else { | |
326 | + // open another DA module | |
327 | + $rootScope.openDABodyViewMain(); | |
328 | + } | |
329 | + break; | |
330 | + case "ATLAS_ANATOMY": | |
331 | + var aaSectionExist = document.getElementById('aaCustomModuleDiv'); | |
332 | + | |
333 | + if (aaSectionExist == null && BasemoduleDivId != "#aaBodyView") { | |
334 | + $(BasemoduleDivId).append($('<div id="aaCustomModuleDiv"></div>')); | |
335 | + var html = $('#aaCustomModuleDiv').append("<atlas-anatomy-directive></atlas-anatomy-directive>"); | |
336 | + $compile(html)($scope); | |
337 | + } | |
338 | + else { | |
339 | + // open another AA module | |
340 | + $rootScope.openAAModuleItemMain(); | |
341 | + } | |
342 | + break; | |
343 | + case "CLINICAL_ILLUSTRATIONS": | |
344 | + var ciSectionExist = document.getElementById('ciCustomModuleDiv'); | |
345 | + | |
346 | + if (ciSectionExist == null && BasemoduleDivId != "#CIView") { | |
347 | + $(BasemoduleDivId).append($('<div id="ciCustomModuleDiv"></div>')); | |
348 | + var html = $('#ciCustomModuleDiv').append("<clinical-illustration-directive></clinical-illustration-directive>"); | |
349 | + $compile(html)($scope); | |
350 | + } | |
351 | + else { | |
352 | + // open another CI module | |
353 | + $rootScope.openCIBodyViewMain(); | |
354 | + } | |
355 | + break; | |
356 | + case "ADAM_IMAGES": | |
357 | + var aiSectionExist = document.getElementById('aiCustomModuleDiv'); | |
358 | + | |
359 | + if (aiSectionExist == null && BasemoduleDivId != "#AIView") { | |
360 | + $(BasemoduleDivId).append($('<div id="aiCustomModuleDiv"></div>')); | |
361 | + var html = $('#aiCustomModuleDiv').append("<adam-image-directive></adam-image-directive>"); | |
362 | + $compile(html)($scope); | |
363 | + } | |
364 | + else { | |
365 | + // open another AI module | |
366 | + $rootScope.OpenAdamImageViewMain(); | |
367 | + } | |
368 | + break; | |
369 | + case "CLINICAL_ANIMATIONS": | |
370 | + var caSectionExist = document.getElementById('caCustomModuleDiv'); | |
371 | + | |
372 | + if (caSectionExist == null && BasemoduleDivId != "#CAView") { | |
373 | + $(BasemoduleDivId).append($('<div id="caCustomModuleDiv"></div>')); | |
374 | + var html = $('#caCustomModuleDiv').append("<clinical-animation-directive></clinical-animation-directive>"); | |
375 | + $compile(html)($scope); | |
376 | + } | |
377 | + else { | |
378 | + // open another CA module | |
379 | + $rootScope.openCABodyViewMain(); | |
380 | + } | |
381 | + break; | |
382 | + case "THREE_D_ANATOMY": | |
383 | + var threeDSectionExist = document.getElementById('theeDCustomModuleDiv'); | |
384 | + | |
385 | + if (threeDSectionExist == null && BasemoduleDivId != "#ThreeDView") { | |
386 | + $(BasemoduleDivId).append($('<div id="theeDCustomModuleDiv"></div>')); | |
387 | + var html = $('#theeDCustomModuleDiv').append("<threed-anatomy-directive></threed-anatomy-directive>"); | |
388 | + $compile(html)($scope); | |
389 | + } | |
390 | + else { | |
391 | + // open another 3d module | |
392 | + $rootScope.Open3DModelBodyMain(); | |
393 | + } | |
394 | + | |
395 | + break; | |
396 | + } | |
397 | + } | |
398 | + | |
399 | + | |
221 | 400 | $rootScope.forgotPwdModalShow = function () { |
222 | 401 | document.getElementById("forgetPwdForm").reset() |
223 | 402 | $("#forgotPwdModal").modal("show"); |
... | ... | @@ -1419,7 +1598,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1419 | 1598 | $rootScope.disableMenuoption = " "; |
1420 | 1599 | $rootScope.disableSubMenu = "disableSubMenu"; |
1421 | 1600 | $rootScope.disableFileMenu = " "; |
1422 | - $rootScope.openResources = "openResources"; | |
1601 | + $rootScope.openResources = ""; | |
1423 | 1602 | $rootScope.OpenPitures = "OpenPitures"; |
1424 | 1603 | $rootScope.newCurriculum = "newCurriculum"; |
1425 | 1604 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1438,7 +1617,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1438 | 1617 | $("#optionsListManagerTab").addClass("disableSubMenu"); |
1439 | 1618 | $("#optiontSetting").addClass("disableSubMenu"); |
1440 | 1619 | $rootScope.disableFileMenu = " "; |
1441 | - $rootScope.openResources = "openResources"; | |
1620 | + $rootScope.openResources = ""; | |
1442 | 1621 | $rootScope.OpenPitures = "OpenPitures"; |
1443 | 1622 | $rootScope.newCurriculum = "newCurriculum"; |
1444 | 1623 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1455,7 +1634,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1455 | 1634 | $rootScope.disableSubMenu = "disableSubMenu"; |
1456 | 1635 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); |
1457 | 1636 | $rootScope.disableFileMenu = " "; |
1458 | - $rootScope.openResources = "openResources"; | |
1637 | + $rootScope.openResources = ""; | |
1459 | 1638 | $rootScope.OpenPitures = "OpenPitures"; |
1460 | 1639 | $rootScope.newCurriculum = "newCurriculum"; |
1461 | 1640 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1472,11 +1651,19 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1472 | 1651 | $rootScope.disableSubMenu = "disableSubMenu"; |
1473 | 1652 | $("#annotationToolBarOptions").addClass("disableSubMenu"); |
1474 | 1653 | $("#optionsListManagerTab").addClass("disableSubMenu"); |
1475 | - $rootScope.disableFileMenu = "disableFileMenu"; | |
1654 | + $rootScope.disableFileMenu = " "; | |
1655 | + $rootScope.openResources = ""; | |
1656 | + $rootScope.OpenPitures = "OpenPitures"; | |
1657 | + $rootScope.newCurriculum = "newCurriculum"; | |
1658 | + $rootScope.openCurriculum = "openCurriculum"; | |
1659 | + $rootScope.saveCurriculam = "saveCurriculam"; | |
1660 | + $rootScope.PrintPreview = "PrintPreview"; | |
1661 | + $rootScope.PrintViewer = "PrintViewer"; | |
1662 | + $rootScope.exportImage = "exportImage"; | |
1476 | 1663 | } |
1477 | 1664 | else if ($location.url() == "/curriculum-builder") { |
1478 | 1665 | |
1479 | - $rootScope.openResources = "openResources"; | |
1666 | + $rootScope.openResources = ""; | |
1480 | 1667 | |
1481 | 1668 | $rootScope.disableMenuannotation = "disableMenuannotation"; |
1482 | 1669 | $rootScope.disableMenuoption = "disableMenuoption"; |
... | ... | @@ -1506,14 +1693,14 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1506 | 1693 | $scope.EnableDisableExportImage(); |
1507 | 1694 | } |
1508 | 1695 | else if ($location.url() == "/adam-images-detail") { |
1509 | - //Modified code by sandeep for fixed bug-57956 | |
1510 | 1696 | $rootScope.disableMenuannotation = " "; |
1511 | 1697 | $rootScope.disableMenuoption = " "; |
1512 | - $("#optiontSetting").addClass("disableSubMenu"); | |
1513 | 1698 | $rootScope.disableSubMenu = "disableSubMenu"; |
1514 | 1699 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); |
1700 | + $("#optionsListManagerTab").addClass("disableSubMenu"); | |
1701 | + $("#optiontSetting").addClass("disableSubMenu"); | |
1515 | 1702 | $rootScope.disableFileMenu = " "; |
1516 | - $rootScope.openResources = "openResources"; | |
1703 | + $rootScope.openResources = ""; | |
1517 | 1704 | $rootScope.OpenPitures = "OpenPitures"; |
1518 | 1705 | $rootScope.newCurriculum = "newCurriculum"; |
1519 | 1706 | $rootScope.openCurriculum = "openCurriculum"; |
... | ... | @@ -1523,6 +1710,22 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1523 | 1710 | //enableDisable export option |
1524 | 1711 | $scope.EnableDisableExportImage(); |
1525 | 1712 | } |
1713 | + else if ($location.url() == "/3d-anatomy-details") { | |
1714 | + $rootScope.disableMenuannotation = "disableMenuannotation"; | |
1715 | + $rootScope.disableMenuoption = "disableMenuoption"; | |
1716 | + $rootScope.disableSubMenu = "disableSubMenu"; | |
1717 | + $("#annotationToolBarOptions").addClass("disableSubMenu"); | |
1718 | + $("#optionsListManagerTab").addClass("disableSubMenu"); | |
1719 | + $rootScope.disableFileMenu = " "; | |
1720 | + $rootScope.openResources = ""; | |
1721 | + $rootScope.OpenPitures = "OpenPitures"; | |
1722 | + $rootScope.newCurriculum = "newCurriculum"; | |
1723 | + $rootScope.openCurriculum = "openCurriculum"; | |
1724 | + $rootScope.saveCurriculam = "saveCurriculam"; | |
1725 | + $rootScope.PrintPreview = "PrintPreview"; | |
1726 | + $rootScope.PrintViewer = "PrintViewer"; | |
1727 | + $rootScope.exportImage = "exportImage"; | |
1728 | + } | |
1526 | 1729 | else { |
1527 | 1730 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); |
1528 | 1731 | $("#optionsListManagerTab").removeClass("disableSubMenu"); |
... | ... | @@ -1595,7 +1798,12 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
1595 | 1798 | $rootScope.resetjsPanelTop = function () { |
1596 | 1799 | |
1597 | 1800 | $timeout(function () { |
1598 | - var firsttopPosition = 680; | |
1801 | + var firsttopPosition = 70; | |
1802 | + if ($location.url() == "/curriculum-builder-detail") { | |
1803 | + | |
1804 | + firsttopPosition = 680; | |
1805 | + } | |
1806 | + | |
1599 | 1807 | var moduleImagePanel = $("div[id*='ImagePanel']"); |
1600 | 1808 | |
1601 | 1809 | if (moduleImagePanel.length > 0) { |
... | ... | @@ -2667,7 +2875,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
2667 | 2875 | $scope.canvasElement = null; |
2668 | 2876 | $scope.canvasPaintElement = null; |
2669 | 2877 | $scope.canvasDivElement = null; |
2670 | - if ($location.url() == "/da-body-view" || $location.url() == "/module-item-view" || $location.url() == "/clinical-illustrations-detail") { | |
2878 | + if ($location.url() == "/da-body-view" || $location.url() == "/module-item-view" || $location.url() == "/clinical-illustrations-detail" || $location.url() == "/adam-images-detail") { | |
2671 | 2879 | if ($location.url() == "/da-body-view") { |
2672 | 2880 | var MultiWinId = $rootScope.GetDaWindowId(); |
2673 | 2881 | $scope.canvasElement = document.getElementById('canvasDA_' + MultiWinId); |
... | ... | @@ -2686,6 +2894,12 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
2686 | 2894 | $scope.canvasPaintElement = document.getElementById('canvasPaintCI_' + MultiWinId); |
2687 | 2895 | $scope.canvasDivElement = document.getElementById('canvasDivCI_' + MultiWinId); |
2688 | 2896 | } |
2897 | + else if ($location.url() == "/adam-images-detail") { | |
2898 | + var MultiWinId = $rootScope.GetAIWindowId(); | |
2899 | + $scope.canvasElement = document.getElementById('canvasAI_' + MultiWinId); | |
2900 | + $scope.canvasPaintElement = document.getElementById('canvasPaintAI_' + MultiWinId); | |
2901 | + $scope.canvasDivElement = document.getElementById('canvasDivAI_' + MultiWinId); | |
2902 | + } | |
2689 | 2903 | |
2690 | 2904 | } |
2691 | 2905 | else { |
... | ... | @@ -2725,9 +2939,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
2725 | 2939 | |
2726 | 2940 | } |
2727 | 2941 | else if (modulePanelName.match("aiImagePanel")) { |
2728 | - $scope.canvasDivElement = document.getElementById('canvasDiv'); | |
2729 | - // to be continue..... | |
2730 | - | |
2942 | + var len = (modulePanelName).split("_").length; | |
2943 | + var MultiWinId = (modulePanelName).split("_")[len - 1]; | |
2944 | + $scope.canvasDivElement = document.getElementById('canvasDivAI_' + MultiWinId); | |
2731 | 2945 | } |
2732 | 2946 | |
2733 | 2947 | } |
... | ... | @@ -2756,7 +2970,9 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
2756 | 2970 | $scope.canvasDivElement = document.getElementById('canvasDivCI_' + MultiWinId); |
2757 | 2971 | } |
2758 | 2972 | else if ($rootScope.panelNameWithCb.match("aiImagePanel")) { |
2759 | - // to be continue..... | |
2973 | + var len = ($rootScope.panelNameWithCb).split("_").length; | |
2974 | + var MultiWinId = ($rootScope.panelNameWithCb).split("_")[len - 1]; | |
2975 | + $scope.canvasDivElement = document.getElementById('canvasDivAI_' + MultiWinId); | |
2760 | 2976 | } |
2761 | 2977 | |
2762 | 2978 | } |
... | ... | @@ -6075,6 +6291,11 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
6075 | 6291 | if ($('#printDivContent').html() != "") { |
6076 | 6292 | $('#printDivContent').empty(); |
6077 | 6293 | } |
6294 | + | |
6295 | + var multiprint = function (canvasId, page, title, delaytime) { | |
6296 | + $timeout(function () { CollectPrintData(canvasId, page, title) }, delaytime); | |
6297 | + }; | |
6298 | + | |
6078 | 6299 | var pageno = 0; |
6079 | 6300 | // select all open module div. |
6080 | 6301 | // var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']").not("div[id*='caImagePanel']").not("div[id*='3DImagePanel']"); |
... | ... | @@ -6083,9 +6304,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
6083 | 6304 | for (var i = 0 ; i < modulePanel.length; i++) { |
6084 | 6305 | |
6085 | 6306 | var paneld = modulePanel[i].id; |
6086 | - | |
6087 | - pageno = pageno + 1; | |
6088 | - | |
6307 | + | |
6089 | 6308 | var panelTitle = document.getElementById(paneld).childNodes[0].innerText; |
6090 | 6309 | |
6091 | 6310 | $scope.GetDocumentPrintElementCB(paneld); |
... | ... | @@ -6094,20 +6313,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
6094 | 6313 | |
6095 | 6314 | if (canvasDivElement == null) return; |
6096 | 6315 | var canvasDivId = canvasDivElement.id; |
6097 | - if (pageno == 1) { | |
6098 | - CollectPrintData(canvasDivId, pageno, panelTitle); | |
6099 | - } | |
6100 | - else { | |
6101 | - $timeout(function () { | |
6102 | - // update timeout for mutiple image print | |
6103 | - CollectPrintData(canvasDivId, pageno, panelTitle); | |
6104 | - }, pageno * 200); | |
6105 | - | |
6106 | - } | |
6316 | + | |
6317 | + var timeintrval = pageno * 400; | |
6318 | + | |
6319 | + multiprint(canvasDivId, pageno, panelTitle,timeintrval); | |
6107 | 6320 | |
6108 | - if(pageno==modulePanel.length) | |
6321 | + if(pageno==modulePanel.length-1) | |
6109 | 6322 | { |
6110 | - if (pageno == 1) pageno = 0; | |
6111 | 6323 | $timeout(function () { |
6112 | 6324 | |
6113 | 6325 | var $ua = navigator.userAgent; |
... | ... | @@ -6118,13 +6330,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
6118 | 6330 | SetFrameToPrint(); |
6119 | 6331 | } |
6120 | 6332 | |
6121 | - }, pageno * 200+500); | |
6333 | + }, pageno * 400+500); | |
6122 | 6334 | |
6123 | 6335 | } |
6124 | - | |
6336 | + pageno = pageno + 1; | |
6125 | 6337 | |
6126 | 6338 | } |
6127 | - | |
6339 | + | |
6128 | 6340 | } |
6129 | 6341 | |
6130 | 6342 | |
... | ... | @@ -6417,14 +6629,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
6417 | 6629 | |
6418 | 6630 | $("#" + aaImagePanel).css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); |
6419 | 6631 | } |
6632 | + else if ($location.url() == "/adam-images-detail") { | |
6633 | + var MultiWinId = $rootScope.GetAIWindowId(); | |
6634 | + ImagePanelElement = document.getElementById('aiImagePanel_' + MultiWinId); | |
6635 | + var aaImagePanel = ImagePanelElement.id; | |
6636 | + | |
6637 | + $("#" + aaImagePanel).css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); | |
6638 | + } | |
6420 | 6639 | else if ($location.url() == "/curriculum-builder-detail") { |
6421 | 6640 | $("#CBDetailPageDiv").css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); |
6422 | 6641 | |
6423 | 6642 | } |
6424 | 6643 | |
6425 | - $("#aiImagePanel").css({ "display": "none", "pointer-events": "none", "opacity": ".5" }); | |
6426 | - | |
6427 | - | |
6428 | 6644 | $.jsPanel({ |
6429 | 6645 | id: 'jsPanel-1', |
6430 | 6646 | selector: '#dvPrintPreview', |
... | ... | @@ -6603,12 +6819,17 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
6603 | 6819 | |
6604 | 6820 | $("#" + aaImagePanel).css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); |
6605 | 6821 | } |
6822 | + else if ($location.url() == "/adam-images-detail") { | |
6823 | + var MultiWinId = $rootScope.GetAIWindowId(); | |
6824 | + ImagePanelElement = document.getElementById('aiImagePanel_' + MultiWinId); | |
6825 | + var aaImagePanel = ImagePanelElement.id; | |
6826 | + | |
6827 | + $("#" + aaImagePanel).css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); | |
6828 | + } | |
6606 | 6829 | else if ($location.url() == "/curriculum-builder-detail") { |
6607 | 6830 | $("#CBDetailPageDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); |
6608 | 6831 | } |
6609 | 6832 | |
6610 | - $("#aiImagePanel").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); | |
6611 | - | |
6612 | 6833 | if ($location.url() != "/curriculum-builder-detail") { |
6613 | 6834 | $("#annotationButton").parent().removeClass("disableMenuannotation"); |
6614 | 6835 | } |
... | ... | @@ -6624,11 +6845,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
6624 | 6845 | |
6625 | 6846 | }); |
6626 | 6847 | |
6627 | - $(document).on('click', '#OpenResourcePanel .jsglyph-remove', function () { | |
6848 | + $(document).on('click', '#dvOpenResourcePanel .jsglyph-remove', function () { | |
6628 | 6849 | |
6629 | - $("#CBDetailPageDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); | |
6850 | + $("#HomeContainerDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); | |
6630 | 6851 | $(".navbar-fixed-top").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); |
6631 | 6852 | $("#topMenuBar").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); |
6853 | + | |
6854 | + $('#dvOpenResourcePanel').remove(); | |
6632 | 6855 | sessionStorage.removeItem('isModuleOpenByOpenResource'); |
6633 | 6856 | }); |
6634 | 6857 | |
... | ... | @@ -6872,23 +7095,33 @@ function printImagePreview(event) { |
6872 | 7095 | |
6873 | 7096 | } |
6874 | 7097 | |
6875 | -function loadOpenResource(iframe) { | |
7098 | +function OpenResourcePanel(iframe) { | |
6876 | 7099 | |
6877 | 7100 | console.log('resource loading') |
6878 | 7101 | var scope = angular.element(document.querySelector('[ng-controller="HomeController"]')).scope(); |
6879 | 7102 | |
6880 | 7103 | scope.$apply(function () { |
6881 | - scope.loadOpenResource(iframe); | |
7104 | + scope.OpenResourcePanel(iframe); | |
6882 | 7105 | |
6883 | 7106 | }); |
6884 | 7107 | |
6885 | 7108 | } |
6886 | 7109 | |
6887 | 7110 | function closeIFrame() { |
6888 | - $('#OpenResourcePanel').remove(); | |
6889 | - $("#CBDetailPageDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); | |
7111 | + $('#dvOpenResourcePanel').remove(); | |
7112 | + $("#HomeContainerDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); | |
6890 | 7113 | $(".navbar-fixed-top").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); |
6891 | 7114 | $("#topMenuBar").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); |
6892 | 7115 | } |
6893 | 7116 | |
7117 | +function AIAModuleOpenResourceInfo(windowData) { | |
7118 | + sessionStorage.removeItem('isModuleOpenByOpenResource'); | |
7119 | + window.parent.closeIFrame(); | |
7120 | + var scope = angular.element(document.querySelector('[ng-controller="HomeController"]')).scope(); | |
7121 | + scope.$apply(function () { | |
7122 | + scope.AIAModuleOpenResourceInfo(windowData); | |
7123 | + }); | |
7124 | + | |
7125 | +} | |
7126 | + | |
6894 | 7127 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -49,8 +49,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
49 | 49 | } |
50 | 50 | }; |
51 | 51 | |
52 | - $scope.initializeAAWindowData = function(windowviewid,isOpenWithExistsModule,cbwindowid){ | |
53 | - if(isOpenWithExistsModule ||cbwindowid==0) | |
52 | + $scope.initializeAAWindowData = function(windowviewid,isOpenWithExistsModule,openPanelNo){ | |
53 | + if (isOpenWithExistsModule || openPanelNo == 0) | |
54 | 54 | { |
55 | 55 | if ($rootScope.AAWindowData != undefined) { |
56 | 56 | $rootScope.AAWindowData.length = 0; |
... | ... | @@ -205,16 +205,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
205 | 205 | $('#CBDetailPageDiv').css('opacity', '1'); |
206 | 206 | } |
207 | 207 | |
208 | - $scope.loadForModuleById = function (moduleId) { | |
209 | - // clear data set by curriculum builder | |
210 | - $rootScope.isCallFromOtherModule = undefined; | |
208 | + $scope.loadForModuleById = function (moduleId) { | |
209 | + $scope.DisableUI(); | |
211 | 210 | |
211 | + $rootScope.isCallFromOtherModule = undefined; | |
212 | 212 | $rootScope.MULTI_VIEW_ID += 1 |
213 | - // $scope.ScopeVariablesDeclare(); | |
213 | + | |
214 | + // store exist module in module service | |
215 | + var ExistData = ModuleService.getModuleData("ATLAS_ANATOMY"); | |
216 | + | |
217 | + if (ExistData != undefined && ExistData.length > 0) { | |
218 | + // clear all module data before open new module in cb | |
219 | + ModuleService.ClearWinDataByModule(ExistData.mType); | |
220 | + } | |
221 | + var newWindowData = { | |
222 | + "mType": 'ATLAS_ANATOMY', | |
223 | + }; | |
224 | + ModuleService.setModuleData(newWindowData, 0); | |
214 | 225 | |
215 | 226 | $scope.initializeAAWindowData($rootScope.MULTI_VIEW_ID,true,undefined); |
216 | 227 | |
217 | - $scope.DisableUI(); | |
218 | 228 | $rootScope.isLoading = true; |
219 | 229 | $('#spinner').css('visibility', 'visible'); |
220 | 230 | $rootScope.openModules.push({ "ModuleId": 2 }); |
... | ... | @@ -281,22 +291,49 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
281 | 291 | $scope.EnableUI(); |
282 | 292 | $rootScope.isLoading = false; |
283 | 293 | $('#spinner').css('visibility', 'hidden'); |
284 | - }, 200); | |
294 | + }, 600); | |
285 | 295 | |
286 | 296 | $('#list-view').css('display', 'none'); |
287 | 297 | } |
288 | 298 | |
289 | - $scope.openModuleItemView = function ($event) { | |
299 | + $scope.openModuleItemView = function ($event) { | |
300 | + | |
301 | + var windowviewid = $rootScope.MULTI_VIEW_ID; | |
302 | + $rootScope.MenuModuleName = "AA"; | |
303 | + localStorage.setItem("activeTab", $scope.activeTab); | |
304 | + | |
305 | + //0. Get selected Image Id | |
306 | + if ($scope.isListViewButtonClicked == true) { | |
307 | + if ($scope.isOpenBtnClicked == true) { | |
308 | + | |
309 | + var moduleItemDataToBeSaved = $("#demoText").text().trim(); | |
310 | + var moduleItemDataToBeSavedID = $event.target.id; | |
311 | + $scope.isOpenBtnClicked = false; | |
312 | + } | |
313 | + else { | |
314 | + var moduleItemDataToBeSavedID = $event.currentTarget.id; | |
315 | + localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); | |
316 | + var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); | |
317 | + } | |
318 | + } | |
319 | + else { | |
320 | + var moduleItemDataToBeSavedID = $event.currentTarget.id; | |
321 | + localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); | |
322 | + var moduleItemDataToBeSaved = $event.target.id; | |
323 | + | |
324 | + $scope.isListViewButtonClicked = false; | |
325 | + } | |
326 | + | |
290 | 327 | // open module bu openresource |
291 | 328 | var isopenResourceRequest = sessionStorage.getItem('isModuleOpenByOpenResource'); |
292 | 329 | if (isopenResourceRequest == "true") { |
293 | 330 | |
294 | 331 | //set default module data |
295 | 332 | var AAopenData = { |
296 | - "id": $event.currentTarget.id, | |
333 | + "id": moduleItemDataToBeSavedID, | |
297 | 334 | "mType": 'ATLAS_ANATOMY', |
298 | 335 | "showAllPins":true, |
299 | - "windowTitle": $event.currentTarget.textContent, | |
336 | + "windowTitle": moduleItemDataToBeSaved, | |
300 | 337 | "size": { height: 600, width: 900 } |
301 | 338 | }; |
302 | 339 | |
... | ... | @@ -307,29 +344,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
307 | 344 | } |
308 | 345 | else |
309 | 346 | { |
310 | - var windowviewid = $rootScope.MULTI_VIEW_ID; | |
311 | - $rootScope.MenuModuleName = "AA"; | |
312 | - localStorage.setItem("activeTab", $scope.activeTab); | |
313 | - | |
314 | - //0. Get selected Image Id | |
315 | - if ($scope.isListViewButtonClicked == true) { | |
316 | - if ($scope.isOpenBtnClicked == true) { | |
317 | - | |
318 | - var moduleItemDataToBeSaved = $("#demoText").text().trim(); | |
319 | - $scope.isOpenBtnClicked = false; | |
320 | - } | |
321 | - else { | |
322 | - var moduleItemDataToBeSavedID = $event.currentTarget.id; | |
323 | - localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); | |
324 | - var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); | |
325 | - } | |
326 | - } | |
327 | - else { | |
328 | - var moduleItemDataToBeSaved = $event.target.id; | |
329 | - localStorage.setItem("listViewSelectedID", $event.currentTarget.id); | |
330 | - $scope.isListViewButtonClicked = false; | |
331 | - } | |
332 | - | |
333 | 347 | //1.Filter selected module ietem data and get the pushed opened moduile array object |
334 | 348 | var OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); |
335 | 349 | |
... | ... | @@ -381,7 +395,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
381 | 395 | var OpenItemImagePath = "../../../content/images/aa/images/" +OpenedTileData[3]; |
382 | 396 | $scope.SetAAwindowStoreData(windowviewid,'OpenItemImagePath',OpenItemImagePath); |
383 | 397 | $rootScope.listArray.push({ "imageName": OpenItemImagePath, "text": moduleItemDataToBeSaved }); |
384 | - $("#viewList").append("<div class='col-xs-12 text-center' style='padding-top:15px;padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:15px;background-color:#fff;'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:95px!important;' src=" + OpenItemImagePath + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + moduleItemDataToBeSaved + "</div></div></div><a style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>"); | |
398 | + $("#viewList").append("<div class='col-xs-12 text-center' style='padding-top:15px;padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:15px;background-color:#fff;'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:95px!important;' src=" + OpenItemImagePath + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + moduleItemDataToBeSaved + "</div></div></div><a id=" + moduleItemDataToBeSavedID + " style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>"); | |
385 | 399 | } |
386 | 400 | |
387 | 401 | $rootScope.openAAModuleItemMain = function () { |
... | ... | @@ -393,13 +407,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
393 | 407 | $scope.wincount=1; |
394 | 408 | var winlen=$scope.AAModuleData.length; |
395 | 409 | var timeint = null; |
396 | - var slideId = ""; | |
397 | 410 | timeint = $interval(function() { |
398 | 411 | |
399 | 412 | if($scope.readyToLoad==true) |
400 | 413 | { |
401 | 414 | var windata = $scope.AAModuleData[$scope.wincount - 1]; |
402 | - slideId = windata.slideId; //use to skip last execution slide | |
403 | 415 | $scope.openModuleItem(windata); |
404 | 416 | |
405 | 417 | } |
... | ... | @@ -414,7 +426,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
414 | 426 | if($scope.wincount==winlen && $rootScope.AAWindowLoadComplete==true) |
415 | 427 | { |
416 | 428 | $scope.stopInterval(); |
417 | - $scope.$emit("LoadModuleComplete", "ATLAS_ANATOMY", slideId); | |
429 | + $scope.$emit("LoadModuleComplete", "ATLAS_ANATOMY"); | |
418 | 430 | } |
419 | 431 | |
420 | 432 | |
... | ... | @@ -555,7 +567,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
555 | 567 | |
556 | 568 | } |
557 | 569 | else { |
558 | - $scope.jsPanelWidth = $(window).outerWidth() - 10; | |
570 | + $scope.jsPanelWidth = $(window).outerWidth() - 20; | |
559 | 571 | $scope.jsPanelHeight = $(window).outerHeight() - 125; |
560 | 572 | $scope.jsPanelLeft = 1; |
561 | 573 | $scope.jsPanelTop = 70; |
... | ... | @@ -600,10 +612,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
600 | 612 | $scope.setControlsIDs(windowviewid); |
601 | 613 | $scope.loadbtnNavigator(windowviewid); |
602 | 614 | |
603 | - if ($rootScope.isCallFromOtherModule) { | |
604 | - $scope.JsPanelclick(windowviewid); | |
605 | - } | |
606 | - | |
615 | + //if ($rootScope.isCallFromOtherModule) { | |
616 | + // $scope.JsPanelclick(windowviewid); | |
617 | + // } | |
618 | + $scope.JsPanelclick(windowviewid); | |
607 | 619 | |
608 | 620 | //if (document.getElementById('aaDetailPageDiv') != null) { |
609 | 621 | if (document.getElementById('aaBodyView') != null) { |
... | ... | @@ -893,6 +905,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
893 | 905 | if (index != -1) { |
894 | 906 | // remove module which one is loaded |
895 | 907 | $scope.AAWindowData.splice(index, 1); |
908 | + if ($('#' + panelid).html() != undefined) { | |
909 | + | |
910 | + $('#' + panelid).remove(); | |
911 | + | |
912 | + } | |
896 | 913 | $rootScope.resetjsPanelTop(); |
897 | 914 | } |
898 | 915 | } |
... | ... | @@ -1172,7 +1189,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1172 | 1189 | |
1173 | 1190 | |
1174 | 1191 | $scope.FilterByImage = function (moduleId, query,windowviewid) { |
1175 | - | |
1192 | + $scope.DisableUI(); | |
1176 | 1193 | if(windowviewid==undefined) |
1177 | 1194 | { |
1178 | 1195 | windowviewid= $rootScope.MULTI_VIEW_ID; |
... | ... | @@ -1335,9 +1352,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1335 | 1352 | $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); |
1336 | 1353 | } |
1337 | 1354 | |
1355 | + $timeout(function () { $scope.EnableUI(); }, 500); | |
1338 | 1356 | }, |
1339 | 1357 | function (error) { |
1340 | - // handle errors here | |
1358 | + $timeout(function () { $scope.EnableUI(); }, 500); | |
1341 | 1359 | console.log(' error: ' + error.statusText); |
1342 | 1360 | } |
1343 | 1361 | ) |
... | ... | @@ -1369,7 +1387,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1369 | 1387 | $('#demoView').remove(); |
1370 | 1388 | |
1371 | 1389 | $scope.filterstring = false; |
1372 | - | |
1390 | + | |
1373 | 1391 | $scope.FilterByImage(1, query,windowviewid); |
1374 | 1392 | |
1375 | 1393 | } |
... | ... | @@ -3087,4 +3105,5 @@ function systemChange(event) { |
3087 | 3105 | $("#" + event.currentTarget.id).parent().toggleClass('tools1'); |
3088 | 3106 | $("#selectedTermName_"+windowviewid).parent().parent().parent().parent().parent().toggleClass('active'); |
3089 | 3107 | |
3090 | -} | |
3091 | 3108 | \ No newline at end of file |
3109 | + } | |
3110 | + | |
3092 | 3111 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/directives/AIADirectives.js
... | ... | @@ -32,4 +32,11 @@ AIA.directive('threedAnatomyDirective', function (ModuleService) { |
32 | 32 | templateUrl: 'app/views/3dA/3d-anatomy-details.html', |
33 | 33 | |
34 | 34 | } |
35 | +}); | |
36 | +AIA.directive('adamImageDirective', function (ModuleService) { | |
37 | + return { | |
38 | + //restrict: 'E', | |
39 | + templateUrl: 'app/views/ai/adam-images-detail.html', | |
40 | + | |
41 | + } | |
35 | 42 | }); |
36 | 43 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... | ... | @@ -13,6 +13,7 @@ moduleDataObj.DAData = []; |
13 | 13 | moduleDataObj.CIData = []; |
14 | 14 | moduleDataObj.CAData = []; |
15 | 15 | moduleDataObj.ThreeDData = []; |
16 | +moduleDataObj.AIData = []; | |
16 | 17 | |
17 | 18 | AIA.service('ModuleService', function ($http, DataService) { |
18 | 19 | return { |
... | ... | @@ -144,14 +145,15 @@ AIA.service('ModuleService', function ($http, DataService) { |
144 | 145 | return moduleDataObj.CAData; |
145 | 146 | else if (moduleName == "THREE_D_ANATOMY") |
146 | 147 | return moduleDataObj.ThreeDData; |
148 | + else if (moduleName == "ADAM_IMAGES") | |
149 | + return moduleDataObj.AIData; | |
147 | 150 | |
148 | 151 | }, |
149 | 152 | |
150 | - setModuleData: function (windowData, windowId, SlideNo) { | |
153 | + setModuleData: function (windowData, windowId) { | |
151 | 154 | |
152 | 155 | if (windowData.mType == "THREE_D_ANATOMY") { |
153 | 156 | moduleDataObj.ThreeDData.push({ |
154 | - slideId: SlideNo, | |
155 | 157 | currentWindowId: windowId, |
156 | 158 | mType: windowData.mType, |
157 | 159 | threeDData:windowData.threeDData, |
... | ... | @@ -168,9 +170,26 @@ AIA.service('ModuleService', function ($http, DataService) { |
168 | 170 | contentPath: windowData.contentPath |
169 | 171 | }); |
170 | 172 | } |
173 | + else if (windowData.mType == "ADAM_IMAGES") { | |
174 | + moduleDataObj.AIData.push({ | |
175 | + currentWindowId: windowId, | |
176 | + mType: windowData.mType, | |
177 | + containsCapturedContent: windowData.containsCapturedContent, | |
178 | + textVisible: windowData.textVisible, | |
179 | + anatomyTitle: windowData.windowTitle, | |
180 | + scrollPosition: windowData.scrollPosition, | |
181 | + imageId: windowData.imageId, | |
182 | + maximised: windowData.maximised, | |
183 | + minimised: windowData.minimised, | |
184 | + id: windowData.id, | |
185 | + position: windowData.position, | |
186 | + size: windowData.size, | |
187 | + contextMenu: windowData.contextMenu, | |
188 | + annotationData: windowData.annotationData | |
189 | + }); | |
190 | + } | |
171 | 191 | else if (windowData.mType == "CLINICAL_ANIMATIONS") { |
172 | 192 | moduleDataObj.CAData.push({ |
173 | - slideId: SlideNo, | |
174 | 193 | currentWindowId: windowId, |
175 | 194 | mType: windowData.mType, |
176 | 195 | containsCapturedContent: windowData.containsCapturedContent, |
... | ... | @@ -188,7 +207,6 @@ AIA.service('ModuleService', function ($http, DataService) { |
188 | 207 | } |
189 | 208 | else if (windowData.mType == "CLINICAL_ILLUSTRATIONS") { |
190 | 209 | moduleDataObj.CIData.push({ |
191 | - slideId: SlideNo, | |
192 | 210 | currentWindowId: windowId, |
193 | 211 | mType: windowData.mType, |
194 | 212 | containsCapturedContent: windowData.containsCapturedContent, |
... | ... | @@ -207,7 +225,6 @@ AIA.service('ModuleService', function ($http, DataService) { |
207 | 225 | } |
208 | 226 | else if (windowData.mType == "ATLAS_ANATOMY") { |
209 | 227 | moduleDataObj.AAData.push({ |
210 | - slideId:SlideNo, | |
211 | 228 | currentWindowId: windowId, |
212 | 229 | mType: windowData.mType, |
213 | 230 | anatomyTitle: windowData.windowTitle, |
... | ... | @@ -233,7 +250,6 @@ AIA.service('ModuleService', function ($http, DataService) { |
233 | 250 | } |
234 | 251 | else if (windowData.mType == "DISSECTIBLE_ANATOMY") { |
235 | 252 | moduleDataObj.DAData.push({ |
236 | - slideId: SlideNo, | |
237 | 253 | currentWindowId: windowId, |
238 | 254 | currentBodyViewId: windowData.id, |
239 | 255 | windowTitle: windowData.windowTitle, |
... | ... | @@ -287,6 +303,7 @@ AIA.service('ModuleService', function ($http, DataService) { |
287 | 303 | moduleDataObj.CIData = []; |
288 | 304 | moduleDataObj.CAData = []; |
289 | 305 | moduleDataObj.ThreeDData = []; |
306 | + moduleDataObj.AIData = []; | |
290 | 307 | |
291 | 308 | }, |
292 | 309 | ClearWinDataByModule: function (moduleName) { |
... | ... | @@ -310,6 +327,9 @@ AIA.service('ModuleService', function ($http, DataService) { |
310 | 327 | { |
311 | 328 | moduleDataObj.ThreeDData = []; |
312 | 329 | } |
330 | + else if (moduleName == "ADAM_IMAGES") { | |
331 | + moduleDataObj.AIData = []; | |
332 | + } | |
313 | 333 | |
314 | 334 | }, |
315 | 335 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/CBuild/curriculum-builder-detail.html
400-SOURCECODE/AIAHTML5.Web/app/views/aa/tile-view.html
... | ... | @@ -74,7 +74,7 @@ |
74 | 74 | </tr> |
75 | 75 | </thead> |
76 | 76 | <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody"> |
77 | - <tr id="{{val._Id}}" ng-class="{selected: val._Id === idSelected}" data-ng-click="openListViewModuleItem($event)" data-ng-dblclick=" openModuleItemView($event)" ng-repeat="(key,val) in moduleLandingData.data.root.Item | orderBy:'_Title'"> | |
77 | + <tr id="{{val._Id}}" ng-class="{selected: val._Id === idSelected}" onclick="openListViewModuleItem(event)" ondblclick=" openModuleItemView(event)" ng-repeat="(key,val) in moduleLandingData.data.root.Item | orderBy:'_Title'"> | |
78 | 78 | <td width="20%"> |
79 | 79 | {{val._Title}} |
80 | 80 | </td> |
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | </tr> |
94 | 94 | </tbody> |
95 | 95 | <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody"> |
96 | - <tr id="{{item._Id}}" ng-class="{selected: item._Id === idSelected}" data-ng-click="openListViewModuleItem($event)" data-ng-dblclick="openModuleItemView($event)" ng-repeat="item in searchAAListViewData"> | |
96 | + <tr id="{{item._Id}}" ng-class="{selected: item._Id === idSelected}" onclick="openListViewModuleItem(event)" ondblclick="openModuleItemView(event)" ng-repeat="item in searchAAListViewData"> | |
97 | 97 | <td width="20%"> |
98 | 98 | {{item._Title}} |
99 | 99 | </td> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ai/adam-images-detail.html
1 | 1 | <div> |
2 | 2 | <div ng-include="aap/widget/MainMenu.html"></div> |
3 | - <div ng-init="OpenAdamImageView()" id="AIView" class="aiView" ng-controller="AIController" style=" "></div> <!--position: absolute !important;--> | |
3 | + <div ng-init="OpenAdamImageViewMain()" id="AIView" class="aiView" ng-controller="AIController" style=" "></div> <!--position: absolute !important;--> | |
4 | 4 | <style> |
5 | 5 | .jsPanel-content.jsPanel-theme-success { |
6 | 6 | overflow-y: auto !important; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ai/ai-view.html
... | ... | @@ -47,6 +47,10 @@ |
47 | 47 | <button type="button" class="btn btn-primary btn-sm" ng-click="Reset(query)" style="margin-bottom:23px"><i class="fa fa-eye"></i>Show All</button> |
48 | 48 | </nav> |
49 | 49 | |
50 | + <div data-pagination="" data-num-pages="numPages()" | |
51 | + data-current-page="currentPage" data-max-size="maxSize" | |
52 | + data-boundary-links="true" style="cursor: pointer;"> | |
53 | + </div> | |
50 | 54 | </div> |
51 | 55 | |
52 | 56 | </div> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
... | ... | @@ -73,27 +73,7 @@ |
73 | 73 | |
74 | 74 | <!--<div role="tabpanel" class="tab-pane active" id="grid-view">--> |
75 | 75 | <div class="customTable" role="tabpanel" ng-class="{'tab-pane active' : activeTab === 1,'tab-pane' : activeTab !==1 }" id="grid-view"> |
76 | - <!--<div ng-if="!filterstring" ng-repeat="item in selectedCIListViewData"> | |
77 | - <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> | |
78 | - <div class="thumbnail"> | |
79 | - <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> | |
80 | - <div class="caption"> | |
81 | - <p>{{item._Title}}</p> | |
82 | - </div> | |
83 | - </div> | |
84 | - </div> | |
85 | - </div> | |
86 | - | |
87 | - <div ng-if="filterstring" ng-repeat="item in searchCIListViewData"> | |
88 | - <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> | |
89 | - <div class="thumbnail"> | |
90 | - <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> | |
91 | - <div class="caption"> | |
92 | - <p>{{item._Title}}</p> | |
93 | - </div> | |
94 | - </div> | |
95 | - </div> | |
96 | - </div>--> | |
76 | + | |
97 | 77 | </div> |
98 | 78 | <!--<div role="tabpanel" class="tab-pane" id="list-view">--> |
99 | 79 | <div class="customTable" role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view"> |
... | ... | @@ -154,9 +134,6 @@ |
154 | 134 | {{item._MedicalSpecialty}} |
155 | 135 | </td> |
156 | 136 | </tr> |
157 | - <!--<tr ng-if="typeof(searchCIListViewData) == 'undefined' || searchCIListViewData == null || searchCIListViewData == ''"> | |
158 | - <td colspan="6"><strong id="searchItem" style="color:black;">No illustration found for the selected search criteria!</strong></td> | |
159 | - </tr>--> | |
160 | 137 | |
161 | 138 | </tbody> |
162 | 139 | </table> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.aspx
... | ... | @@ -1452,6 +1452,7 @@ |
1452 | 1452 | <script src="libs/angular/1.4.9/angular.min.js"></script> |
1453 | 1453 | <script src="libs/angular/1.4.9/angular-route.min.js"></script> |
1454 | 1454 | <script src="libs/angular/1.4.9/angular-sanitize.min.js"></script> |
1455 | + <script src="themes/default/scripts/bootstrap/3.3.5/ui-bootstrap-tpls-0.3.0.min.js"></script> | |
1455 | 1456 | <script src="libs/angular/1.4.9/ngStorage.js"></script> |
1456 | 1457 | <script src="content/js/custom/custom.js"></script> |
1457 | 1458 | <!--Annotation Toolbar : jcanvas Library--> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... | ... | @@ -1442,4 +1442,31 @@ footer .browserIcons |
1442 | 1442 | #emailToHelpBlock |
1443 | 1443 | { |
1444 | 1444 | display:none; |
1445 | -} | |
1446 | 1445 | \ No newline at end of file |
1446 | +} | |
1447 | +/* ........Add paging bootstrap CSS... Birendra 14/2/2020 */ | |
1448 | +.pagination{margin:20px 0;} | |
1449 | +.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} | |
1450 | +.pagination ul>li{display:inline;} | |
1451 | +.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;} | |
1452 | +.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#317bc3; color:whitesmoke;} | |
1453 | +.pagination ul>.active>a,.pagination ul>.active>span{color:whitesmoke;cursor:default;} | |
1454 | +.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999999;background-color:transparent;cursor:default;} | |
1455 | +.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} | |
1456 | +.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} | |
1457 | +.pagination-centered{text-align:center;} | |
1458 | +.pagination-right{text-align:right;} | |
1459 | +.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px;} | |
1460 | +.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} | |
1461 | +.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} | |
1462 | +.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px;} | |
1463 | +.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;} | |
1464 | +.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px;} | |
1465 | +.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px;} | |
1466 | +.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;} | |
1467 | +.pager:after{clear:both;} | |
1468 | +.pager li{display:inline;} | |
1469 | +.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} | |
1470 | +.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5;} | |
1471 | +.pager .next>a,.pager .next>span{float:right;} | |
1472 | +.pager .previous>a,.pager .previous>span{float:left;} | |
1473 | +.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;} | |
1447 | 1474 | \ No newline at end of file | ... | ... |