Commit 15261bfe1002d4d01d2ecc544d0b4935a75554f3
1 parent
e180d3c0
change search icon to text.
made search drop height more need to add functionality where terms should be filteed based on first characters
Showing
3 changed files
with
20 additions
and
6 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1 | 1 | |
2 | 2 | 'use strict'; |
3 | 3 | |
4 | -AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "TermService", "AIAConstants", | |
5 | - function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService, TermService, AIAConstants) { | |
4 | +AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "TermService", "AIAConstants","startsWithLetter", | |
5 | + function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService, TermService, AIAConstants, startsWithLetter) { | |
6 | 6 | |
7 | 7 | |
8 | 8 | $scope.genderId = ""; |
... | ... | @@ -11,7 +11,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11 | 11 | $scope.imagePath = ""; |
12 | 12 | $rootScope.BodyRegionData; |
13 | 13 | $rootScope.BodyRegionCordinatesData; |
14 | - $rootScope.isTransparencyActivated = false; | |
14 | + $rootScope.isTransparencyActiva | |
15 | + ted = false; | |
15 | 16 | $scope.isTransparencyBtnClicked = false; |
16 | 17 | $rootScope.BodyLayerData; |
17 | 18 | $rootScope.VocabTermData; |
... | ... | @@ -8950,7 +8951,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8950 | 8951 | |
8951 | 8952 | |
8952 | 8953 | $rootScope.a = primaryLexiconIndx; |
8953 | - var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}">' + | |
8954 | + var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:130px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}">' + | |
8954 | 8955 | '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' + |
8955 | 8956 | ' </li></ul>').appendTo('#searchListDiv') |
8956 | 8957 | $compile($e2)($scope); |
... | ... | @@ -9810,7 +9811,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9810 | 9811 | $('#searchListDiv').empty(); |
9811 | 9812 | } |
9812 | 9813 | $rootScope.a = $scope.primaryLexiconInd; |
9813 | - var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu ng-scope" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:block;z-index:60001;"><li class="ng-scope" ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}| limitTo : 10">' + | |
9814 | + var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu ng-scope" style="height:132px;width:100%;overflow-y:scroll;position:absolute;display:block;z-index:60001;"><li class="ng-scope" ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| startsWithLetter:{ _TermText: searchFilter}| limitTo : 10">' + | |
9814 | 9815 | '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' + |
9815 | 9816 | ' </li></ul>').appendTo('#searchListDiv') |
9816 | 9817 | $compile($e2)($scope); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/filters/AIAFilter.js
0 → 100644
1 | +app.filter('startsWithLetter', function () { | |
2 | + return function (items, letter) { | |
3 | + var filtered = []; | |
4 | + var letterMatch = new RegExp(letter, 'i'); | |
5 | + for (var i = 0; i < items.length; i++) { | |
6 | + var item = items[i]; | |
7 | + if (letterMatch.test(item.name.substring(0, 1))) { | |
8 | + filtered.push(item); | |
9 | + } | |
10 | + } | |
11 | + return filtered; | |
12 | + }; | |
13 | +}); | |
0 | 14 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.aspx
... | ... | @@ -1433,7 +1433,7 @@ |
1433 | 1433 | <script src="app/controllers/TileViewListController.js"></script> |
1434 | 1434 | |
1435 | 1435 | <script src="app/services/ModuleService.js"></script> |
1436 | - | |
1436 | + <script src="../app/filters/AIAFilter.js"></script> | |
1437 | 1437 | <script src="app/services/DataService.js"></script> |
1438 | 1438 | <script src="app/services/TermService.js"></script> |
1439 | 1439 | <script src="libs/jquery/jquery_plugin/jqueryui.js"></script> | ... | ... |