Commit abbb1e0682306377d090d5cb63c922e004243cad

Authored by unknown
2 parents 26fc1e9e 694babcb

Merge branch 'Develop' of http://52.6.196.163/ADAM/AIAHTML5 into listMangerStateMaintainIssue1

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -634,6 +634,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
634 634 }
635 635 }
636 636  
  637 + //call watch on '$scope.VocabTermTxt and compile <li> and append to <ul> on first time load
  638 + $scope.$watch('$scope.VocabTermTxt', function (newValue, oldValue, scope) {
  639 +
  640 + //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed
  641 + //Remove the list and then Repopulate
  642 + if ($('#searchListDiv').html()!="")
  643 + $('#searchListDiv').empty()
  644 + //Delay compile of ul li so that the remove of li is completed.
  645 + $timeout(function () {
  646 + var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:1000;"><li ng-repeat="item in VocabTermTxt| filter:{ _TermText: searchFilter}">' +
  647 + '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
  648 + ' </li></ul>').appendTo('#searchListDiv')
  649 + $compile($e2)($scope);
  650 +
  651 + }, 500);
  652 +
  653 + }, true);
  654 +
637 655 }
638 656  
639 657 $scope.loadBodyViewData = function (currentVoid) {
... ... @@ -6562,7 +6580,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6562 6580  
6563 6581 // $rootScope.isHighlightBodyByBodySystem = false;
6564 6582  
6565   -
  6583 + //Remove the Search list and then Repopulate it on change of Gender
  6584 + $('#searchListDiv').empty()
6566 6585  
6567 6586 $rootScope.isGenderChnage = true;
6568 6587  
... ... @@ -6791,7 +6810,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6791 6810  
6792 6811 // $rootScope.isHighlightBodyByBodySystem = false;
6793 6812  
6794   -
  6813 + //Remove the search list and then Repopulate it on change of View
  6814 + $('#searchListDiv').empty()
6795 6815  
6796 6816 if ($rootScope.openViews.length > 0) {
6797 6817 $rootScope.openViews.splice($rootScope.openViews.length - 1);
... ... @@ -7525,7 +7545,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7525 7545 console.log('listManagerEvent');
7526 7546 var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
7527 7547  
7528   - $('#bodySystems').empty();
  7548 + var optionsLength = $('#bodySystems option').length;//.children('option').length;
  7549 + console.log('optionsLength= ' + optionsLength)
  7550 + if (optionsLength>0)
  7551 + $('#bodySystems').empty();
7529 7552  
7530 7553  
7531 7554 var $all = $('<option id="0" selected="">All</option>').appendTo('#bodySystems');
... ... @@ -7559,7 +7582,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7559 7582 }
7560 7583  
7561 7584 }
7562   -
  7585 +
7563 7586  
7564 7587  
7565 7588 });
... ... @@ -8179,6 +8202,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8179 8202 }
8180 8203 }
8181 8204  
  8205 + $scope.resetSearchListView = function () {
  8206 +
  8207 + //Remove the list and then Repopulate it on change of $scope.searchFilter
  8208 + $('#searchListDiv').empty()
  8209 + // added the timeout to delay the compile of ul li
  8210 + $timeout(function () {
  8211 + var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:1000;"><li ng-repeat="item in VocabTermTxt| filter:{ _TermText: searchFilter}">' +
  8212 + '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
  8213 + ' </li></ul>').appendTo('#searchListDiv')
  8214 + $compile($e2)($scope);
  8215 + }, 500);
  8216 +
  8217 +
  8218 + }
  8219 +
8182 8220  
8183 8221 }]
8184 8222  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -71,11 +71,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
71 71 $rootScope.shapestyleborderWidth = 2;
72 72 $rootScope.shapestyleborderStyles = "solid";
73 73  
  74 +
  75 +
