diff options
| author | Misko Hevery | 2010-03-30 15:39:51 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-03-30 15:39:51 -0700 |
| commit | b5b8f63e1ebc75d09c6faf8dbad6497880deed47 (patch) | |
| tree | 4a45ae5596a7d12d0ff532b1c105ae1cb07ec376 /src/Angular.js | |
| parent | a7d62dcb5533ceb9a7ae47ee27e2054400a0196b (diff) | |
| download | angular.js-b5b8f63e1ebc75d09c6faf8dbad6497880deed47.tar.bz2 | |
more tests passing
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Angular.js b/src/Angular.js index 4443890a..27f463ac 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -5,6 +5,8 @@ if (!window['console']) window['console']={'log':noop, 'error':noop}; var consoleNode, NOOP = 'noop', + NG_ERROR = 'ng-error', + NG_VALIDATION_ERROR = 'ng-validation-error', jQuery = window['jQuery'] || window['$'], // weirdness to make IE happy _ = window['_'], jqLite = jQuery || jqLiteWrap, @@ -226,12 +228,12 @@ function escapeHtml(html) { replace(/>/g, '>'); } -function elementDecorateError(element, error) { +function elementError(element, type, error) { if (error) { - element.addClass(NG_VALIDATION_ERROR); + element.addClass(type); element.attr(NG_ERROR, error); } else { - element.removeClass(NG_VALIDATION_ERROR); + element.removeClass(type); element.removeAttr(NG_ERROR); } } |
