Mercurial > hg > webaudioevaluationtool
changeset 2731:952e4b75d4de
Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool
author | www-data <www-data@sucuk.dcs.qmul.ac.uk> |
---|---|
date | Wed, 19 Apr 2017 10:21:57 +0100 |
parents | e9c5cf559ecf (current diff) a13adc8f8d3d (diff) |
children | c9912c7878ec |
files | |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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;