From c4ecf557a1347863226f93ef7a17a55e7b5fbe42 Mon Sep 17 00:00:00 2001 From: mitali Date: Wed, 14 Sep 2016 18:36:00 +0530 Subject: [PATCH] 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. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js | 50 +++++++++++++++++++++++++++++++------------------- 400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js | 68 +++++++++++++++++++++++++++++++++++++++++++++----------------------- 400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html | 7 +++++-- 400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html | 11 +++++++---- 4 files changed, 88 insertions(+), 48 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 9c907f3..5556643 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -6,12 +6,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.CAAllBodyRegion = []; $scope.CAAllBodySystem = []; $scope.CAAllSpeciality = []; - $scope.selectedCAlistViewData = []; - $scope.searchCAlistViewData = []; + $scope.selectedCAListViewData = []; + $scope.searchCAListViewData = []; $scope.SelectedCAthumbImage = []; $scope.SelectedCAImage = []; $scope.SelectedCASummary = []; $scope.filterstring = false; + $scope.query = { + selectedbodyregion: null, + selectedbodysystem: null, + selectedspecialty: null, + }; $scope.$on('$viewContentLoaded', function (event) { // code that will be executed ... @@ -28,11 +33,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B promise.then( function (result) { $scope.AnimationData = result; - $scope.selectedCAlistViewData = $scope.AnimationData.root.CAData; + $scope.selectedCAListViewData = $scope.AnimationData.root.CAData; $('#grid-view').empty(); - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; @@ -70,7 +75,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B var SelectedCAthumbImage = []; SelectedCAthumbImage = new jinqJs() - .from($scope.selectedCAlistViewData) + .from($scope.selectedCAListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -82,11 +87,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B } else { - if ($scope.searchCAlistViewData.length > 0) { + if ($scope.searchCAListViewData.length > 0) { var SelectedCAthumbImage = []; SelectedCAthumbImage = new jinqJs() - .from($scope.searchCAlistViewData) + .from($scope.searchCAListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -101,16 +106,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.Reset = function (query) { - query.selectedbodyregion = ""; - query.selectedbodysystem = ""; - query.selectedspecialty = ""; + query.selectedbodyregion = null; + query.selectedbodysystem = null; + query.selectedspecialty = null; $scope.filterstring = false; - while ($scope.searchCAlistViewData.length) { - $scope.searchCAlistViewData.pop(); + while ($scope.searchCAListViewData.length) { + $scope.searchCAListViewData.pop(); } $('#grid-view').empty(); - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; var $el = $('
' @@ -134,8 +139,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.filterstring = true; - while ($scope.searchCAlistViewData.length) { - $scope.searchCAlistViewData.pop(); + while ($scope.searchCAListViewData.length) { + $scope.searchCAListViewData.pop(); } $('#grid-view').empty(); @@ -151,7 +156,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B filtercount = filtercount + 1; } - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { var selectimg = true; var count = 0; @@ -213,7 +218,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B }); - $scope.searchCAlistViewData.push( + $scope.searchCAListViewData.push( { "_id": value._id, "_ImageId": value._ImageId, @@ -231,6 +236,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B }); + + //Show Error Message in case of gridview if no data is found + if ($scope.searchCAListViewData.length == 0) { + + var $el = $('
No animation found for the selected search criteria!
').appendTo('#grid-view'); + $compile($el)($scope); + } } @@ -248,12 +260,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { var CITitle = []; CITitle = new jinqJs() - .from($scope.selectedCAlistViewData) + .from($scope.selectedCAListViewData) .where('_id = ' + $event.currentTarget.id) .select('_Title'); //console.log(CITitle); - //console.log($scope.selectedCAlistViewData); + //console.log($scope.selectedCAListViewData); $rootScope.ViewTitle = CITitle[0]._Title; } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index 2f83c02..7d6083a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -8,14 +8,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.CIAllOrientation = []; $scope.CIAllImageType = []; $scope.CIAllSpeciality = []; - $scope.searchCIlistViewData = []; + $scope.searchCIListViewData = []; $scope.SelectedCIthumbImage = []; $scope.SelectedCIImage = []; $scope.SelectedCISummary = []; $scope.SelectedCIId = []; $scope.SelectedCITitle = []; - $scope.selectedCIlistViewData = []; + $scope.selectedCIListViewData = []; $scope.filterstring = false; + $scope.query = { + selectedbodyregion: null, + selectedbodysystem: null, + selectedorientation: null, + selectedimagetype: null, + selectedspecialty: null, + }; $scope.$on('$viewContentLoaded', function (event) { // code that will be executed ... @@ -36,11 +43,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout promise.then( function (result) { $scope.IllustrationData = result; - $scope.selectedCIlistViewData = $scope.IllustrationData.root.CIData; + $scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; $('#grid-view').empty(); - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; var $el = $('
' @@ -77,7 +84,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var SelectedCIthumbImage = []; SelectedCIthumbImage = new jinqJs() - .from($scope.selectedCIlistViewData) + .from($scope.selectedCIListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -88,11 +95,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - if ($scope.searchCIlistViewData.length > 0) { + if ($scope.searchCIListViewData.length > 0) { var SelectedCIthumbImage = []; SelectedCIthumbImage = new jinqJs() - .from($scope.searchCIlistViewData) + .from($scope.searchCIListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -107,21 +114,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.Reset = function (query) { - query.selectedbodyregion = ""; - query.selectedbodysystem = ""; - query.selectedorientation = ""; - query.selectedimagetype = ""; - query.selectedspecialty = ""; + //query.selectedbodyregion = ""; + //query.selectedbodysystem = ""; + //query.selectedorientation = ""; + //query.selectedimagetype = ""; + //query.selectedspecialty = ""; + query.selectedbodyregion = null; + query.selectedbodysystem = null; + query.selectedorientation = null; + query.selectedimagetype = null; + query.selectedspecialty = null; + $scope.filterstring = false; - while ($scope.searchCIlistViewData.length) { - $scope.searchCIlistViewData.pop(); + while ($scope.searchCIListViewData.length) { + $scope.searchCIListViewData.pop(); } $('#grid-view').empty(); - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -140,10 +153,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.ApplySearch = function (query) { + alert(query.selectedbodyregion); + debugger; $scope.filterstring = true; - while ($scope.searchCIlistViewData.length) { - $scope.searchCIlistViewData.pop(); + while ($scope.searchCIListViewData.length) { + $scope.searchCIListViewData.pop(); } $('#grid-view').empty(); @@ -165,7 +180,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout filtercount = filtercount + 1; } - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { var selectimg = true; var count = 0; @@ -239,7 +254,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -253,7 +268,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); - $scope.searchCIlistViewData.push( + $scope.searchCIListViewData.push( { "_id": value._id, "_ImageId": value._ImageId, @@ -273,6 +288,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); + + //Show Error Message in case of gridview if no data is found + if ($scope.searchCIListViewData.length == 0) { + + var $el = $('
No illustration found for the selected search criteria!
').appendTo('#grid-view'); + $compile($el)($scope); + } } @@ -288,12 +310,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { var CITitle = []; CITitle = new jinqJs() - .from($scope.selectedCIlistViewData) + .from($scope.selectedCIListViewData) .where('_id = ' + $event.currentTarget.id) .select('_Title'); // console.log(CITitle); - // console.log($scope.selectedCIlistViewData); + // console.log($scope.selectedCIListViewData); $rootScope.ViewTitle = CITitle[0]._Title; } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html index 356a62b..88551d6 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html @@ -57,7 +57,7 @@ - + {{item._Title}} @@ -73,7 +73,7 @@ - + {{item._Title}} @@ -87,6 +87,9 @@ {{item._MedicalSpecialty}} + + No animation found for the selected search criteria! +
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html index 30980cd..981701a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html @@ -60,7 +60,7 @@
-