Fixed small bug in Survey validation where invalid branch expressions
wouldn't be shown Improved and i18n'ed Survey validation warning container
This commit is contained in:
parent
d19963fd8e
commit
571ca5db06
6 changed files with 28 additions and 8 deletions
|
|
@ -56,9 +56,17 @@ Survey.Data = (function(){
|
|||
focus = d.address;//What is the current highlighted item.
|
||||
var warnings = "";
|
||||
for(var w in d.warnings){
|
||||
warnings = warnings + "<br>" + d.warnings[w];
|
||||
warnings += "<div class='warning'>" + d.warnings[w] + "</div>";
|
||||
}
|
||||
if (document.getElementById('warnings')) {
|
||||
if (warnings !== "") {
|
||||
document.getElementById('warnings').innerHTML = warnings;
|
||||
YAHOO.util.Dom.setStyle('warnings-outer', 'display', 'block');
|
||||
}
|
||||
else {
|
||||
YAHOO.util.Dom.setStyle('warnings-outer', 'display', 'none');
|
||||
}
|
||||
}
|
||||
document.getElementById('warnings').innerHTML = warnings;
|
||||
var showEdit = 1;
|
||||
if (lastId.toString() === d.address.toString()) {
|
||||
showEdit = 0;
|
||||
|
|
|
|||
|
|
@ -171,3 +171,13 @@ li.newAnswer {
|
|||
width:15em;
|
||||
margin-top:0.5em;
|
||||
}
|
||||
|
||||
#warnings-outer {
|
||||
margin: 5px;
|
||||
padding: 0 5px;
|
||||
border: 1px solid;
|
||||
color: red;
|
||||
}
|
||||
#warnings {
|
||||
color: red;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue