Commit d0198fd51f5d1018e3ba6061ea80a7952cfbfbbf
1 parent
194dc810
Bug #8679: CI > List View> Image should be selected in the list if we click on any of it
Showing
5 changed files
with
117 additions
and
18 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -14,6 +14,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
14 | 14 | $scope.filterstring = false; |
15 | 15 | $scope.hostedServer = "http://aia5.adam.com/graphics/Multimedia/en/"; |
16 | 16 | $scope.hostedFolderId; |
17 | + $scope.idSelected; | |
17 | 18 | $scope.query = { |
18 | 19 | selectedbodyregion: '', |
19 | 20 | selectedbodysystem: '', |
... | ... | @@ -46,6 +47,43 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
46 | 47 | $scope.setActiveTab(1); |
47 | 48 | } |
48 | 49 | |
50 | + //var curBodyRegion = localStorage.getItem("CACurBodyRegion"); | |
51 | + //if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { | |
52 | + // $scope.query.selectedbodyregion = curBodyRegion; | |
53 | + //} | |
54 | + //else { | |
55 | + // $scope.query.selectedbodyregion = ""; | |
56 | + //} | |
57 | + | |
58 | + //var curBodySystem = localStorage.getItem("CACurBodySystem"); | |
59 | + //if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { | |
60 | + // $scope.query.selectedbodysystem = curBodySystem; | |
61 | + //} | |
62 | + //else { | |
63 | + // $scope.query.selectedbodysystem = ""; | |
64 | + //} | |
65 | + | |
66 | + //var curSpeciality = localStorage.getItem("CACurSpeciality"); | |
67 | + //if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { | |
68 | + // $scope.query.selectedspecialty = curSpeciality; | |
69 | + //} | |
70 | + //else { | |
71 | + // $scope.query.selectedspecialty = ""; | |
72 | + //} | |
73 | + | |
74 | + | |
75 | + //if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedspecialty == "") { | |
76 | + // $scope.loadAllCA(); | |
77 | + //} | |
78 | + //else { | |
79 | + // $scope.ApplySearch($scope.query); | |
80 | + //} | |
81 | + | |
82 | + $scope.reRunSearchOnLoad(); | |
83 | + | |
84 | + }); | |
85 | + | |
86 | + $scope.reRunSearchOnLoad = function () { | |
49 | 87 | var curBodyRegion = localStorage.getItem("CACurBodyRegion"); |
50 | 88 | if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { |
51 | 89 | $scope.query.selectedbodyregion = curBodyRegion; |
... | ... | @@ -76,10 +114,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
76 | 114 | } |
77 | 115 | else { |
78 | 116 | $scope.ApplySearch($scope.query); |
79 | - } | |
80 | 117 | |
81 | - | |
82 | - }); | |
118 | + } | |
119 | + } | |
83 | 120 | |
84 | 121 | $scope.LoadCAJsonData = function () { |
85 | 122 | |
... | ... | @@ -159,6 +196,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
159 | 196 | |
160 | 197 | $scope.showItem = function (id) { |
161 | 198 | //console.log(id); |
199 | + $scope.idSelected = id; | |
162 | 200 | $scope.hiderow = true; |
163 | 201 | if ($scope.filterstring == false) { |
164 | 202 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -16,6 +16,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
16 | 16 | $scope.SelectedCITitle = []; |
17 | 17 | $scope.selectedCIListViewData = []; |
18 | 18 | $scope.filterstring = false; |
19 | + $scope.idSelected; | |
19 | 20 | $scope.query = { |
20 | 21 | selectedbodyregion: '', |
21 | 22 | selectedbodysystem: '', |
... | ... | @@ -54,8 +55,61 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
54 | 55 | $scope.setActiveTab(1); |
55 | 56 | } |
56 | 57 | |
58 | + $scope.reRunSearchOnLoad(); | |
59 | + //var curBodyRegion = localStorage.getItem("CICurBodyRegion"); | |
60 | + //if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !=='') { | |
61 | + // $scope.query.selectedbodyregion = curBodyRegion; | |
62 | + //} | |
63 | + //else { | |
64 | + // $scope.query.selectedbodyregion = ""; | |
65 | + //} | |
66 | + | |
67 | + //var curBodySystem = localStorage.getItem("CICurBodySystem"); | |
68 | + //if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !=='') { | |
69 | + // $scope.query.selectedbodysystem = curBodySystem; | |
70 | + //} | |
71 | + //else { | |
72 | + // $scope.query.selectedbodysystem = ""; | |
73 | + //} | |
74 | + | |
75 | + //var curOrientation = localStorage.getItem("CICurOrientation"); | |
76 | + //if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !=='') { | |
77 | + // $scope.query.selectedorientation = curOrientation; | |
78 | + //} | |
79 | + //else { | |
80 | + // $scope.query.selectedorientation = ""; | |
81 | + //} | |
82 | + | |
83 | + //var curImageType = localStorage.getItem("CICurImageType"); | |
84 | + //if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !=='') { | |
85 | + // $scope.query.selectedimagetype = curImageType; | |
86 | + //} | |
87 | + //else { | |
88 | + // $scope.query.selectedimagetype = ""; | |
89 | + //} | |
90 | + | |
91 | + //var curSpeciality = localStorage.getItem("CICurSpeciality"); | |
92 | + //if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !=='') { | |
93 | + // $scope.query.selectedspecialty = curSpeciality; | |
94 | + //} | |
95 | + //else { | |
96 | + // $scope.query.selectedspecialty = ""; | |
97 | + //} | |
98 | + | |
99 | + | |
100 | + //if ($scope.query.selectedbodyregion == "" && $scope.query.selectedbodysystem == "" && $scope.query.selectedorientation == "" && $scope.query.selectedimagetype == "" && $scope.query.selectedspecialty == "") { | |
101 | + // $scope.loadAllCI(); | |
102 | + //} | |
103 | + //else { | |
104 | + // $scope.ApplySearch($scope.query); | |
105 | + //} | |
106 | + | |
107 | + }); | |
108 | + | |
109 | + $scope.reRunSearchOnLoad = function () { | |
110 | + | |
57 | 111 | var curBodyRegion = localStorage.getItem("CICurBodyRegion"); |
58 | - if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !=='') { | |
112 | + if (typeof (curBodyRegion) !== "undefined" && curBodyRegion !== null && curBodyRegion !== '') { | |
59 | 113 | $scope.query.selectedbodyregion = curBodyRegion; |
60 | 114 | } |
61 | 115 | else { |
... | ... | @@ -63,7 +117,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
63 | 117 | } |
64 | 118 | |
65 | 119 | var curBodySystem = localStorage.getItem("CICurBodySystem"); |
66 | - if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !=='') { | |
120 | + if (typeof (curBodySystem) !== "undefined" && curBodySystem !== null && curBodySystem !== '') { | |
67 | 121 | $scope.query.selectedbodysystem = curBodySystem; |
68 | 122 | } |
69 | 123 | else { |
... | ... | @@ -71,7 +125,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
71 | 125 | } |
72 | 126 | |
73 | 127 | var curOrientation = localStorage.getItem("CICurOrientation"); |
74 | - if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !=='') { | |
128 | + if (typeof (curOrientation) !== "undefined" && curOrientation !== null && curOrientation !== '') { | |
75 | 129 | $scope.query.selectedorientation = curOrientation; |
76 | 130 | } |
77 | 131 | else { |
... | ... | @@ -79,7 +133,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
79 | 133 | } |
80 | 134 | |
81 | 135 | var curImageType = localStorage.getItem("CICurImageType"); |
82 | - if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !=='') { | |
136 | + if (typeof (curImageType) !== "undefined" && curImageType !== null && curImageType !== '') { | |
83 | 137 | $scope.query.selectedimagetype = curImageType; |
84 | 138 | } |
85 | 139 | else { |
... | ... | @@ -87,7 +141,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
87 | 141 | } |
88 | 142 | |
89 | 143 | var curSpeciality = localStorage.getItem("CICurSpeciality"); |
90 | - if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !=='') { | |
144 | + if (typeof (curSpeciality) !== "undefined" && curSpeciality !== null && curSpeciality !== '') { | |
91 | 145 | $scope.query.selectedspecialty = curSpeciality; |
92 | 146 | } |
93 | 147 | else { |
... | ... | @@ -102,7 +156,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
102 | 156 | $scope.ApplySearch($scope.query); |
103 | 157 | } |
104 | 158 | |
105 | - }); | |
159 | + } | |
106 | 160 | |
107 | 161 | $scope.LoadCIJsonData = function () { |
108 | 162 | |
... | ... | @@ -175,7 +229,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
175 | 229 | } |
176 | 230 | |
177 | 231 | $scope.showItem = function (id) { |
178 | - // console.log(id); | |
232 | + // console.log(id); | |
233 | + $scope.idSelected = id; | |
179 | 234 | $scope.hiderow = true; |
180 | 235 | if ($scope.filterstring == false) { |
181 | 236 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
1 | -<div class="bodyWrap row "> | |
1 | + | |
2 | +<div class="bodyWrap row "> | |
2 | 3 | <div ng-include="'app/widget/MainMenu.html'" /> |
3 | 4 | <div class="main"> |
4 | 5 | |
... | ... | @@ -68,7 +69,7 @@ |
68 | 69 | </tr> |
69 | 70 | </thead> |
70 | 71 | <tbody ng-if="!filterstring" class="clstbodyca"> |
71 | - <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData"> | |
72 | + <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData"> | |
72 | 73 | <td style="max-width: 250px;"> |
73 | 74 | {{item._Title}} |
74 | 75 | </td> |
... | ... | @@ -84,7 +85,7 @@ |
84 | 85 | </tr> |
85 | 86 | </tbody> |
86 | 87 | <tbody ng-if="filterstring" class="clstbodyca"> |
87 | - <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData"> | |
88 | + <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData"> | |
88 | 89 | <td style="max-width: 250px;"> |
89 | 90 | {{item._Title}} |
90 | 91 | </td> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html
1 | -<div class="bodyWrap row no-scroll"> | |
1 | + | |
2 | +<div class="bodyWrap row no-scroll"> | |
2 | 3 | <div ng-include=" 'app/widget/MainMenu.html' " /> |
3 | 4 | <div class="main"> |
4 | 5 | <div class="col-sm-12 stickey-area clsstickydiv"> |
... | ... | @@ -112,7 +113,7 @@ |
112 | 113 | </tr> |
113 | 114 | </thead> |
114 | 115 | <tbody ng-if="!filterstring" class="clstbody"> |
115 | - <tr id="{{item._id}}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIListViewData"> | |
116 | + <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCIListViewData"> | |
116 | 117 | <td width="15%"> |
117 | 118 | {{item._Title}} |
118 | 119 | </td> |
... | ... | @@ -134,7 +135,7 @@ |
134 | 135 | </tr> |
135 | 136 | </tbody> |
136 | 137 | <tbody ng-if="filterstring" class="clstbody"> |
137 | - <tr ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in searchCIListViewData"> | |
138 | + <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCIListViewData"> | |
138 | 139 | <td width="15%"> |
139 | 140 | {{item._Title}} |
140 | 141 | </td> |
... | ... | @@ -160,7 +161,7 @@ |
160 | 161 | </tbody> |
161 | 162 | </table> |
162 | 163 | </div> |
163 | - <div class="col-sm-12" ng-show=" hiderow" style="padding-left:25px;padding-top:10px;"> | |
164 | + <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;"> | |
164 | 165 | <div class="row well"> |
165 | 166 | <div title="{{SelectedCITitle}}" class="col-sm-3 col-lg-2 no-padding"> |
166 | 167 | <div class="thumbnail no-margin"> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... | ... | @@ -905,4 +905,8 @@ background-image: url("../../../../../content/images/blank-shapes.png"); |
905 | 905 | height:100%; |
906 | 906 | background:#fff; |
907 | 907 | border-radius: 50%; |
908 | - } | |
909 | 908 | \ No newline at end of file |
909 | + } | |
910 | +/*Bug #8679*/ | |
911 | + .selected { | |
912 | + background-color: lightgrey; | |
913 | + } | |
910 | 914 | \ No newline at end of file | ... | ... |