comparison test_create/test_core.js @ 2423:23bbd100b403

Fix for #72
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 27 May 2016 14:22:49 +0100
parents a41c985b20a3
children dd5290724a76 9c167c0d6c26
comparison
equal deleted inserted replaced
2421:a41c985b20a3 2423:23bbd100b403
1280 { 1280 {
1281 case "checkbox": 1281 case "checkbox":
1282 value = event.currentTarget.checked; 1282 value = event.currentTarget.checked;
1283 break; 1283 break;
1284 case "number": 1284 case "number":
1285 value = Number(event.currentTarget.value); 1285 if (event.currentTarget.value != "") {
1286 value = Number(event.currentTarget.value);
1287 } else {
1288 value = undefined;
1289 }
1286 break; 1290 break;
1287 default: 1291 default:
1288 value = event.currentTarget.value; 1292 if (event.currentTarget.value != "") {
1293 value = event.currentTarget.value;
1294 } else {
1295 value = undefined;
1296 }
1289 break; 1297 break;
1290 } 1298 }
1291 } else if (this.input.nodeName == "SELECT") { 1299 } else if (this.input.nodeName == "SELECT") {
1292 value = event.currentTarget.value; 1300 value = event.currentTarget.value;
1293 } 1301 }