74 76 $rootScope.initializeAIA = function () {
75 77  
76 78 $rootScope.isLoading = false;
77 79 $rootScope.isVisibleLogin = true;
78 80  
  81 + getUserDetails();
79 82 }
80 83  
81 84 $rootScope.userInfo = {
... ... @@ -87,43 +90,79 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
87 90  
88 91 $rootScope.AuthenticateUser = function (userInfo) {
89 92 $rootScope.isVisibleLogin = false;
90   - //if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) {
  93 + if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) {
91 94  
92   - // alert("Please enter correct information");
  95 + alert("Please enter correct information");
93 96  
94   - //}
95   - //else {
  97 + }
  98 + else {
96 99  
97   - // AuthenticationService.authenticateUser(userInfo)
98   - // .then(
99   -
100   - // function (result) {
101   - // if (result == LoginConstants.USER_NOT_FOUND) {
102   -
103   - // alert(result);
104   - // }
105   - // else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
106   - // alert(result);
107   - // }
108   - // else {
109   - // if (result.loginId != undefined || result.loginId != "" || result.loginId != null)
110   -
111   - // $rootScope.userData = result;
112   - // $rootScope.userModules = result.modules;
113   - // $rootScope.isVisibleLogin = false;
114   - // }
115   - // },
116   - // function (error) {
117   - // console.log(' Error in authentication = ' + error.statusText);
118   - // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS);
119   - // });
120   - //}
  100 + AuthenticationService.authenticateUser(userInfo)
  101 + .then(
  102 +
  103 + function (result) {
  104 + if (result == LoginConstants.USER_NOT_FOUND) {
  105 +
  106 + alert(result);
  107 + }
  108 + else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) {
  109 + alert(result);
  110 + }
  111 + else {
  112 + if (result.loginId != undefined || result.loginId != "" || result.loginId != null) {
  113 +
  114 + $rootScope.userData = result;
  115 + $rootScope.userModules = result.modules;
  116 + $rootScope.isVisibleLogin = false;
  117 +
  118 + localStorage.setItem('loggedInUserDetails', JSON.stringify(result));
  119 + }
  120 + }
  121 + },
  122 + function (error) {
  123 + console.log(' Error in authentication = ' + error.statusText);
  124 + alert(LoginConstants.ERROR_IN_FECTHING_DETAILS);
  125 + });
  126 + }
121 127  
122 128 }
123 129  
  130 + $rootScope.LogoutUser = function () {
  131 + localStorage.removeItem('loggedInUserDetails');
  132 + document.location = '/';
  133 + $rootScope.isVisibleLogin = true;
  134 + }
