added many new features
This commit is contained in:
parent
94b73f3c73
commit
9ce9618bf9
3 changed files with 8 additions and 3 deletions
|
|
@ -86,7 +86,7 @@ YAHOO.util.Event.addListener("testB", "click", function(){Survey.Comm.callServer
|
|||
var b = new YAHOO.widget.Button({ type: "checkbox", label: a.answerText, id: a.Survey_answerId+'button', name: a.Survey_answerId+'button',
|
||||
value: a.Survey_answerId,
|
||||
container: a.Survey_answerId+"container", checked: false });
|
||||
b.on("click", this.buttonChanged,[b,a.Survey_questionId,q.maxAnswers,butts]);
|
||||
b.on("click", this.buttonChanged,[b,a.Survey_questionId,q.maxAnswers,butts,qs.length]);
|
||||
b.hid = a.Survey_answerId;
|
||||
butts.push(b);
|
||||
}
|
||||
|
|
@ -278,6 +278,7 @@ YAHOO.util.Event.addListener("testB", "click", function(){Survey.Comm.callServer
|
|||
var qid = objs[1];
|
||||
var maxA = objs[2];
|
||||
var butts = objs[3];
|
||||
var qsize = objs[4];
|
||||
max = parseInt(max);
|
||||
if(maxA == 1){
|
||||
for(var i in butts){
|
||||
|
|
@ -302,6 +303,9 @@ YAHOO.util.Event.addListener("testB", "click", function(){Survey.Comm.callServer
|
|||
document.getElementById(qid+'max').innerHTML = parseInt(max+1);
|
||||
document.getElementById(b.hid).value = 1;
|
||||
}
|
||||
if(qsize == 1){
|
||||
Survey.Form.formsubmit();
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Survey.QuestionTemplate = new function(){
|
|||
else{
|
||||
html = html + "<textarea name='questionText'>"+params.questionText+"</textArea>\n";
|
||||
}
|
||||
html = html + "<p>Question custom variable name:<input maxlength=35 size=10 type=text value='"+ params.questionVariable +"' name=questionVariable size=2>";
|
||||
html = html + "<p>Question custom variable name:<input maxlength=35 size=10 type=text value='"+ params.questionVariable +"' name=questionVariable size=2></p>";
|
||||
html = html + "<p>Randomize answers:";
|
||||
|
||||
html = html+ this.makeRadio('randomizeAnswers',[{text:'Yes',value:1},{text:'No',value:0}],params.randomizeAnswers);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ Survey.SectionTemplate = new function(){
|
|||
<input type='radio' name='randomizeQuestions' value=1>Yes\
|
||||
<input type='radio' name='randomizeQuestions' value=0 checked>No";
|
||||
}
|
||||
html = html + "<p>Section custom variable name:<input maxlength=35 size=10 type=text value='"+ params.sectionVariable +"' name=sectionVariable size=2></p>";
|
||||
html = html + "\
|
||||
<p>Question per Page:\
|
||||
<select name='questionsPerPage'>";
|
||||
|
|
@ -66,7 +67,7 @@ Survey.SectionTemplate = new function(){
|
|||
}
|
||||
|
||||
var form = new YAHOO.widget.Dialog("section",
|
||||
{ width : "300px",
|
||||
{ width : "400px",
|
||||
fixedcenter : true,
|
||||
visible : false,
|
||||
constraintoviewport : true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue