comparison core.js @ 8:a6ce34b4dd41

checkOneFragmentSelected ignored when one or more fragments are inactive
author Giulio Moro <giuliomoro@yahoo.it>
date Sun, 24 Apr 2016 14:41:26 +0100
parents bd0bd3033ac5
children
comparison
equal deleted inserted replaced
7:0dde5b0c5d5c 8:a6ce34b4dd41
3137 return false; 3137 return false;
3138 }; 3138 };
3139 this.checkOneFragmentSelected = function(){ 3139 this.checkOneFragmentSelected = function(){
3140 console.log("checkOneFragmentSelected"); 3140 console.log("checkOneFragmentSelected");
3141 var str = "You should select an answer before continuing"; 3141 var str = "You should select an answer before continuing";
3142 if(this.comparator.selected === null){ 3142 var isInactive = 0;
3143 for (var ao of audioEngineContext.audioObjects)
3144 {
3145 if(ao.specification.inactive === true)
3146 {
3147 ++isInactive;
3148 }
3149 }
3150 if(this.comparator.selected === null && isInactive===0){
3143 alert(str); 3151 alert(str);
3144 return false; 3152 return false;
3145 } else { 3153 } else {
3146 return true; 3154 return true;
3147 } 3155 }