diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 502a1ec..7fbbf14 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -14,6 +14,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.filterstring = false; $scope.hostedServer = "http://aia5.adam.com/graphics/Multimedia/en/"; $scope.hostedFolderId; + $scope.idSelected; $scope.query = { selectedbodyregion: '', selectedbodysystem: '', @@ -46,6 +47,43 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.setActiveTab(1); } + //var curBodyRegion = localStorage.getItem("CACurBodyRegion"); + //if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { + // $scope.query.selectedbodyregion = curBodyRegion; + //} + //else { + // $scope.query.selectedbodyregion = ""; + //} + + //var curBodySystem = localStorage.getItem("CACurBodySystem"); + //if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { + // $scope.query.selectedbodysystem = curBodySystem; + //} + //else { + // $scope.query.selectedbodysystem = ""; + //} + + //var curSpeciality = localStorage.getItem("CACurSpeciality"); + //if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { + // $scope.query.selectedspecialty = curSpeciality; + //} + //else { + // $scope.query.selectedspecialty = ""; + //} + + + //if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedspecialty == "") { + // $scope.loadAllCA(); + //} + //else { + // $scope.ApplySearch($scope.query); + //} + + $scope.reRunSearchOnLoad(); + + }); + + $scope.reRunSearchOnLoad = function () { var curBodyRegion = localStorage.getItem("CACurBodyRegion"); if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { $scope.query.selectedbodyregion = curBodyRegion; @@ -76,10 +114,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { $scope.ApplySearch($scope.query); - } - - }); + } + } $scope.LoadCAJsonData = function () { @@ -159,6 +196,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.showItem = function (id) { //console.log(id); + $scope.idSelected = id; $scope.hiderow = true; if ($scope.filterstring == false) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index f5faba1..046bdb2 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -16,6 +16,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.SelectedCITitle = []; $scope.selectedCIListViewData = []; $scope.filterstring = false; + $scope.idSelected; $scope.query = { selectedbodyregion: '', selectedbodysystem: '', @@ -54,8 +55,61 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.setActiveTab(1); } + $scope.reRunSearchOnLoad(); + //var curBodyRegion = localStorage.getItem("CICurBodyRegion"); + //if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !=='') { + // $scope.query.selectedbodyregion = curBodyRegion; + //} + //else { + // $scope.query.selectedbodyregion = ""; + //} + + //var curBodySystem = localStorage.getItem("CICurBodySystem"); + //if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !=='') { + // $scope.query.selectedbodysystem = curBodySystem; + //} + //else { + // $scope.query.selectedbodysystem = ""; + //} + + //var curOrientation = localStorage.getItem("CICurOrientation"); + //if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !=='') { + // $scope.query.selectedorientation = curOrientation; + //} + //else { + // $scope.query.selectedorientation = ""; + //} + + //var curImageType = localStorage.getItem("CICurImageType"); + //if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !=='') { + // $scope.query.selectedimagetype = curImageType; + //} + //else { + // $scope.query.selectedimagetype = ""; + //} + + //var curSpeciality = localStorage.getItem("CICurSpeciality"); + //if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !=='') { + // $scope.query.selectedspecialty = curSpeciality; + //} + //else { + // $scope.query.selectedspecialty = ""; + //} + + + //if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedorientation == "" && $scope.query.selectedimagetype == "" && $scope.query.selectedspecialty == "") { + // $scope.loadAllCI(); + //} + //else { + // $scope.ApplySearch($scope.query); + //} + + }); + + $scope.reRunSearchOnLoad = function () { + var curBodyRegion = localStorage.getItem("CICurBodyRegion"); - if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !=='') { + if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { $scope.query.selectedbodyregion = curBodyRegion; } else { @@ -63,7 +117,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } var curBodySystem = localStorage.getItem("CICurBodySystem"); - if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !=='') { + if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { $scope.query.selectedbodysystem = curBodySystem; } else { @@ -71,7 +125,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } var curOrientation = localStorage.getItem("CICurOrientation"); - if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !=='') { + if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !== '') { $scope.query.selectedorientation = curOrientation; } else { @@ -79,7 +133,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } var curImageType = localStorage.getItem("CICurImageType"); - if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !=='') { + if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !== '') { $scope.query.selectedimagetype = curImageType; } else { @@ -87,7 +141,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } var curSpeciality = localStorage.getItem("CICurSpeciality"); - if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !=='') { + if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { $scope.query.selectedspecialty = curSpeciality; } else { @@ -102,7 +156,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.ApplySearch($scope.query); } - }); + } $scope.LoadCIJsonData = function () { @@ -175,7 +229,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } $scope.showItem = function (id) { - // console.log(id); + // console.log(id); + $scope.idSelected = id; $scope.hiderow = true; if ($scope.filterstring == false) { 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 fa48772..199eddc 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html @@ -1,4 +1,5 @@ -