@@ -108,7 +108,7 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
108
108
return fields ;
109
109
} , authmethod . getLoginFields = function ( viewEventData ) {
110
110
var fields = authmethod . getRegisterFields ( viewEventData ) ;
111
- ( "sms" === viewEventData . auth_method || "email" === viewEventData . auth_method ) && fields . push ( {
111
+ "sms" !== viewEventData . auth_method && "email" !== viewEventData . auth_method || fields . push ( {
112
112
name : "code" ,
113
113
type : "code" ,
114
114
required : ! 0 ,
@@ -175,7 +175,7 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
175
175
attrs . code && attrs . code . length > 0 && ( scope . code = attrs . code ) , scope . email = null ,
176
176
attrs . email && attrs . email . length > 0 && ( scope . email = attrs . email ) , scope . isAdmin = ! 1 ,
177
177
autheventid === adminId && ( scope . isAdmin = ! 0 ) , scope . resendAuthCode = function ( field ) {
178
- if ( ! scope . sendingData && "sms" === scope . method && - 1 !== scope . telIndex && ! scope . form [ "input" + scope . telIndex ] . $invalid ) {
178
+ if ( ! scope . sendingData && "sms" === scope . method && scope . telIndex !== - 1 && ! scope . form [ "input" + scope . telIndex ] . $invalid ) {
179
179
field . value = "" ;
180
180
var data = { } ;
181
181
data . tlf = scope . telField . value , scope . sendingData = ! 0 , Authmethod . resendAuthCode ( data , autheventid ) . success ( function ( rcvData ) {
@@ -217,7 +217,7 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
217
217
return scope . stateData [ el . name ] ? ( el . value = scope . stateData [ el . name ] , el . disabled = ! 0 ) : ( el . value = null ,
218
218
el . disabled = ! 1 ) , "email" === el . type && null !== scope . email ? ( el . value = scope . email ,
219
219
el . disabled = ! 0 ) : "code" === el . type && null !== scope . code ? ( el . value = scope . code . trim ( ) . toUpperCase ( ) ,
220
- el . disabled = ! 0 ) : "tlf" === el . type && "sms" === scope . method && ( null !== scope . email && - 1 === scope . email . indexOf ( "@" ) && ( el . value = scope . email ,
220
+ el . disabled = ! 0 ) : "tlf" === el . type && "sms" === scope . method && ( null !== scope . email && scope . email . indexOf ( "@" ) === - 1 && ( el . value = scope . email ,
221
221
el . disabled = ! 0 ) , scope . telIndex = index + 1 , scope . telField = el ) , el ;
222
222
} ) , filled_fields = _ . filter ( fields , function ( el ) {
223
223
return null !== el . value ;
@@ -648,7 +648,7 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
648
648
}
649
649
var checkCollapse = function ( instance , el , options ) {
650
650
var maxHeight = select ( instance , el , instance . maxHeightSelector ) . css ( "max-height" ) , height = angular . element ( el ) [ 0 ] . scrollHeight ;
651
- if ( - 1 === maxHeight . indexOf ( "px" ) ) return void console . log ( "invalid non-pixels max-height for " + instance . maxHeightSelector ) ;
651
+ if ( maxHeight . indexOf ( "px" ) === - 1 ) return void console . log ( "invalid non-pixels max-height for " + instance . maxHeightSelector ) ;
652
652
if ( maxHeight = parseInt ( maxHeight . replace ( "px" , "" ) ) , height > maxHeight ) {
653
653
if ( instance . isCollapsed ) return ;
654
654
instance . isCollapsed = ! 0 , collapseEl ( instance , el ) . addClass ( "collapsed" ) , select ( instance , el , instance . toggleSelector ) . removeClass ( "hidden in" ) ;
@@ -741,7 +741,7 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
741
741
}
742
742
if ( void 0 === format && ( format = "str" ) , 0 === total_votes ) return print ( 0 ) ;
743
743
var base = question . totals . valid_votes + question . totals . null_votes + question . totals . blank_votes ;
744
- return ( void 0 === over || null === over ) && ( over = question . answer_total_votes_percentage ) ,
744
+ return void 0 !== over && null !== over || ( over = question . answer_total_votes_percentage ) ,
745
745
"over-valid-votes" === over && ( base = question . totals . valid_votes ) , print ( 100 * total_votes / base ) ;
746
746
} ;
747
747
} ) , angular . module ( "avUi" ) . service ( "CheckerService" , function ( ) {
@@ -841,7 +841,7 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
841
841
prefix : sumStrs ( d . prefix , item . prefix )
842
842
} ) ;
843
843
} ) , ! 0 ) ) ;
844
- return pass || "chain" !== d . data . groupType ? ! 0 : ! 1 ;
844
+ return ! ( ! pass && "chain" === d . data . groupType ) ;
845
845
} ) ;
846
846
return ret ;
847
847
}
@@ -850,8 +850,8 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
850
850
return function ( number , fixedDigits ) {
851
851
angular . isNumber ( fixedDigits ) && fixedDigits >= 0 && ( number = number . toFixed ( parseInt ( fixedDigits ) ) ) ;
852
852
var number_str = ( number + "" ) . replace ( "." , "," ) , ret = "" , commaPos = number_str . length ;
853
- - 1 !== number_str . indexOf ( "," ) && ( commaPos = number_str . indexOf ( "," ) ) ;
854
- for ( var i = 0 ; commaPos > i ; i ++ ) {
853
+ number_str . indexOf ( "," ) !== - 1 && ( commaPos = number_str . indexOf ( "," ) ) ;
854
+ for ( var i = 0 ; i < commaPos ; i ++ ) {
855
855
var reverse = commaPos - i ;
856
856
reverse % 3 === 0 && reverse > 0 && i > 0 && ( ret += "." ) , ret += number_str [ i ] ;
857
857
}
@@ -861,7 +861,7 @@ angular.module("avRegistration").factory("Authmethod", [ "$http", "$cookies", "C
861
861
return function ( originString , searchString ) {
862
862
if ( ! angular . isString ( originString ) || ! angular . isString ( searchString ) ) return ! 1 ;
863
863
var lastIndex = originString . indexOf ( searchString ) ;
864
- return - 1 !== lastIndex && lastIndex === originString . length - searchString . length ;
864
+ return lastIndex !== - 1 && lastIndex === originString . length - searchString . length ;
865
865
} ;
866
866
} ) , angular . module ( "avUi" ) . service ( "StateDataService" , [ "$state" , function ( $state ) {
867
867
var data = { } ;
0 commit comments