aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--angular-minified.js2
-rw-r--r--angular.js2
-rw-r--r--src/Widgets.js2
-rw-r--r--test/WidgetsTest.js2
4 files changed, 4 insertions, 4 deletions
diff --git a/angular-minified.js b/angular-minified.js
index 95f336e4..6aa99b54 100644
--- a/angular-minified.js
+++ b/angular-minified.js
@@ -90,7 +90,7 @@ return"URL needs to be in http://server[:port]/path format."},json:function(a){t
a+'" /><a></a><span/></span>')};B(U.prototype,{cancel:n,complete:n,httpStatus:function(a){alert("httpStatus:"+this.J+" status:"+a)},ioError:function(){alert("ioError:"+this.J)},open:function(){alert("open:"+this.J)},progress:n,securityError:function(){alert("securityError:"+this.J)},uploadCompleteData:function(a){a=L(a);a.url=this.xa+"/"+a.id+"/"+a.text;this.view.find("input").attr("checked",true);var b=this.view.scope();this.value=a;this.e(b);this.value=null},select:function(a,b){this.name=a;this.view.find("a").text(a).attr("href",
a);this.view.find("span").text(m.filter.bytes(b));this.upload()},e:function(a){var b=this.view.find("input").attr("checked")?this.value:null;if(this.c===b)return false;else{a.i(this.J,b);return true}},d:function(a){if((a=a.get(this.J))&&this.value!==a){this.value=a;this.view.find("a").attr("href",this.value.url).text(this.value.text);this.view.find("span").text(m.filter.bytes(this.value.size))}this.view.find("input").attr("checked",!!a)},upload:function(){this.name&&this.rc.uploadFile(this.xa)}});
R.prototype={e:P(true),d:n};R.Kb=new R;var Ra=R;ra.prototype={e:function(a){var b=this.A.parse(this.view.value);if(this.c===b)return false;else{a.o(this.exp,b);this.c=b;return true}},d:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.w;a.o(this.exp,c)}c=c?c:"";if(!_(this.c).isEqual(c)){b.value=this.A.format(c);this.c=c}var d=false;b.removeAttribute("ng-error");if(this.lc)d=!(c&&$.trim(""+c).length>0);var e=d?"Required Value":null;if(!d&&this.Q&&c){e=a.uc(this.Q,c);d=
-!!e}if(this.Ea!==e){this.Ea=d;if(e!==null&&Ha(b)){b.setAttribute("ng-error",e);a.Sb(this)}k(b).toggleClass("ng-validation-error",d)}}};sa.prototype={e:function(a){var b=this.view;b=b.checked?b.value:"";b=this.A.parse(b);b=this.A.format(b);if(this.c===b)return false;else{a.o(this.exp,this.A.parse(b));this.c=b;return true}},d:function(a){var b=this.view,c=a.eval(this.exp);if(typeof c==="undefined"){c=this.w;a.o(this.exp,c)}b.checked=this.A.parse(b.value)==c}};ta.prototype={e:function(a){if(this.view.selectedIndex<
+!!e}if(this.Ea!==e){this.Ea=d;if(e&&Ha(b)){b.setAttribute("ng-error",e);a.Sb(this)}k(b).toggleClass("ng-validation-error",d)}}};sa.prototype={e:function(a){var b=this.view;b=b.checked?b.value:"";b=this.A.parse(b);b=this.A.format(b);if(this.c===b)return false;else{a.o(this.exp,this.A.parse(b));this.c=b;return true}},d:function(a){var b=this.view,c=a.eval(this.exp);if(typeof c==="undefined"){c=this.w;a.o(this.exp,c)}b.checked=this.A.parse(b.value)==c}};ta.prototype={e:function(a){if(this.view.selectedIndex<
0)a.o(this.exp,null);else{var b=this.view.value;if(this.c===b)return false;else{a.o(this.exp,b);this.c=b;return true}}},d:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.w;a.o(this.exp,c)}if(c!==this.c){b.value=c?c:"";this.c=c}}};ua.prototype={selected:function(){for(var a=[],b=this.view.options,c=0;c<b.length;c++){var d=b[c];d.selected&&a.push(d.value)}return a},e:function(a){var b=this.selected();if(this.c===b)return false;else{a.o(this.exp,b);this.c=b;return true}},
d:function(a){var b=this.view,c=a.get(this.exp);if(typeof c==="undefined"){c=this.w;a.o(this.exp,c)}if(c!==this.c){a=b.options;for(b=0;b<a.length;b++){var d=a[b];d.selected=_.include(c,d.value)}this.c=c}}};va.prototype={e:function(a){var b=this.view;if(this.ka)return false;else{b.checked=true;this.c=a.o(this.exp,this.Da);return this.ka=true}},d:function(a){var b=this.view,c=a.get(this.exp);if(this.w&&typeof c==="undefined"){c=this.w;a.o(this.exp,c)}if(this.c!=c){this.ka=b.checked=this.Da==""+c;this.c=
c}}};M.Ua=function(a){switch(typeof a){case "string":case "boolean":case "number":return C(a);case "function":return M.Ua(a());case "object":if(a&&a.tagName&&a.nodeName&&a.ownerDocument&&a.removeAttribute)return ka(a);else if(a instanceof m.filter.g){switch(typeof a.html){case "string":case "number":return a.html;case "function":return a.html();case "object":if(a.html&&a.html.tagName&&a.html.nodeName&&a.html.ownerDocument&&a.html.removeAttribute)return ka(a.html);default:break}switch(typeof a.text){case "string":case "number":return C(a.text);
diff --git a/angular.js b/angular.js
index 1126c246..0ff24a74 100644
--- a/angular.js
+++ b/angular.js
@@ -3490,7 +3490,7 @@ TextController.prototype = {
}
if (this.lastErrorText !== errorText) {
this.lastErrorText = isValidationError;
- if (errorText !== null && isVisible(view)) {
+ if (errorText && isVisible(view)) {
view.setAttribute('ng-error', errorText);
scope.markInvalid(this);
}
diff --git a/src/Widgets.js b/src/Widgets.js
index 6eb2acc3..4f359e91 100644
--- a/src/Widgets.js
+++ b/src/Widgets.js
@@ -239,7 +239,7 @@ TextController.prototype = {
}
if (this.lastErrorText !== errorText) {
this.lastErrorText = isValidationError;
- if (errorText !== null && isVisible(view)) {
+ if (errorText && isVisible(view)) {
view.setAttribute('ng-error', errorText);
scope.markInvalid(this);
}
diff --git a/test/WidgetsTest.js b/test/WidgetsTest.js
index 4e3852a5..313d7372 100644
--- a/test/WidgetsTest.js
+++ b/test/WidgetsTest.js
@@ -18,7 +18,7 @@ WidgetTest.prototype.testValidator = function () {
var scope = new Scope({$invalidWidgets:[]});
var cntl = new TextController(view[0], 'a', angularFormatter.noop);
angular.validator.testValidator = function(value, expect){
- return value == expect ? null : "Error text";
+ return value == expect ? false : "Error text";
};
scope.set('a', '');