Commit f82d3bec9036803acf7c948da5e88b911dfa4d0e

Authored by unknown
1 parent a9650846

Mozilla Firefox > Clinical Illustration > List View > "No illustration found for…

… the selected search criteria!" is display for some seconds even when selected filter is available.
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -288,35 +288,42 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -288,35 +288,42 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
288 } 288 }
289 289
290 $scope.ApplySearch = function (query) { 290 $scope.ApplySearch = function (query) {
291 - 291 +
  292 +
292 $scope.filterstring = true; 293 $scope.filterstring = true;
293 294
294 while ($scope.searchCIListViewData.length) { 295 while ($scope.searchCIListViewData.length) {
295 $scope.searchCIListViewData.pop(); 296 $scope.searchCIListViewData.pop();
296 } 297 }
297 298
298 - //$('#grid-view').empty(); 299 +
299 300
300 filtercount = 0; 301 filtercount = 0;
301 if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) { 302 if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) {
302 filtercount = filtercount + 1; 303 filtercount = filtercount + 1;
  304 +
303 localStorage.setItem("CICurBodyRegion", query.selectedbodyregion); 305 localStorage.setItem("CICurBodyRegion", query.selectedbodyregion);
  306 +
304 } 307 }
305 else { 308 else {
306 localStorage.setItem("CICurBodyRegion", ''); 309 localStorage.setItem("CICurBodyRegion", '');
  310 +
307 } 311 }
308 312
309 if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) { 313 if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) {
310 filtercount = filtercount + 1; 314 filtercount = filtercount + 1;
311 localStorage.setItem("CICurBodySystem", query.selectedbodysystem); 315 localStorage.setItem("CICurBodySystem", query.selectedbodysystem);
  316 +
312 } 317 }
313 else { 318 else {
314 localStorage.setItem("CICurBodySystem", ''); 319 localStorage.setItem("CICurBodySystem", '');
  320 +
315 } 321 }
316 322
317 if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== '')) { 323 if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== '')) {
318 filtercount = filtercount + 1; 324 filtercount = filtercount + 1;
319 localStorage.setItem("CICurOrientation", query.selectedorientation); 325 localStorage.setItem("CICurOrientation", query.selectedorientation);
  326 +
320 } 327 }
321 else { 328 else {
322 localStorage.setItem("CICurOrientation", ''); 329 localStorage.setItem("CICurOrientation", '');
@@ -325,17 +332,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -325,17 +332,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
325 if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== '')) { 332 if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== '')) {
326 filtercount = filtercount + 1; 333 filtercount = filtercount + 1;
327 localStorage.setItem("CICurImageType", query.selectedimagetype); 334 localStorage.setItem("CICurImageType", query.selectedimagetype);
  335 +
328 } 336 }
329 else { 337 else {
330 localStorage.setItem("CICurImageType", ''); 338 localStorage.setItem("CICurImageType", '');
  339 +
331 } 340 }
332 341
333 if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== '')) { 342 if (typeof (query.selectedspecialty) !== "undefined" && (query.selectedspecialty !== null && query.selectedspecialty !== '')) {
334 filtercount = filtercount + 1; 343 filtercount = filtercount + 1;
335 localStorage.setItem("CICurSpeciality", query.selectedspecialty); 344 localStorage.setItem("CICurSpeciality", query.selectedspecialty);
  345 +
336 } 346 }
337 else { 347 else {
338 localStorage.setItem("CICurSpeciality", ''); 348 localStorage.setItem("CICurSpeciality", '');
  349 +
339 } 350 }
340 351
341 352
@@ -454,17 +465,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -454,17 +465,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
454 "_Summary": value._Summary 465 "_Summary": value._Summary
455 466
456 }); 467 });
457 -  
458 } 468 }
459 -  
460 -  
461 }); 469 });
462 - 470 +
463 //Show Error Message in case of gridview if no data is found 471 //Show Error Message in case of gridview if no data is found
464 if ($scope.searchCIListViewData.length == 0) { 472 if ($scope.searchCIListViewData.length == 0) {
465 -  
466 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'); 473 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');
467 $compile($el)($scope); 474 $compile($el)($scope);
  475 + $('table > #ListViewDiv > #searchItem td').remove();
  476 + $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>');
468 } 477 }
469 }, 478 },
470 function (error) { 479 function (error) {
@@ -472,8 +481,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -472,8 +481,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
472 console.log(' $scope.IllustrationData = ' + error.statusText); 481 console.log(' $scope.IllustrationData = ' + error.statusText);
473 } 482 }
474 ); 483 );
475 -  
476 -  
477 } 484 }
478 485
479 486
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
@@ -155,9 +155,10 @@ @@ -155,9 +155,10 @@
155 {{item._MedicalSpecialty}} 155 {{item._MedicalSpecialty}}
156 </td> 156 </td>
157 </tr> 157 </tr>
158 - <tr ng-if="typeof(searchCIListViewData) == 'undefined' || searchCIListViewData == null || searchCIListViewData == ''">  
159 - <td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td>  
160 - </tr> 158 + <!--<tr ng-if="typeof(searchCIListViewData) == 'undefined' || searchCIListViewData == null || searchCIListViewData == ''">
  159 + <td colspan="6"><strong id="searchItem" style="color:black;">No illustration found for the selected search criteria!</strong></td>
  160 + </tr>-->
  161 +
161 </tbody> 162 </tbody>
162 </table> 163 </table>
163 </div> 164 </div>