diff options
| author | Igor Minar | 2011-10-19 16:42:32 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-10-19 16:49:34 -0700 |
| commit | 3217a249e18c12fb1ade59073773e2ab67a67792 (patch) | |
| tree | 8d66811b4944e89b7934b463e8d5c07eece6a267 /src/widget | |
| parent | 78f394fd17be581c84ecd526bb786ed1681d35cb (diff) | |
| download | angular.js-3217a249e18c12fb1ade59073773e2ab67a67792.tar.bz2 | |
style(input): fix style violations in the input.js file
Diffstat (limited to 'src/widget')
| -rw-r--r-- | src/widget/input.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/widget/input.js b/src/widget/input.js index e9c7208e..627aee27 100644 --- a/src/widget/input.js +++ b/src/widget/input.js @@ -6,6 +6,7 @@ var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/; var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/; var INTEGER_REGEXP = /^\s*(\-|\+)?\d+\s*$/; + /** * @ngdoc inputType * @name angular.inputType.text @@ -143,6 +144,7 @@ angularInputType('email', function() { }); }); + /** * @ngdoc inputType * @name angular.inputType.url @@ -216,6 +218,7 @@ angularInputType('url', function() { }); }); + /** * @ngdoc inputType * @name angular.inputType.list @@ -287,6 +290,7 @@ angularInputType('list', function() { }; }); + /** * @ngdoc inputType * @name angular.inputType.number @@ -356,6 +360,7 @@ angularInputType('list', function() { */ angularInputType('number', numericRegexpInputType(NUMBER_REGEXP, 'NUMBER')); + /** * @ngdoc inputType * @name angular.inputType.integer @@ -425,6 +430,7 @@ angularInputType('number', numericRegexpInputType(NUMBER_REGEXP, 'NUMBER')); */ angularInputType('integer', numericRegexpInputType(INTEGER_REGEXP, 'INTEGER')); + /** * @ngdoc inputType * @name angular.inputType.checkbox @@ -496,9 +502,9 @@ angularInputType('checkbox', function(inputElement) { widget.$parseView = function() { widget.$modelValue = widget.$viewValue ? trueValue : falseValue; }; - }); + /** * @ngdoc inputType * @name angular.inputType.radio @@ -765,15 +771,13 @@ angularWidget('input', function(inputElement){ controller: TypeController, controllerArgs: [inputElement]}); - widget.$pattern = watchElementProperty(this, widget, 'required', inputElement); watchElementProperty(this, widget, 'readonly', inputElement); watchElementProperty(this, widget, 'disabled', inputElement); - widget.$pristine = !(widget.$dirty = false); - widget.$on('$validate', function(event) { + widget.$on('$validate', function() { var $viewValue = trim(widget.$viewValue), inValid = widget.$required && !$viewValue, tooLong = maxlength && $viewValue && $viewValue.length > maxlength, @@ -796,9 +800,8 @@ angularWidget('input', function(inputElement){ forEach(['valid', 'invalid', 'pristine', 'dirty'], function(name) { widget.$watch('$' + name, function(scope, value) { - inputElement[value ? 'addClass' : 'removeClass']('ng-' + name); - } - ); + inputElement[value ? 'addClass' : 'removeClass']('ng-' + name); + }); }); inputElement.bind('$destroy', function() { @@ -849,4 +852,3 @@ function watchElementProperty(modelScope, widget, name, element) { }); } } - |
