Skip to content

Commit

Permalink
Fixed unreported issue: printable and scanable feature breaking inter…
Browse files Browse the repository at this point in the history
…face in dev branch

Dev updated to use jquery as the printable survey feature does


git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@9225 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
adamzammit committed Oct 12, 2010
1 parent 6343121 commit 2b56f10
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
19 changes: 8 additions & 11 deletions admin/html.php
Expand Up @@ -462,32 +462,29 @@
{

$surveysummary .= "<a href=\"#\" onclick=\"window.open('$scriptname?action=showquexmlsurvey&amp;sid=$surveyid', '_top')\""
. " title=\"".$clang->gTview("Printable and scannable Version of Survey")."\" >"
. "<img src='$imagefiles/scanner-3.png' name='ShowPrintablescannableSurvey' alt='".$clang->gT("Printable and scannable Version of Survey")."' />";
. " title=\"".$clang->gTview("Printable and Scanable Version of Survey")."\" >"
. "<img src='$imagefiles/scanner-3.png' name='ShowPrintableScanableSurvey' alt='".$clang->gT("Printable and Scanable Version of Survey")."' />";

} else {

$surveysummary .= "<a href=\"#\" onclick=\"document.getElementById('printpopupquexml').style.visibility='visible'; "
. "document.getElementById('langpopup2').style.visibility='hidden';\""
. " title=\"".$clang->gTview("Printable and scannable Version of Survey")."\" >"
. "<img src='$imagefiles/scanner-3.png' name='ShowPrintablescannableSurvey' alt='".$clang->gT("Printable and scannable Version of Survey")."' />\n";
$surveysummary .= "<a href='#' id='doprintablescanable' title=\"".$clang->gTview("Printable and Scanable Version of Survey")."\" >"
. "<img src='$imagefiles/scanner-3.png' name='ShowPrintableScanableSurvey' alt='".$clang->gT("Printable and Scanable Version of Survey")."' />\n";

$tmp_survlangs = GetAdditionalLanguagesFromSurveyID($surveyid);
$baselang = GetBaseLanguageFromSurveyID($surveyid);
$tmp_survlangs[] = $baselang;
rsort($tmp_survlangs);

// Test Survey Language Selection Popup
$surveysummary .="<div class=\"langpopup2\" id=\"printpopupquexml\"><table width=\"100%\"><tr><td>".$clang->gT("Please select a language:")."</td></tr>";
$surveysummary .="<div class=\"langpopup\" id=\"doprintablescanablelangpopup\">".$clang->gT("Please select a language:")."<ul>";
foreach ($tmp_survlangs as $tmp_lang)
{
$surveysummary .= "<tr><td><a href=\"#\" accesskey='d' onclick=\"document.getElementById('printpopupquexml').style.visibility='hidden'; window.open('$scriptname?action=showquexmlsurvey&amp;sid=$surveyid&amp;lang=".$tmp_lang."', '_blank')\"><font color=\"#097300\"><b>".getLanguageNameFromCode($tmp_lang,false)."</b></font></a></td></tr>";
$surveysummary .= "<li><a href='{$scriptname}?action=showquexmlsurvey&amp;sid={$surveyid}&amp;lang={$tmp_lang}' target='_top' onclick=\"$('#doprintablescanable').qtip('hide');\" accesskey='p'>".getLanguageNameFromCode($tmp_lang,false)."</a></li>";
}
$surveysummary .= "<tr><td align=\"center\"><a href=\"#\" accesskey='d' onclick=\"document.getElementById('printpopupquexml').style.visibility='hidden';\"><font color=\"#DF3030\">".$clang->gT("Cancel")."</font></a></td></tr></table></div>";

$surveysummary .= "<script type='text/javascript'>document.getElementById('printpopupquexml').style.left='152px';</script>\n";
$surveysummary .= "</ul></div>";
}


if (count(GetAdditionalLanguagesFromSurveyID($surveyid)) == 0)
{

Expand Down
29 changes: 29 additions & 0 deletions admin/scripts/admin_core.js
Expand Up @@ -107,6 +107,35 @@ $(document).ready(function(){
}}
});

$('#doprintablescanable').qtip({
content:{
text:$('#doprintablescanablelangpopup')
},
style: { name: 'cream',
tip:true,
color:'#111111',
border: {
width: 1,
radius: 5,
color: '#EADF95'}
},
position: { adjust: {
screen: true, scroll:true },
corner: {
target: 'bottomMiddle',
tooltip: 'topMiddle'}
},
show: {effect: { length:50},
when: {
event:'click'
}},
hide: {fixed:true,
when: {
event:'unfocus'
}}
});


$('#doprintable').qtip({
content:{
text:$('#doprintablelangpopup')
Expand Down

0 comments on commit 2b56f10

Please sign in to comment.