@@ -38,11 +38,14 @@ searchApp
3838 $scope . link = "http://" + location . host + "/csp/docbook/DocBook.UI.Page.cls?KEY=" ;
3939
4040 $scope . SwitchClick = function ( ) {
41- if ( $scope . frankenshtein == true ) {
41+ if ( $scope . frankenshtein == true )
4242 $scope . frankenshtein = false ;
43+ else
44+ $scope . frankenshtein = true ;
4345 }
44- else {
45- $scope . frankenshtein = true ; }
46+ $scope . SwitchClickV2 = function ( ) {
47+ $scope . SwitchClick ( ) ;
48+ $scope . makeSearch ( ) ;
4649 }
4750
4851 angular . element ( document ) . ready ( function ( ) {
@@ -55,22 +58,22 @@ searchApp
5558 }
5659 } ) ;
5760
58- $scope . phraseClear = function ( ) {
61+ $scope . phraseClear = function ( ) {
5962 $scope . search . phrase = "" ;
6063 $scope . makeSearch ( ) ;
6164 }
6265
63- $scope . anyWordsClear = function ( ) {
66+ $scope . anyWordsClear = function ( ) {
6467 $scope . search . anyWords = "" ;
6568 $scope . makeSearch ( ) ;
6669 }
6770
68- $scope . withoutClear = function ( ) {
71+ $scope . withoutClear = function ( ) {
6972 $scope . search . without = "" ;
7073 $scope . makeSearch ( ) ;
7174 }
7275
73- $scope . clearAll = function ( ) {
76+ $scope . clearAll = function ( ) {
7477 $scope . search . words = "" ;
7578 $scope . search . phrase = "" ;
7679 $scope . search . anyWords = "" ;
@@ -83,13 +86,13 @@ searchApp
8386 $http . get ( baseUrl + 'GetSimilar/' + $scope . search . words )
8487 . then ( function ( response ) {
8588 $scope . searchItems = response . data . entities ;
89+
8690 if ( angular . isDefined ( $scope . searchItems ) )
87- if ( $scope . searchItems . length != 0 ) {
91+ if ( $scope . searchItems . length != 0 )
8892 if ( ( $scope . searchItems [ 0 ] . value == " " ) || ( $scope . search . words == "" ) )
89- $scope . inputToggle = false ;
93+ $scope . inputToggle = false ;
9094 else
91- $scope . inputToggle = true ;
92- }
95+ $scope . inputToggle = true ;
9396 } ) ;
9497 $scope . inputToggle = false ;
9598 }
0 commit comments