# HG changeset patch # User www-data # Date 1492593717 -3600 # Node ID 952e4b75d4dedbe2eb10a05481df7526232f44ce # Parent e9c5cf559ecfde8f4c1caaeba7d0486028ed6472# Parent a13adc8f8d3de8ea45ae562cd2edd232566791d0 Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool diff -r e9c5cf559ecf -r 952e4b75d4de js/core.js --- a/js/core.js Tue Apr 18 15:20:53 2017 +0100 +++ b/js/core.js Wed Apr 19 10:21:57 2017 +0100 @@ -873,7 +873,7 @@ function processNumber(node) { var input = this.popupContent.getElementsByTagName('input')[0]; - if (node.mandatory === true && input.value.length === 0) { + if (node.specification.mandatory === true && input.value.length === 0) { interfaceContext.lightbox.post("Error", 'This question is mandatory. Please enter a number'); return false; } @@ -882,12 +882,12 @@ interfaceContext.lightbox.post("Error", 'Please enter a valid number'); return false; } - if (enteredNumber < node.min && node.min !== null) { - interfaceContext.lightbox.post("Error", 'Number is below the minimum value of ' + node.min); + if (enteredNumber < node.specification.min && node.specification.min !== null) { + interfaceContext.lightbox.post("Error", 'Number is below the minimum value of ' + node.specification.min); return false; } - if (enteredNumber > node.max && node.max !== null) { - interfaceContext.lightbox.post("Error", 'Number is above the maximum value of ' + node.max); + if (enteredNumber > node.specification.max && node.specification.max !== null) { + interfaceContext.lightbox.post("Error", 'Number is above the maximum value of ' + node.specification.max); return false; } node.response = input.value;