Skip to content

Commit

Permalink
Dev: answerjs html coherence with answeroptions view
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jan 12, 2016
1 parent d5deba1 commit 30b3eee
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions scripts/admin/answers.js
Expand Up @@ -103,10 +103,10 @@ function addinput()
inserthtml=
'<tr class="row_'+newposition+'" style="display:none;">'+
' <td>'+
' <span class="glyphicon glyphicon-move text-success"></span>'+
' <span class="glyphicon glyphicon-move"></span>'+
' </td>'+
' <td>'+
' <input class="code" onkeypress="return goodchars(event,\'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_\')" type="text" maxlength="5" size="5" required value="'+htmlspecialchars(sNextCode)+'" /></td><td '+assessment_style+'><input class="assessment" type="'+assessment_type+'" maxlength="5" size="5" value="1"/></td><td><input type="text" size="100" class="answer" placeholder="'+htmlspecialchars(newansweroption_text)+'" value="" />'+
' <input class="code first-in-answersjs" onkeypress="return goodchars(event,\'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_\')" type="text" maxlength="5" size="5" required value="'+htmlspecialchars(sNextCode)+'" /></td><td '+assessment_style+'><input class="assessment" type="'+assessment_type+'" maxlength="5" size="5" value="1"/></td><td><input type="text" size="100" class="answer first-inanswerjs" placeholder="'+htmlspecialchars(newansweroption_text)+'" value="" />'+
' <a class="editorLink">'+
' <span class="btneditanswerena glyphicon glyphicon-pencil text-success"></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;"></span>'+
Expand All @@ -125,7 +125,7 @@ function addinput()
' <td>&nbsp;</td>'+
' <td>'+htmlspecialchars(sNextCode)+'</td>'+
' <td>'+
' <input type="text" size="100" class="answer" placeholder="'+htmlspecialchars(newansweroption_text)+'" value="" />'+
' <input type="text" size="100" class="answer second-in-answerjs" placeholder="'+htmlspecialchars(newansweroption_text)+'" value="" />'+
' <a class="editorLink">'+
' <span class="btneditanswerena glyphicon glyphicon-pencil text-success"></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;"></span>'+
Expand Down Expand Up @@ -543,10 +543,13 @@ function transferlabels()
tablerows=tablerows+
'<tr class="row_'+k+'" >'+
' <td>'+
' <span class="glyphicon glyphicon-move text-success"></span>'+
' <span class="glyphicon glyphicon-move"></span>'+
' </td>'+
' <td>'+
' <input class="code" onkeypress="return goodchars(event,\'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_\')" type="text" maxlength="5" size="5" value="'+htmlspecialchars(lsrows[k].code)+'" /></td><td '+assessment_style+'><input class="assessment" type="'+assessment_type+'" maxlength="5" size="5" value="'+htmlspecialchars(lsrows[k].assessment_value)+'"/></td><td><input type="text" size="100" class="answer" value="'+htmlspecialchars(lsrows[k].title)+'"></input>'+
' <input class="code second-in-answerjs" onkeypress="return goodchars(event,\'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_\')" type="text" maxlength="5" size="5" value="'+htmlspecialchars(lsrows[k].code)+'" /></td><td '+assessment_style+'><input class="assessment" type="'+assessment_type+'" maxlength="5" size="5" value="'+htmlspecialchars(lsrows[k].assessment_value)+'"/>'+
' </td>'+
' <td>'+
' <input type="text" size="100" class="answer third-in-answerjs" value="'+htmlspecialchars(lsrows[k].title)+'"></input>'+
' <a class="editorLink">'+
' <span class="btneditanswerena glyphicon glyphicon-pencil text-success" ></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" alt="Give focus to the HTML editor popup window" style="display: none;" ></span>'+
Expand All @@ -564,7 +567,7 @@ function transferlabels()
'<tr class="row_'+k+'" ><td>&nbsp;</td><td>'+htmlspecialchars(lsrows[k].code)+
' </td>'+
' <td>'+
' <input type="text" size="100" class="answer" value="'+htmlspecialchars(lsrows[k].title)+'"></input>'+
' <input type="text" size="100" class="answer fourth-in-answerjs" value="'+htmlspecialchars(lsrows[k].title)+'"></input>'+
' <a class="editorLink">'+
' <span class="btneditanswerena glyphicon glyphicon-pencil text-success"></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;"></span>'+
Expand All @@ -590,7 +593,7 @@ function transferlabels()
' <td>&nbsp;</td>'+
' <td>'+htmlspecialchars(lsrows[k].code)+'</td>'+
' <td>'+
' <input type="text" size="100" class="answer" value="'+htmlspecialchars(lsrows[k].title)+'"></input>'+
' <input type="text" size="100" class="answer fifth-in-answerjs" value="'+htmlspecialchars(lsrows[k].title)+'"></input>'+
' <a class="editorLink">'+
' <span class="btneditanswerena glyphicon glyphicon-pencil text-success"></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;" ></span>'+
Expand Down Expand Up @@ -692,20 +695,24 @@ function quickaddlabels()
tablerows=tablerows+
'<tr class="row_'+k+'" >'+
' <td>'+
' <span class="glyphicon glyphicon-move text-success"></span>'+
' <span class="glyphicon glyphicon-move"></span>'+
' </td>'+
' <td>'+
' <input class="code" type="text" maxlength="5" size="5" value="'+thisrow[0]+'" />'+
' <input class="code third-in-answerjs form-control input-lg" type="text" maxlength="5" size="20" value="'+thisrow[0]+'" onkeypress="return goodchars(event,\'1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ_\')" />'+
' </td>'+
' <td '+assessment_style+'>'+
' <input class="assessment" type="'+assessment_type+'" maxlength="5" size="5" value="1"/>'+
' </td>'+
' <td>'+
' <input type="text" size="100" class="answer" value="'+escaped_value+'"></input>'+
' <a class="editorLink">'+
' <span class="btneditanswerena glyphicon glyphicon-pencil text-success"></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;"></span>'+
' </a>'+
' <td style="vertical-align: middle;">'+
' <div class="col-sm-11">'+
' <input type="text" size="20" class="answer form-control input-lg" value="'+escaped_value+'"></input>'+
' </div>'+
' <div style="display: inline-block; margin-top: 10px;">'+
' <a class="editorLink">'+
' <span class="glyphicon glyphicon-pencil btneditanswerena" data-toggle="tooltip" data-placement="bottom" title="Start HTML editor in a popup window" ></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;"></span>'+
' </a>'+
' </div>'+
' </td>'+
' <td>'+
' <span class="btnaddanswer icon-add text-success"></span>'+
Expand All @@ -720,11 +727,15 @@ function quickaddlabels()
' <td>&nbsp;</td>'+
' <td>&nbsp;</td>'+
' <td>'+
' <input type="text" size="100" class="answer" value="'+escaped_value+'"></input>'+
' <a class="editorLink">'+
' <span class="btneditanswerena glyphicon glyphicon-pencil text-success"></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;"></span>'+
' </a>'+
' <div class="col-sm-11">'+
' <input type="text" size="20" class="answer sixt-in-answerjs form-control input-lg" value="'+escaped_value+'"></input>'+
' </div>'+
' <div style="display: inline-block; margin-top: 10px;">'+
' <a class="editorLink">'+
' <span class="glyphicon glyphicon-pencil btneditanswerena" data-toggle="tooltip" data-placement="bottom" title="Start HTML editor in a popup window" ></span>'+
' <span class="btneditanswerdis glyphicon glyphicon-pencil text-success" title="Give focus to the HTML editor popup window" style="display: none;"></span>'+
' </a>'+
' </div>'+
' </td>'+
' <td>'+
' <span class="btnaddanswer icon-add text-success"></span>'+
Expand Down

0 comments on commit 30b3eee

Please sign in to comment.