Commit ddd4a39b52bfe2ffc4d290ba36a3c09b6226852d

Authored by Amrita Vishnoi
2 parents 85ca8f42 2ca436a7

Merge branch 'ButtonSearchDANew' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -7404,9 +7404,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7404 7404 document.getElementById("termlistfilter").style.display = "block";
7405 7405 }
7406 7406 else {
7407   - $scope.IsSearchVisible = false;
7408   - document.getElementById("termlistfilter").style.display = "none";
7409   - $scope.searchFilter = "";
  7407 + //1. persist term in DAsearch but hide ul/li
  7408 + if ($("#btnDATermSearch").is(":hover")) {
  7409 + $scope.IsSearchVisible = false;
  7410 + }
  7411 + else {
  7412 + //2.hide ul/li and clear DA search
  7413 + $scope.IsSearchVisible = false;
  7414 + document.getElementById("termlistfilter").style.display = "none";
  7415 + $scope.searchFilter = "";
  7416 + }
7410 7417 }
7411 7418  
7412 7419 }
... ... @@ -8112,6 +8119,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8112 8119  
8113 8120 }
8114 8121  
  8122 + $scope.OnSearchBtnClick = function (e) {
  8123 +
  8124 + if (typeof ($scope.searchFilter) !== "undefined" && ($scope.searchFilter !== null && $scope.searchFilter !== "")) {
  8125 + var EnteredDASearchTerm = [];
  8126 + EnteredDASearchTerm = new jinqJs()
  8127 + .from($scope.VocabTermTxt)
  8128 + .where('_TermText == ' + $scope.searchFilter)
  8129 + .select('_ActualTermNumber', '_TermText', '_cdId');
  8130 +
  8131 + if (EnteredDASearchTerm.length > 0) {
  8132 + $scope.HighlightBodyOnListManagerSelection(EnteredDASearchTerm[0]._ActualTermNumber);
  8133 +
  8134 + $scope.IsSearchVisible = false;
  8135 + $rootScope.isNormalMode = false;
  8136 +
  8137 + //Highlight only Highlight button
  8138 +
  8139 + $("#btnHighLight").addClass("btn-primary");
  8140 + $("#btnHighLight").removeClass("btn-black");
  8141 +
  8142 + if (!$("#btnNormalMode").hasClass("btn-black")) {
  8143 + $("#btnNormalMode").addClass("btn-black");
  8144 + }
  8145 +
  8146 + if (!$("#btnExtract").hasClass("btn-black")) {
  8147 + $("#btnExtract").addClass("btn-black");
  8148 + }
  8149 +
  8150 + if ($("#btnExtract").hasClass("btn-primary")) {
  8151 + $("#btnExtract").removeClass("btn-primary");
  8152 + }
  8153 +
  8154 + if ($("#btnNormalMode").hasClass("btn-primary")) {
  8155 + $("#btnNormalMode").removeClass("btn-primary");
  8156 + }
  8157 +
  8158 + $('#typedtermname').val($scope.searchFilter);
  8159 +
  8160 + }
  8161 + else {
  8162 + // clear the text
  8163 + $scope.ShowSearch();
  8164 + }
  8165 +
  8166 + }
  8167 + else {
  8168 + $scope.ShowSearch();
  8169 + }
  8170 + }
8115 8171  
8116 8172  
8117 8173 }]
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -297,14 +297,17 @@
297 297  
298 298 </div>
299 299 <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">
  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 301 <img src="~/../content/images/DA/go-to.png" style="height: 30px;width:50px">
302 302 </button>
303 303 <ul class="dropdown-menu" style="width:100%;">
304 304 <li><a href="#">{{currentTitleFromJson}}</a></li>
305 305 <li role="separator" class="divider"></li>
306 306 <li><a href="#">All</a></li>
307   - </ul>
  307 + </ul>-->
  308 + <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 + <img src="~/../content/images/DA/go-to.png" style="height: 30px;width:50px">
  310 + </button>
308 311 </div>
309 312 <div class="btn-group open" id="da-body-nav">
310 313 <button type="button" style="padding:0px 0px 10px 1px !important;background-color:rgba(255,255,255,0.0); border:none;" class="btn btn-primary dropdown-toggle btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
... ...