Commit c4ecf557a1347863226f93ef7a17a55e7b5fbe42
1 parent
c3e32785
Bug #7707:CI and CA Search > The search button should work in case no criteria is selected.
Bug #7677:Clinical Animation> thumbnails are not displayed Bug #7523:Clinical Illustration:Message is missing, when no items are found after search. Bug #7520:Clinical Animation:Message is missing! when no items are found after search.
Showing
4 changed files
with
88 additions
and
48 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -6,12 +6,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
6 | 6 | $scope.CAAllBodyRegion = []; |
7 | 7 | $scope.CAAllBodySystem = []; |
8 | 8 | $scope.CAAllSpeciality = []; |
9 | - $scope.selectedCAlistViewData = []; | |
10 | - $scope.searchCAlistViewData = []; | |
9 | + $scope.selectedCAListViewData = []; | |
10 | + $scope.searchCAListViewData = []; | |
11 | 11 | $scope.SelectedCAthumbImage = []; |
12 | 12 | $scope.SelectedCAImage = []; |
13 | 13 | $scope.SelectedCASummary = []; |
14 | 14 | $scope.filterstring = false; |
15 | + $scope.query = { | |
16 | + selectedbodyregion: null, | |
17 | + selectedbodysystem: null, | |
18 | + selectedspecialty: null, | |
19 | + }; | |
15 | 20 | |
16 | 21 | $scope.$on('$viewContentLoaded', function (event) { |
17 | 22 | // code that will be executed ... |
... | ... | @@ -28,11 +33,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
28 | 33 | promise.then( |
29 | 34 | function (result) { |
30 | 35 | $scope.AnimationData = result; |
31 | - $scope.selectedCAlistViewData = $scope.AnimationData.root.CAData; | |
36 | + $scope.selectedCAListViewData = $scope.AnimationData.root.CAData; | |
32 | 37 | |
33 | 38 | $('#grid-view').empty(); |
34 | 39 | |
35 | - angular.forEach($scope.selectedCAlistViewData, function (value, key) { | |
40 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
36 | 41 | $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; |
37 | 42 | |
38 | 43 | |
... | ... | @@ -70,7 +75,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
70 | 75 | |
71 | 76 | var SelectedCAthumbImage = []; |
72 | 77 | SelectedCAthumbImage = new jinqJs() |
73 | - .from($scope.selectedCAlistViewData) | |
78 | + .from($scope.selectedCAListViewData) | |
74 | 79 | .where('_id = ' + id) |
75 | 80 | .select('_ThumbnailImage', '_Summary', '_id', '_Title'); |
76 | 81 | |
... | ... | @@ -82,11 +87,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
82 | 87 | |
83 | 88 | } |
84 | 89 | else { |
85 | - if ($scope.searchCAlistViewData.length > 0) { | |
90 | + if ($scope.searchCAListViewData.length > 0) { | |
86 | 91 | |
87 | 92 | var SelectedCAthumbImage = []; |
88 | 93 | SelectedCAthumbImage = new jinqJs() |
89 | - .from($scope.searchCAlistViewData) | |
94 | + .from($scope.searchCAListViewData) | |
90 | 95 | .where('_id = ' + id) |
91 | 96 | .select('_ThumbnailImage', '_Summary', '_id', '_Title'); |
92 | 97 | |
... | ... | @@ -101,16 +106,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
101 | 106 | |
102 | 107 | $scope.Reset = function (query) { |
103 | 108 | |
104 | - query.selectedbodyregion = ""; | |
105 | - query.selectedbodysystem = ""; | |
106 | - query.selectedspecialty = ""; | |
109 | + query.selectedbodyregion = null; | |
110 | + query.selectedbodysystem = null; | |
111 | + query.selectedspecialty = null; | |
107 | 112 | $scope.filterstring = false; |
108 | - while ($scope.searchCAlistViewData.length) { | |
109 | - $scope.searchCAlistViewData.pop(); | |
113 | + while ($scope.searchCAListViewData.length) { | |
114 | + $scope.searchCAListViewData.pop(); | |
110 | 115 | } |
111 | 116 | $('#grid-view').empty(); |
112 | 117 | |
113 | - angular.forEach($scope.selectedCAlistViewData, function (value, key) { | |
118 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
114 | 119 | $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; |
115 | 120 | |
116 | 121 | var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._Title + ' data-ng-click="openView($event)">' |
... | ... | @@ -134,8 +139,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
134 | 139 | |
135 | 140 | $scope.filterstring = true; |
136 | 141 | |
137 | - while ($scope.searchCAlistViewData.length) { | |
138 | - $scope.searchCAlistViewData.pop(); | |
142 | + while ($scope.searchCAListViewData.length) { | |
143 | + $scope.searchCAListViewData.pop(); | |
139 | 144 | } |
140 | 145 | |
141 | 146 | $('#grid-view').empty(); |
... | ... | @@ -151,7 +156,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
151 | 156 | filtercount = filtercount + 1; |
152 | 157 | } |
153 | 158 | |
154 | - angular.forEach($scope.selectedCAlistViewData, function (value, key) { | |
159 | + angular.forEach($scope.selectedCAListViewData, function (value, key) { | |
155 | 160 | |
156 | 161 | var selectimg = true; |
157 | 162 | var count = 0; |
... | ... | @@ -213,7 +218,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
213 | 218 | }); |
214 | 219 | |
215 | 220 | |
216 | - $scope.searchCAlistViewData.push( | |
221 | + $scope.searchCAListViewData.push( | |
217 | 222 | { |
218 | 223 | "_id": value._id, |
219 | 224 | "_ImageId": value._ImageId, |
... | ... | @@ -231,6 +236,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
231 | 236 | |
232 | 237 | |
233 | 238 | }); |
239 | + | |
240 | + //Show Error Message in case of gridview if no data is found | |
241 | + if ($scope.searchCAListViewData.length == 0) { | |
242 | + | |
243 | + var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:red;">No animation found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | |
244 | + $compile($el)($scope); | |
245 | + } | |
234 | 246 | } |
235 | 247 | |
236 | 248 | |
... | ... | @@ -248,12 +260,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
248 | 260 | if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { |
249 | 261 | var CITitle = []; |
250 | 262 | CITitle = new jinqJs() |
251 | - .from($scope.selectedCAlistViewData) | |
263 | + .from($scope.selectedCAListViewData) | |
252 | 264 | .where('_id = ' + $event.currentTarget.id) |
253 | 265 | .select('_Title'); |
254 | 266 | |
255 | 267 | //console.log(CITitle); |
256 | - //console.log($scope.selectedCAlistViewData); | |
268 | + //console.log($scope.selectedCAListViewData); | |
257 | 269 | |
258 | 270 | $rootScope.ViewTitle = CITitle[0]._Title; |
259 | 271 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -8,14 +8,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
8 | 8 | $scope.CIAllOrientation = []; |
9 | 9 | $scope.CIAllImageType = []; |
10 | 10 | $scope.CIAllSpeciality = []; |
11 | - $scope.searchCIlistViewData = []; | |
11 | + $scope.searchCIListViewData = []; | |
12 | 12 | $scope.SelectedCIthumbImage = []; |
13 | 13 | $scope.SelectedCIImage = []; |
14 | 14 | $scope.SelectedCISummary = []; |
15 | 15 | $scope.SelectedCIId = []; |
16 | 16 | $scope.SelectedCITitle = []; |
17 | - $scope.selectedCIlistViewData = []; | |
17 | + $scope.selectedCIListViewData = []; | |
18 | 18 | $scope.filterstring = false; |
19 | + $scope.query = { | |
20 | + selectedbodyregion: null, | |
21 | + selectedbodysystem: null, | |
22 | + selectedorientation: null, | |
23 | + selectedimagetype: null, | |
24 | + selectedspecialty: null, | |
25 | + }; | |
19 | 26 | |
20 | 27 | $scope.$on('$viewContentLoaded', function (event) { |
21 | 28 | // code that will be executed ... |
... | ... | @@ -36,11 +43,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
36 | 43 | promise.then( |
37 | 44 | function (result) { |
38 | 45 | $scope.IllustrationData = result; |
39 | - $scope.selectedCIlistViewData = $scope.IllustrationData.root.CIData; | |
46 | + $scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; | |
40 | 47 | |
41 | 48 | $('#grid-view').empty(); |
42 | 49 | |
43 | - angular.forEach($scope.selectedCIlistViewData, function (value, key) { | |
50 | + angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
44 | 51 | $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; |
45 | 52 | |
46 | 53 | var $el = $('<div id=' + value._id + ' class="col-sm-3 col-md-2" title = ' + value._Title + ' data-ng-click="openView($event)">' |
... | ... | @@ -77,7 +84,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
77 | 84 | |
78 | 85 | var SelectedCIthumbImage = []; |
79 | 86 | SelectedCIthumbImage = new jinqJs() |
80 | - .from($scope.selectedCIlistViewData) | |
87 | + .from($scope.selectedCIListViewData) | |
81 | 88 | .where('_id = ' + id) |
82 | 89 | .select('_ThumbnailImage', '_Summary', '_id', '_Title'); |
83 | 90 | |
... | ... | @@ -88,11 +95,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
88 | 95 | |
89 | 96 | } |
90 | 97 | else { |
91 | - if ($scope.searchCIlistViewData.length > 0) { | |
98 | + if ($scope.searchCIListViewData.length > 0) { | |
92 | 99 | |
93 | 100 | var SelectedCIthumbImage = []; |
94 | 101 | SelectedCIthumbImage = new jinqJs() |
95 | - .from($scope.searchCIlistViewData) | |
102 | + .from($scope.searchCIListViewData) | |
96 | 103 | .where('_id = ' + id) |
97 | 104 | .select('_ThumbnailImage', '_Summary', '_id', '_Title'); |
98 | 105 | |
... | ... | @@ -107,21 +114,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
107 | 114 | |
108 | 115 | $scope.Reset = function (query) { |
109 | 116 | |
110 | - query.selectedbodyregion = ""; | |
111 | - query.selectedbodysystem = ""; | |
112 | - query.selectedorientation = ""; | |
113 | - query.selectedimagetype = ""; | |
114 | - query.selectedspecialty = ""; | |
117 | + //query.selectedbodyregion = ""; | |
118 | + //query.selectedbodysystem = ""; | |
119 | + //query.selectedorientation = ""; | |
120 | + //query.selectedimagetype = ""; | |
121 | + //query.selectedspecialty = ""; | |
122 | + query.selectedbodyregion = null; | |
123 | + query.selectedbodysystem = null; | |
124 | + query.selectedorientation = null; | |
125 | + query.selectedimagetype = null; | |
126 | + query.selectedspecialty = null; | |
127 | + | |
115 | 128 | $scope.filterstring = false; |
116 | - while ($scope.searchCIlistViewData.length) { | |
117 | - $scope.searchCIlistViewData.pop(); | |
129 | + while ($scope.searchCIListViewData.length) { | |
130 | + $scope.searchCIListViewData.pop(); | |
118 | 131 | } |
119 | 132 | $('#grid-view').empty(); |
120 | 133 | |
121 | - angular.forEach($scope.selectedCIlistViewData, function (value, key) { | |
134 | + angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
122 | 135 | $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; |
123 | 136 | |
124 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
137 | + var $el = $('<div id=' + value._id + ' class="col-sm-3 col-md-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
125 | 138 | + '<div class="thumbnail" >' |
126 | 139 | + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' |
127 | 140 | + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); |
... | ... | @@ -140,10 +153,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
140 | 153 | |
141 | 154 | $scope.ApplySearch = function (query) { |
142 | 155 | |
156 | + alert(query.selectedbodyregion); | |
157 | + debugger; | |
143 | 158 | $scope.filterstring = true; |
144 | 159 | |
145 | - while ($scope.searchCIlistViewData.length) { | |
146 | - $scope.searchCIlistViewData.pop(); | |
160 | + while ($scope.searchCIListViewData.length) { | |
161 | + $scope.searchCIListViewData.pop(); | |
147 | 162 | } |
148 | 163 | |
149 | 164 | $('#grid-view').empty(); |
... | ... | @@ -165,7 +180,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
165 | 180 | filtercount = filtercount + 1; |
166 | 181 | } |
167 | 182 | |
168 | - angular.forEach($scope.selectedCIlistViewData, function (value, key) { | |
183 | + angular.forEach($scope.selectedCIListViewData, function (value, key) { | |
169 | 184 | |
170 | 185 | var selectimg = true; |
171 | 186 | var count = 0; |
... | ... | @@ -239,7 +254,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
239 | 254 | |
240 | 255 | $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; |
241 | 256 | |
242 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
257 | + var $el = $('<div id=' + value._id + ' class="col-sm-3 col-md-2" title = ' + value._Title + ' data-ng-click="openView($event)">' | |
243 | 258 | + '<div class="thumbnail" >' |
244 | 259 | + '<img id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' |
245 | 260 | + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); |
... | ... | @@ -253,7 +268,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
253 | 268 | }); |
254 | 269 | |
255 | 270 | |
256 | - $scope.searchCIlistViewData.push( | |
271 | + $scope.searchCIListViewData.push( | |
257 | 272 | { |
258 | 273 | "_id": value._id, |
259 | 274 | "_ImageId": value._ImageId, |
... | ... | @@ -273,6 +288,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
273 | 288 | |
274 | 289 | |
275 | 290 | }); |
291 | + | |
292 | + //Show Error Message in case of gridview if no data is found | |
293 | + if ($scope.searchCIListViewData.length == 0) { | |
294 | + | |
295 | + var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:red">No illustration found for the selected search criteria!</strong></div>').appendTo('#grid-view'); | |
296 | + $compile($el)($scope); | |
297 | + } | |
276 | 298 | } |
277 | 299 | |
278 | 300 | |
... | ... | @@ -288,12 +310,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
288 | 310 | if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { |
289 | 311 | var CITitle = []; |
290 | 312 | CITitle = new jinqJs() |
291 | - .from($scope.selectedCIlistViewData) | |
313 | + .from($scope.selectedCIListViewData) | |
292 | 314 | .where('_id = ' + $event.currentTarget.id) |
293 | 315 | .select('_Title'); |
294 | 316 | |
295 | 317 | // console.log(CITitle); |
296 | - // console.log($scope.selectedCIlistViewData); | |
318 | + // console.log($scope.selectedCIListViewData); | |
297 | 319 | |
298 | 320 | $rootScope.ViewTitle = CITitle[0]._Title; |
299 | 321 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | </tr> |
58 | 58 | </thead> |
59 | 59 | <tbody ng-if="!filterstring" class="clstbodyca"> |
60 | - <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAlistViewData"> | |
60 | + <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData"> | |
61 | 61 | <td style="max-width: 250px;"> |
62 | 62 | {{item._Title}} |
63 | 63 | </td> |
... | ... | @@ -73,7 +73,7 @@ |
73 | 73 | </tr> |
74 | 74 | </tbody> |
75 | 75 | <tbody ng-if="filterstring" class="clstbody"> |
76 | - <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCAlistViewData"> | |
76 | + <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData"> | |
77 | 77 | <td style="max-width: 250px;"> |
78 | 78 | {{item._Title}} |
79 | 79 | </td> |
... | ... | @@ -87,6 +87,9 @@ |
87 | 87 | {{item._MedicalSpecialty}} |
88 | 88 | </td> |
89 | 89 | </tr> |
90 | + <tr ng-if="typeof(searchCAListViewData) == 'undefined' || searchCAListViewData == null || searchCAListViewData == ''"> | |
91 | + <td colspan="3"><strong style="color:red;">No animation found for the selected search criteria!</strong></td> | |
92 | + </tr> | |
90 | 93 | </tbody> |
91 | 94 | </table> |
92 | 95 | </div> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 | <div class="row tab-content" style="padding-left:25px; width:99%"> |
61 | 61 | |
62 | 62 | <div role="tabpanel" class="tab-pane active" id="grid-view"> |
63 | - <!--<div ng-if="!filterstring" ng-repeat="item in selectedCIlistViewData"> | |
63 | + <!--<div ng-if="!filterstring" ng-repeat="item in selectedCIListViewData"> | |
64 | 64 | <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> |
65 | 65 | <div class="thumbnail"> |
66 | 66 | <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> |
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | </div> |
72 | 72 | </div> |
73 | 73 | |
74 | - <div ng-if="filterstring" ng-repeat="item in searchCIlistViewData"> | |
74 | + <div ng-if="filterstring" ng-repeat="item in searchCIListViewData"> | |
75 | 75 | <div id="{{item._id}}" class="col-sm-3 col-lg-2" title="{{item._Title}}" data-ng-click="openView($event)"> |
76 | 76 | <div class="thumbnail"> |
77 | 77 | <img ng-src="~ /../content/images/ci/thumbnails/{{item._ThumbnailImage}}" alt="" title=""> |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | </tr> |
101 | 101 | </thead> |
102 | 102 | <tbody ng-if="!filterstring" class="clstbody"> |
103 | - <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIlistViewData"> | |
103 | + <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIListViewData"> | |
104 | 104 | <td> |
105 | 105 | {{item._Title}} |
106 | 106 | </td> |
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | </tr> |
123 | 123 | </tbody> |
124 | 124 | <tbody ng-if="filterstring" class="clstbody"> |
125 | - <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCIlistViewData"> | |
125 | + <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCIListViewData"> | |
126 | 126 | <td> |
127 | 127 | {{item._Title}} |
128 | 128 | </td> |
... | ... | @@ -142,6 +142,9 @@ |
142 | 142 | {{item._MedicalSpecialty}} |
143 | 143 | </td> |
144 | 144 | </tr> |
145 | + <tr ng-if="typeof(searchCIListViewData) == 'undefined' || searchCIListViewData == null || searchCIListViewData == ''"> | |
146 | + <td colspan="6"><strong style="color:red;">No illustration found for the selected search criteria!</strong></td> | |
147 | + </tr> | |
145 | 148 | </tbody> |
146 | 149 | </table> |
147 | 150 | </div> | ... | ... |