Changeset 1864
- Timestamp:
- 2011-02-23 13:16:35 (15 months ago)
- Location:
- trunk/modules/kauri-forms/kauri-forms-framework/src
- Files:
-
- 3 edited
-
main/kauri/static-{build}.key/kauri.forms/basic-validators.js (modified) (2 diffs)
-
test/kauri.forms/test-basic-validators.js (modified) (1 diff)
-
test/kauri.forms/testPage.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/basic-validators.js
r1826 r1864 168 168 169 169 var me = this; 170 var result; 171 var successHandler = function( response) { 172 173 if (response && response.valid == true) 174 result = me.notifySuccess(); 175 else if (response && response.valid == false) 176 result = me.notifyFail(response.message, response.args); 177 else 178 result = me.notifyFail("i18n:Remote validation returned incompatible response!"); 179 return result; 170 var successHandler = function( response, txtstatus, xhr) { 171 172 if (response == null && xhr.status == 0) { // for chrome 173 return errorHandler(xhr, txtstatus, "empty response"); 174 } 175 176 if (response && response.valid == true) { 177 return me.notifySuccess(); 178 } 179 180 if (response && response.valid == false) { 181 return me.notifyFail(response.message, response.args); 182 } 183 184 return me.notifyFail("i18n:Remote validation returned incompatible response!"); 180 185 }; 181 186 var errorHandler = function() { 182 183 result = me.notifyFail("i18n:Error while connecting to remote validation."); 184 return result; 187 return me.notifyFail("i18n:Error while connecting to remote validation."); 185 188 }; 186 189 try { … … 199 202 } 200 203 201 return result; // will be undefined in the case of async calls204 return; 202 205 } 203 206 } -
trunk/modules/kauri-forms/kauri-forms-framework/src/test/kauri.forms/test-basic-validators.js
r1827 r1864 255 255 256 256 var report = "Checking result for validator/type: " + comp['org.kauriproject.registry-name'] + 257 "- value= (" + val + ") - msg= (" + message + ") ";257 "- value= (" + val + ") - msg= (" + message + ") - location (" + comp.location + ")"; 258 258 259 259 if (expectMessage) -
trunk/modules/kauri-forms/kauri-forms-framework/src/test/kauri.forms/testPage.html
r1436 r1864 77 77 <h2 id="banner"></h2> 78 78 <h2 id="userAgent"></h2> 79 <h2>Note: to run these tests in google chrome: close all instances and start-up with --allow-file-access-from-files</h2> 79 80 80 81 <!-- Test HTML -->
Note: See TracChangeset
for help on using the changeset viewer.