Skip to content

Commit d377238

Browse files
обновил фронт
1 parent fe8b8de commit d377238

File tree

4 files changed

+62
-47
lines changed

4 files changed

+62
-47
lines changed

CSP/csp/docsearch/js/app/app-controller.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ searchApp
99
phrase: '',
1010
anyWords:'',
1111
without:'',
12-
fuzzy: 'false',
13-
rank: 'false',
12+
fuzzy: false,
13+
rank: false,
1414
startRecord:'1',
1515
recordCount: '10'
1616
};
@@ -34,29 +34,29 @@ searchApp
3434
$scope.withoutShow = false;
3535
$scope.errorToggle = false;
3636

37-
$scope.phraseClear=function(){
37+
$scope.phraseClear = function() {
3838
$scope.search.phrase = "";
3939
$scope.makeSearch();
4040
}
4141

42-
$scope.anyWordsClear=function(){
42+
$scope.anyWordsClear = function() {
4343
$scope.search.anyWords = "";
4444
$scope.makeSearch();
4545
}
4646

47-
$scope.withoutClear=function(){
47+
$scope.withoutClear = function() {
4848
$scope.search.without = "";
4949
$scope.makeSearch();
5050
}
5151

52-
$scope.clearAll=function(){
52+
$scope.clearAll = function() {
5353
$scope.search.words = "";
5454
$scope.search.phrase = "";
5555
$scope.search.anyWords = "";
5656
$scope.search.without = "";
5757
}
5858

59-
$scope.change = function (){
59+
$scope.change = function () {
6060

6161
if ($scope.search.words != "")
6262
{
@@ -105,13 +105,13 @@ searchApp
105105
$scope.inputToggle = false;
106106
}
107107

108-
$scope.makeSearch = function (){
108+
$scope.makeSearch = function () {
109109
$scope.inputToggle = false;
110110
$scope.errorToggle = false;
111111

112-
$scope.search.phrase=='' ? $scope.phraseShow=false : $scope.phraseShow=true;
113-
$scope.search.anyWords=='' ? $scope.anyWordsShow=false : $scope.anyWordsShow=true;
114-
$scope.search.without=='' ? $scope.withoutShow=false : $scope.withoutShow=true;
112+
$scope.search.phrase == '' ? $scope.phraseShow = false : $scope.phraseShow = true;
113+
$scope.search.anyWords == '' ? $scope.anyWordsShow = false : $scope.anyWordsShow = true;
114+
$scope.search.without == '' ? $scope.withoutShow = false : $scope.withoutShow = true;
115115

116116
$scope.title = $scope.search.words;
117117

@@ -123,7 +123,7 @@ searchApp
123123
}
124124
else
125125
if ( $scope.search.without != '')
126-
$scope.errorToggle=true;
126+
$scope.errorToggle = true;
127127
else
128128
if ( $scope.search.without == '')
129129
$location.path("/DocSearch");

CSP/csp/docsearch/js/app/templates/DocResults.html

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<div class="row MarginAdvancedMenu"> <!-- Advanced search tags -->
5050

5151
<div class="col-sm-4">
52-
<div class="input-group" ng-show = "phraseShow">
52+
<div class="input-group check" ng-show = "phraseShow">
5353
<span class="input-group-addon">exact:</span>
5454
<input type="text" ng-model = "search.phrase" class="form-control">
5555
<span class="input-group-btn">
@@ -61,7 +61,7 @@
6161
</div>
6262

6363
<div class="col-sm-4">
64-
<div class="input-group" ng-show = "anyWordsShow">
64+
<div class="input-group check" ng-show = "anyWordsShow">
6565
<span class="input-group-addon">any:</span>
6666
<input type="text" ng-model = "search.anyWords" class="form-control">
6767
<span class="input-group-btn">
@@ -73,7 +73,7 @@
7373
</div>
7474

7575
<div class="col-sm-4">
76-
<div class="input-group" ng-show = "withoutShow">
76+
<div class="input-group check" ng-show = "withoutShow" >
7777
<span class="input-group-addon">none:</span>
7878
<input type="text" ng-model="search.without" class="form-control">
7979
<span class="input-group-btn">
@@ -84,19 +84,27 @@
8484
</div>
8585
</div>
8686

87-
<div class="col-sm-4">
88-
<div ng-show = "search.fuzzy">
89-
<span>fuzzy search: </span>
90-
<input type="checkbox" ng-model="search.fuzzy" ng-click="makeSearch()">
91-
</div>
92-
</div>
93-
94-
<div class="col-sm-4">
95-
<div ng-show = "search.rank">
96-
<span>use TFIDF Rank algorithm: </span>
97-
<input type="checkbox" ng-model="search.rank" ng-click="makeSearch()">
98-
</div>
99-
</div>
87+
<div class="form-group checkbox">
88+
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label check" ng-show = "search.fuzzy">
89+
<b>fuzzy search:</b>
90+
</label>
91+
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label check" ng-show = "search.fuzzy">
92+
<input id="check" type="checkbox" ng-model="search.fuzzy" ng-click="makeSearch()">
93+
<span class="cr">
94+
<i class="cr-icon fa fa-check" title = "Tick this box if you are not sure about word spelling"></i>
95+
</span>
96+
</label>
97+
98+
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label check" ng-show = "search.rank">
99+
<b>use TFIDF Rank algorithm:</b>
100+
</label>
101+
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label check" ng-show = "search.rank">
102+
<input id="check" type="checkbox" ng-model="search.rank" ng-click="makeSearch()">
103+
<span class="cr">
104+
<i class="cr-icon fa fa-check" title = "Tick this box if you want to use TFIDF Rank algorithm"></i>
105+
</span>
106+
</label>
107+
</div>
100108

101109
</div>
102110
<div ng-show = "resultToggle"> <!-- Search results -->

CSP/csp/docsearch/js/app/templates/SearchAdvance.html

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,27 @@
3333
<input type="text" ng-model="search.without" class="form-control" id="Search4" placeholder="Use comma between all the words you want"/>
3434
</div>
3535
</div>
36+
3637
<div class="form-group checkbox">
37-
<label style="font-size: 11pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
38-
<b>fuzzy search:</b>
39-
</label>
40-
<label style="font-size: 16pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
41-
<input id="check" type="checkbox" ng-model="search.fuzzy">
42-
<span class="cr">
43-
<i class="cr-icon fa fa-check" title = "Tick this box if you are not sure about word spelling"></i>
44-
</span>
45-
</label>
46-
<label style="font-size: 11pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
47-
<b>use TFIDF Rank algorithm:</b>
48-
</label>
49-
<label style="font-size: 16pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
50-
<input id="check" type="checkbox" ng-model="search.rank">
51-
<span class="cr">
52-
<i class="cr-icon fa fa-check" title = "Tick this box if you are not sure about word spelling"></i>
53-
</span>
54-
</label>
38+
<label style="font-size: 11pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
39+
<b>fuzzy search:</b>
40+
</label>
41+
<label style="font-size: 16pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
42+
<input id="check" type="checkbox" ng-model="search.fuzzy">
43+
<span class="cr">
44+
<i class="cr-icon fa fa-check" title = "Tick this box if you are not sure about word spelling"></i>
45+
</span>
46+
</label>
47+
48+
<label style="font-size: 11pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
49+
<b>use TFIDF Rank algorithm:</b>
50+
</label>
51+
<label style="font-size: 16pt" class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label">
52+
<input id="check" type="checkbox" ng-model="search.rank">
53+
<span class="cr">
54+
<i class="cr-icon fa fa-check" title = "Tick this box if you want to use TFIDF Rank algorithm"></i>
55+
</span>
56+
</label>
5557
</div>
5658
<div class="col-md-offset-6 col-md-4 col-sm-offset-4 col-sm-4 col-xs-offset-4 col-xs-6 text-right">
5759
<button type="submit" class="btn btn-primary" ng-click = "makeSearch()">

CSP/csp/docsearch/style/DocSearch.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44
.MarginHeader
55
{margin-top:3%;}
6-
6+
7+
.check
8+
{
9+
font-size: 11pt;
10+
padding: 0px 0px 15px;
11+
}
712

813
.footer
914
{

0 commit comments

Comments
 (0)