124 135  
125   - $rootScope.$on("$locationChangeSuccess", function () {
  136 + function getUserDetails() {
  137 + //Retain logged in user details
  138 + var currentUserDetails = localStorage.getItem('loggedInUserDetails');
  139 + if (currentUserDetails) {
  140 + try {
  141 + var userInfo = JSON.parse(storedUser);
  142 +
  143 + if (userInfo.loginId != undefined || userInfo.loginId != "" || userInfo.loginId != null) {
  144 + $rootScope.isVisibleLogin = false;
  145 + $rootScope.userData = userInfo;
  146 + $rootScope.userModules = userInfo.modules;
  147 + }
  148 + }
  149 + catch (e) {
  150 + localStorage.removeItem('loggedInUserDetails');
  151 + }
  152 + }
  153 + }
126 154  
  155 + $(document).ready(function () {
  156 + getUserDetails();
  157 + });
  158 +
  159 + $rootScope.$on("$locationChangeSuccess", function () {
  160 +
  161 + $rootScope.isLeftMenuActive = function (moduleUrl) {
  162 +
  163 + return moduleUrl === $location.path();
  164 + }
  165 +
127 166 if (($location.url() == "/da-body-view")) {
128 167 $rootScope.disableMenuannotation = " ";
129 168 $rootScope.disableMenuoption = " ";
... ... @@ -300,6 +339,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
300 339 $('.btnCursor').removeClass('activebtncolor');
301 340 $(".btn-annotation").removeClass("activebtncolor");
302 341 $rootScope.isAnnotaionToolBarDrawingModeActive = true;
  342 + $rootScope.switchCanvas();
303 343 }
304 344 $rootScope.CIAnotationIdentifyModeOff = false;
305 345 $rootScope.OnIdentifyClick = function () {
... ... @@ -2581,6 +2621,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2581 2621 }
2582 2622 };
2583 2623  
  2624 +
  2625 + $rootScope.changeNavigatorModesty = function () {
  2626 + var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId;
  2627 +
  2628 + $rootScope.$broadcast('changeNavigatorModestyEvent', { bodyViewId: currentOpenViewId }, true);
  2629 +
  2630 + };
  2631 +
2584 2632 $rootScope.ShowExportImageWindow = function () {
2585 2633 $(".export-image").css("display", "block");
2586 2634 };
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -280,31 +280,17 @@
280 280 <div class="">
281 281 <div class="input-group col-sm-8 col-xs-7 col-md-10 pull-left">
282 282  
283   - <input type="text" class="form-control input-sm pull-left" id="typedtermname" ng-blur="HideSearch()" onclick="OnSearch()" ondblclick="OnSearch()" ng-model="searchFilter" ng-change="textChange(searchFilter)" placeholder="Search...">
  283 + <input type="text" class="form-control input-sm pull-left" id="typedtermname" ng-blur="HideSearch()" onclick="OnSearch()" ondblclick="OnSearch()" ng-model="searchFilter" ng-change="resetSearchListView()" placeholder=" search...">
284 284  
285 285 <div id="backdrop" ng-show="IsSearchVisible">
286   - <div class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left">
287   - <!--#Bug 6591-->
288   - <ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:1000;">
289   - <li ng-repeat="item in VocabTermTxt| filter:{ _TermText: searchFilter}">
290   - <!--<a id="{{item._ActualTermNumber}}" href="" ng-click="jumpToTerm($event)">{{item._TermText}}</a>-->
291   - <a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>
292   - </li>
293   - </ul>
  286 + <div id="searchListDiv" class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left">
  287 +
294 288 </div>
295 289 </div>
296   - <!--</div>-->
297 290  
298 291 </div>
299 292 <div class="btn-group">
300   - <!--<button type="button" style="padding:0px 0px 10px 1px !important;background-color:rgba(255,255,255,0.0); border:none;" class="btn btn-success dropdown-toggle btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
301   - <img src="~/../content/images/DA/go-to.png" style="height: 30px;width:50px">
302   - </button>
303   - <ul class="dropdown-menu" style="width:100%;">
304   - <li><a href="#">{{currentTitleFromJson}}</a></li>
305   - <li role="separator" class="divider"></li>
306   - <li><a href="#">All</a></li>
307   - </ul>-->
  293 +
308 294 <button type="button" id="btnDATermSearch" style="padding:0px 0px 10px 1px !important;background-color:rgba(255,255,255,0.0); border:none;" class="btn btn-success btn-sm" ng-mousedown="OnSearchBtnClick($event)">
309 295 <img src="~/../content/images/DA/go-to.png" style="height: 30px;width:50px">
310 296 </button>
... ... @@ -316,7 +302,7 @@
316 302  
317 303 <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; ">
318 304 <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; ">
319   - <img id="navimg" alt=""></img>
  305 + <img id="navimg" alt=""/>
320 306 <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition">
321 307 </div>
322 308 </div>
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
  1 +
1 2 <div class="bodyWrap row container-fluid" >
2 3 <div class="col-sm-12 col-md-12 pageHeading">
3 4 <!--<button type="button" class="btn btn-success pull-left toggleBar btn-sm" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"> <i class="fa fa-bars"></i> </button>-->
... ... @@ -26,22 +27,22 @@
26 27 <!--{{name}}-->
27 28 <ul class="nav nav-sidebar" ng-init="hideScrollbar()">
28 29 <!--<li ng-repeat="module in userModules"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible()">{{module.name}}</a></li>-->
29   - <li><a href="da-view-list" ng-click="IsVisible()">Dissectible Anatomy</a></li>
30   - <li><a href="3d-anatomy-list" ng-click="IsVisible()">3D Anatomy</a></li>
31   - <li><a href="clinical-illustrations" ng-click="IsVisible()">Clinical Illustrations</a></li>
32   - <li><a href="clinical-animations" ng-click="IsVisible()">Clinical Animations</a></li>
33   - <li><a href="Link/encyclopedia" ng-click="IsVisible()">Encyclopedia</a></li>
34   - <li><a href="curriculum-builder" ng-click="IsVisible()">Curriculum Builder</a></li>
35   - <li><a href="anatomy-test" ng-click="IsVisible()">Anatomy Tests</a></li>
36   - <li><a href="Link/IP-10" ng-click="IsVisible()">IP 10</a></li>
37   - <li><a href="lab-exercises" ng-click="IsVisible()">Lab Exercises</a></li>
38   - <li><a href="Link/indepth-reports" ng-click="IsVisible()">In-Depth Reports</a></li>
39   - <li><a href="Link/complementary-and-alternate-medicine" ng-click="IsVisible()">Complementary and Alternative Medicine</a></li>
40   - <li><a href="ADAM-Images" ng-click="IsVisible()">A.D.A.M Images</a></li>
41   - <li><a href="Link/bodyguide" ng-click="IsVisible()">Body Guide</a></li>
42   - <li><a href="Link/symptom-navigator" ng-click="IsVisible()">Symptom Navigator</a></li>
43   - <li><a href="Link/wellness-tools" ng-click="IsVisible()">The Wellness Tools</a></li>
44   - <li><a href="ADAM-on-demand" ng-click="IsVisible()">A.D.A.M OnDemand</a></li>
  30 + <li><a href="da-view-list" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/da-view-list')}">Dissectible Anatomy</a></li>
  31 + <li ><a href="3d-anatomy-list" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/3d-anatomy-list')}">3D Anatomy</a></li>
  32 + <li ><a href="clinical-illustrations" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/clinical-illustrations')}">Clinical Illustrations</a></li>
  33 + <li ><a href="clinical-animations" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/clinical-animations')}">Clinical Animations</a></li>
  34 + <li><a href="Link/encyclopedia" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/encyclopedia')}">Encyclopedia</a></li>
  35 + <li><a href="curriculum-builder" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/curriculum-builder')}">Curriculum Builder</a></li>
  36 + <li><a href="anatomy-test" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/anatomy-test')}">Anatomy Tests</a></li>
  37 + <li><a href="Link/IP-10" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/IP-10')}">IP 10</a></li>
  38 + <li><a href="lab-exercises" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/lab-exercises')}">Lab Exercises</a></li>
  39 + <li><a href="Link/indepth-reports" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/indepth-reports')}">In-Depth Reports</a></li>
  40 + <li><a href="Link/complementary-and-alternate-medicine" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/complementary-and-alternate-medicine')}">Complementary and Alternative Medicine</a></li>
  41 + <li><a href="ADAM-Images" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/ADAM-Images')}">A.D.A.M Images</a></li>
  42 + <li><a href="Link/bodyguide" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/bodyguide')}">Body Guide</a></li>
  43 + <li><a href="Link/symptom-navigator" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/symptom-navigator')}">Symptom Navigator</a></li>
  44 + <li><a href="Link/wellness-tools" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/wellness-tools')}">The Wellness Tools</a></li>
  45 + <li><a href="ADAM-on-demand" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/ADAM-on-demand')}">A.D.A.M OnDemand</a></li>
45 46  
46 47 </ul>
47 48 </div>
... ... @@ -94,3 +95,4 @@
94 95 tooltipClass: 'customTooltip'
95 96 });
96 97 </script>
  98 +
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -52,9 +52,9 @@
52 52 <li><a href="#">Admin</a></li>
53 53 </ul>
54 54 <ul class="nav navbar-nav navbar-right">
55   - <li class="visible-xs"><a href="index.html">Logout</a></li>
56   - <li class="hidden-xs marginR5" data-toggle="tooltip" data-placement="top" title="Logout"><a href="index.html"><i class="fa fa-power-off"></i></a></li>
57   - </ul>
  55 + <li class="visible-xs"><a href="" ng-click="LogoutUser()">Logout</a></li>
  56 + <li class="hidden-xs marginR5" data-toggle="tooltip" data-placement="top" title="Logout"><a href="" ng-click="LogoutUser()"><i class="fa fa-power-off"></i></a></li>
  57 + </ul>
58 58 <div id="imaginary_container">
59 59 <div class="input-group stylish-input-group paddTop5 hidden-sm">
60 60 <input type="text" class="form-control width120" placeholder="Search">
... ...
400-SOURCECODE/AIAHTML5.Web/content/data/json/settings/fontstyle.json
... ... @@ -150,8 +150,6 @@
150 150 },{
151 151 "FontName": "Sylfaen"
152 152 },{
153   -"FontName": "Symbol"
154   -},{
155 153 "FontName": "Tahoma"
156 154 },{
157 155 "FontName": "Tw Cen MT"
... ... @@ -162,8 +160,6 @@
162 160 },{
163 161 "FontName": "Wide Latin"
164 162 },{
165   -"FontName": "Wingdings"
166   -},{
167 163 "FontName": "Yu Gothic"
168 164 }]
169 165 }
... ...