Skip to content

Commit 3217a24

Browse files
committed
style(input): fix style violations in the input.js file
1 parent 78f394f commit 3217a24

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/widget/input.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/;
66
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/;
77
var INTEGER_REGEXP = /^\s*(\-|\+)?\d+\s*$/;
88

9+
910
/**
1011
* @ngdoc inputType
1112
* @name angular.inputType.text
@@ -143,6 +144,7 @@ angularInputType('email', function() {
143144
});
144145
});
145146

147+
146148
/**
147149
* @ngdoc inputType
148150
* @name angular.inputType.url
@@ -216,6 +218,7 @@ angularInputType('url', function() {
216218
});
217219
});
218220

221+
219222
/**
220223
* @ngdoc inputType
221224
* @name angular.inputType.list
@@ -287,6 +290,7 @@ angularInputType('list', function() {
287290
};
288291
});
289292

293+
290294
/**
291295
* @ngdoc inputType
292296
* @name angular.inputType.number
@@ -356,6 +360,7 @@ angularInputType('list', function() {
356360
*/
357361
angularInputType('number', numericRegexpInputType(NUMBER_REGEXP, 'NUMBER'));
358362

363+
359364
/**
360365
* @ngdoc inputType
361366
* @name angular.inputType.integer
@@ -425,6 +430,7 @@ angularInputType('number', numericRegexpInputType(NUMBER_REGEXP, 'NUMBER'));
425430
*/
426431
angularInputType('integer', numericRegexpInputType(INTEGER_REGEXP, 'INTEGER'));
427432

433+
428434
/**
429435
* @ngdoc inputType
430436
* @name angular.inputType.checkbox
@@ -496,9 +502,9 @@ angularInputType('checkbox', function(inputElement) {
496502
widget.$parseView = function() {
497503
widget.$modelValue = widget.$viewValue ? trueValue : falseValue;
498504
};
499-
500505
});
501506

507+
502508
/**
503509
* @ngdoc inputType
504510
* @name angular.inputType.radio
@@ -765,15 +771,13 @@ angularWidget('input', function(inputElement){
765771
controller: TypeController,
766772
controllerArgs: [inputElement]});
767773

768-
widget.$pattern =
769774
watchElementProperty(this, widget, 'required', inputElement);
770775
watchElementProperty(this, widget, 'readonly', inputElement);
771776
watchElementProperty(this, widget, 'disabled', inputElement);
772777

773-
774778
widget.$pristine = !(widget.$dirty = false);
775779

776-
widget.$on('$validate', function(event) {
780+
widget.$on('$validate', function() {
777781
var $viewValue = trim(widget.$viewValue),
778782
inValid = widget.$required && !$viewValue,
779783
tooLong = maxlength && $viewValue && $viewValue.length > maxlength,
@@ -796,9 +800,8 @@ angularWidget('input', function(inputElement){
796800

797801
forEach(['valid', 'invalid', 'pristine', 'dirty'], function(name) {
798802
widget.$watch('$' + name, function(scope, value) {
799-
inputElement[value ? 'addClass' : 'removeClass']('ng-' + name);
800-
}
801-
);
803+
inputElement[value ? 'addClass' : 'removeClass']('ng-' + name);
804+
});
802805
});
803806

804807
inputElement.bind('$destroy', function() {
@@ -849,4 +852,3 @@ function watchElementProperty(modelScope, widget, name, element) {
849852
});
850853
}
851854
}
852-

0 commit comments

Comments
 (0)