Skip to content

Commit

Permalink
New feature: Replaced old tooltips with new ones
Browse files Browse the repository at this point in the history
Dev New tooltips are jQuery based and require less markup

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@7545 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Aug 29, 2009
1 parent c975a2b commit fe468ba
Show file tree
Hide file tree
Showing 35 changed files with 2,350 additions and 2,611 deletions.
38 changes: 19 additions & 19 deletions admin/activate.php
Expand Up @@ -214,41 +214,41 @@
if (isset($failedcheck) && $failedcheck)
{
$activateoutput .= "<br />\n<table bgcolor='#FFFFFF' width='500' align='center' style='border: 1px solid #555555' cellpadding='6' cellspacing='0'>\n";
$activateoutput .= "\t\t\t\t<tr bgcolor='#555555'><td height='4'><font size='1' face='verdana' color='white'><strong>".$clang->gT("Activate Survey")." ($surveyid)</strong></font></td></tr>\n";
$activateoutput .= "<tr bgcolor='#555555'><td height='4'><font size='1' face='verdana' color='white'><strong>".$clang->gT("Activate Survey")." ($surveyid)</strong></font></td></tr>\n";
$activateoutput .= "\t<tr>\n";
$activateoutput .= "\t\t<td align='center' bgcolor='#ffeeee'>\n";
$activateoutput .= "\t\t\t<font color='red'><strong>".$clang->gT("Error")."</strong><br />\n";
$activateoutput .= "\t\t\t".$clang->gT("Survey does not pass consistency check")."</font>\n";
$activateoutput .= "\t\t</td>\n";
$activateoutput .= "<td align='center' bgcolor='#ffeeee'>\n";
$activateoutput .= "\t<font color='red'><strong>".$clang->gT("Error")."</strong><br />\n";
$activateoutput .= "\t".$clang->gT("Survey does not pass consistency check")."</font>\n";
$activateoutput .= "</td>\n";
$activateoutput .= "\t</tr>\n";
$activateoutput .= "\t<tr>\n";
$activateoutput .= "\t\t<td>\n";
$activateoutput .= "\t\t\t<strong>".$clang->gT("The following problems have been found:")."</strong><br />\n";
$activateoutput .= "\t\t\t<ul>\n";
$activateoutput .= "<td>\n";
$activateoutput .= "\t<strong>".$clang->gT("The following problems have been found:")."</strong><br />\n";
$activateoutput .= "\t<ul>\n";
foreach ($failedcheck as $fc)
{
$activateoutput .= "\t\t\t\t<li> Question qid-{$fc[0]} (\"<a href='$scriptname?sid=$surveyid&amp;gid=$fc[3]&amp;qid=$fc[0]'>{$fc[1]}</a>\"){$fc[2]}</li>\n";
$activateoutput .= "<li> Question qid-{$fc[0]} (\"<a href='$scriptname?sid=$surveyid&amp;gid=$fc[3]&amp;qid=$fc[0]'>{$fc[1]}</a>\"){$fc[2]}</li>\n";
}
$activateoutput .= "\t\t\t</ul>\n";
$activateoutput .= "\t\t\t".$clang->gT("The survey cannot be activated until these problems have been resolved.")."\n";
$activateoutput .= "\t\t</td>\n";
$activateoutput .= "\t</ul>\n";
$activateoutput .= "\t".$clang->gT("The survey cannot be activated until these problems have been resolved.")."\n";
$activateoutput .= "</td>\n";
$activateoutput .= "\t</tr>\n";
$activateoutput .= "</table><br />&nbsp;\n";

return;
}

$activateoutput .= "<br />\n<div class='messagebox'>\n";
$activateoutput .= "\t\t\t\t<div class='header'>".$clang->gT("Activate Survey")." ($surveyid)</div>\n";
$activateoutput .= "\t\t<div class='warningheader'>\n";
$activateoutput .= "<div class='header'>".$clang->gT("Activate Survey")." ($surveyid)</div>\n";
$activateoutput .= "<div class='warningheader'>\n";
$activateoutput .= $clang->gT("Warning")."<br />\n";
$activateoutput .= $clang->gT("READ THIS CAREFULLY BEFORE PROCEEDING")."\n";
$activateoutput .= "\t\t\t</div>\n";
$activateoutput .= "\t</div>\n";
$activateoutput .= $clang->gT("You should only activate a survey when you are absolutely certain that your survey setup is finished and will not need changing.")."<br /><br />\n";
$activateoutput .= $clang->gT("Once a survey is activated you can no longer:")."<ul><li>".$clang->gT("Add or delete groups")."</li><li>".$clang->gT("Add or remove answers to Multiple Answer questions")."</li><li>".$clang->gT("Add or delete questions")."</li></ul>\n";
$activateoutput .= $clang->gT("However you can still:")."<ul><li>".$clang->gT("Edit (change) your questions code, text or type")."</li><li>".$clang->gT("Edit (change) your group names")."</li><li>".$clang->gT("Add, Remove or Edit pre-defined question answers (except for Multi-answer questions)")."</li><li>".$clang->gT("Change survey name or description")."</li></ul>\n";
$activateoutput .= $clang->gT("Once data has been entered into this survey, if you want to add or remove groups or questions, you will need to de-activate this survey, which will move all data that has already been entered into a separate archived table.")."<br /><br />\n";
$activateoutput .= "\t\t\t<input type='submit' value=\"".$clang->gT("Activate Survey")."\" onclick=\"".get2post("$scriptname?action=activate&amp;ok=Y&amp;sid={$_GET['sid']}")."\" />\n";
$activateoutput .= "\t<input type='submit' value=\"".$clang->gT("Activate Survey")."\" onclick=\"".get2post("$scriptname?action=activate&amp;ok=Y&amp;sid={$_GET['sid']}")."\" />\n";
$activateoutput .= "</div><br />&nbsp;\n";

}
Expand Down Expand Up @@ -538,8 +538,8 @@
}

$activateoutput .= "<br />\n<table class='alertbox'>\n";
$activateoutput .= "\t\t\t\t<tr><td height='4'><strong>".$clang->gT("Activate Survey")." ($surveyid)</td></tr>\n";
$activateoutput .= "\t\t\t\t<tr><td align='center'><font class='successtitle'>".$clang->gT("Survey has been activated. Results table has been successfully created.")."</font><br /><br />\n";
$activateoutput .= "<tr><td height='4'><strong>".$clang->gT("Activate Survey")." ($surveyid)</td></tr>\n";
$activateoutput .= "<tr><td align='center'><font class='successtitle'>".$clang->gT("Survey has been activated. Results table has been successfully created.")."</font><br /><br />\n";

$acquery = "UPDATE {$dbprefix}surveys SET active='Y' WHERE sid=".returnglobal('sid');
$acresult = $connect->Execute($acquery);
Expand All @@ -563,7 +563,7 @@
$activateoutput .= "<input type='submit' value='".$clang->gT("Switch to closed-access mode")."' onclick=\"".get2post("$scriptname?action=tokens&amp;sid={$postsid}&amp;createtable=Y")."\" />\n";
$activateoutput .= "<input type='submit' value='".$clang->gT("No, thanks.")."' onclick=\"".get2post("$scriptname?sid={$postsid}")."\" />\n";
}
$activateoutput .= "\t\t\t\t</font></font></td></tr></table><br />&nbsp;\n";
$activateoutput .= "</font></font></td></tr></table><br />&nbsp;\n";
}

}
Expand Down
112 changes: 56 additions & 56 deletions admin/admin.php
Expand Up @@ -55,7 +55,7 @@
$adminoutput = helpscreenscript();
$adminoutput .= "<table width='100%' border='0' cellpadding='0' cellspacing='0' >\n"
."\t<tr>\n"
."\t\t<td valign='top' align='center' bgcolor='#F8F8FF'>\n";
."<td valign='top' align='center' bgcolor='#F8F8FF'>\n";
} else {$adminoutput='';}

if($casEnabled==true)
Expand Down Expand Up @@ -546,7 +546,7 @@

$adminoutput = getAdminHeader($_SESSION['metaHeader']).$adminoutput; // All future output is written into this and then outputted at the end of file
unset($_SESSION['metaHeader']);
$adminoutput.= "\t\t</td>\n".helpscreen()
$adminoutput.= "</td>\n".helpscreen()
. "\t</tr>\n"
. "</table>\n";
if(!isset($_SESSION['checksessionpost']))
Expand All @@ -555,35 +555,35 @@
. "<!--\n"
. "\tfor(i=0; i<document.forms.length; i++)\n"
. "\t{\n"
. "\t\tvar el = document.createElement('input');\n"
. "\t\tel.type = 'hidden';\n"
. "\t\tel.name = 'checksessionbypost';\n"
. "\t\tel.value = '".$_SESSION['checksessionpost']."';\n"
. "\t\tdocument.forms[i].appendChild(el);\n"
. "var el = document.createElement('input');\n"
. "el.type = 'hidden';\n"
. "el.name = 'checksessionbypost';\n"
. "el.value = '".$_SESSION['checksessionpost']."';\n"
. "document.forms[i].appendChild(el);\n"
. "\t}\n"
. "\n"
. "\tfunction addHiddenElement(theform,thename,thevalue)\n"
. "\t{\n"
. "\t\tvar myel = document.createElement('input');\n"
. "\t\tmyel.type = 'hidden';\n"
. "\t\tmyel.name = thename;\n"
. "\t\ttheform.appendChild(myel);\n"
. "\t\tmyel.value = thevalue;\n"
. "\t\treturn myel;\n"
. "var myel = document.createElement('input');\n"
. "myel.type = 'hidden';\n"
. "myel.name = thename;\n"
. "theform.appendChild(myel);\n"
. "myel.value = thevalue;\n"
. "return myel;\n"
. "\t}\n"
. "\n"
. "\tfunction sendPost(myaction,checkcode,arrayparam,arrayval)\n"
. "\t{\n"
. "\t\tvar myform = document.createElement('form');\n"
. "\t\tdocument.body.appendChild(myform);\n"
. "\t\tmyform.action =myaction;\n"
. "\t\tmyform.method = 'POST';\n"
. "\t\tfor (i=0;i<arrayparam.length;i++)\n"
. "\t\t{\n"
. "\t\t\taddHiddenElement(myform,arrayparam[i],arrayval[i])\n"
. "\t\t}\n"
. "\t\taddHiddenElement(myform,'checksessionbypost',checkcode)\n"
. "\t\tmyform.submit();\n"
. "var myform = document.createElement('form');\n"
. "document.body.appendChild(myform);\n"
. "myform.action =myaction;\n"
. "myform.method = 'POST';\n"
. "for (i=0;i<arrayparam.length;i++)\n"
. "{\n"
. "\taddHiddenElement(myform,arrayparam[i],arrayval[i])\n"
. "}\n"
. "addHiddenElement(myform,'checksessionbypost',checkcode)\n"
. "myform.submit();\n"
. "\t}\n"
. "\n"
. "//-->\n"
Expand All @@ -599,7 +599,7 @@
if (!isset($_SESSION['metaHeader'])) {$_SESSION['metaHeader']='';}
$adminoutput = getAdminHeader($_SESSION['metaHeader']).$adminoutput; // All future output is written into this and then outputted at the end of file
unset($_SESSION['metaHeader']);
$adminoutput.= "\t\t</td>\n".helpscreen()
$adminoutput.= "</td>\n".helpscreen()
. "\t</tr>\n"
. "</table>\n"
. getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey Online Manual"));
Expand All @@ -621,17 +621,17 @@ function helpscreenscript()
{
$helpoutput= "<script type='text/javascript'>\n"
."\tfunction showhelp(action)\n"
."\t\t{\n"
."\t\tvar name='help';\n"
."\t\tif (action == \"hide\")\n"
."\t\t\t{\n"
."\t\t\tdocument.getElementById(name).style.display='none';\n"
."\t\t\t}\n"
."\t\telse if (action == \"show\")\n"
."\t\t\t{\n"
."\t\t\tdocument.getElementById(name).style.display='';\n"
."\t\t\t}\n"
."\t\t}\n"
."{\n"
."var name='help';\n"
."if (action == \"hide\")\n"
."\t{\n"
."\tdocument.getElementById(name).style.display='none';\n"
."\t}\n"
."else if (action == \"show\")\n"
."\t{\n"
."\tdocument.getElementById(name).style.display='';\n"
."\t}\n"
."}\n"
."</script>\n";
return $helpoutput;
}
Expand All @@ -644,23 +644,23 @@ function helpscreen()
global $homeurl, $langdir, $imagefiles;
global $surveyid, $gid, $qid, $action, $clang;

$helpoutput="\t\t<td id='help' width='200' valign='top' style='display: none' bgcolor='#F8F8FF'>\n"
."\t\t\t<table width='100%'><tr><td>"
$helpoutput="<td id='help' width='200' valign='top' style='display: none' bgcolor='#F8F8FF'>\n"
."\t<table width='100%'><tr><td>"
."<table width='100%' align='center' cellspacing='0'>\n"
."\t\t\t\t<tr>\n"
."\t\t\t\t\t<td bgcolor='#D2E0F2' height='8'>\n"
."\t\t\t\t\t\t<font size='1'><strong>"
."<tr>\n"
."\t<td bgcolor='#D2E0F2' height='8'>\n"
."<font size='1'><strong>"
.$clang->gT("Help")."</strong>\n"
."\t\t\t\t\t</font></td>\n"
."\t\t\t\t</tr>\n"
."\t\t\t\t<tr>\n"
."\t\t\t\t\t<td align='center' bgcolor='#EEF6FF' style='border-style: solid; border-width: 1px; border-color: #D2E0F2'>\n"
."\t\t\t\t\t\t<img src='$imagefiles/blank.gif' alt='' width='20' hspace='0' border='0' align='left' />\n"
."\t\t\t\t\t\t<input type='image' src='$imagefiles/close.gif' name='CloseHelp' align='right' onclick=\"showhelp('hide')\" />\n"
."\t\t\t\t\t</td>\n"
."\t\t\t\t</tr>\n"
."\t\t\t\t<tr>\n"
."\t\t\t\t\t<td bgcolor='#EEF6FF' height='100%' style='border-width: 0px;'>\n";
."\t</font></td>\n"
."</tr>\n"
."<tr>\n"
."\t<td align='center' bgcolor='#EEF6FF' style='border-style: solid; border-width: 1px; border-color: #D2E0F2'>\n"
."<img src='$imagefiles/blank.gif' alt='' width='20' hspace='0' border='0' align='left' />\n"
."<input type='image' src='$imagefiles/close.gif' name='CloseHelp' align='right' onclick=\"showhelp('hide')\" />\n"
."\t</td>\n"
."</tr>\n"
."<tr>\n"
."\t<td bgcolor='#EEF6FF' height='100%' style='border-width: 0px;'>\n";
//determine which help document to show
if (!$surveyid && $action != "editusers")
{
Expand All @@ -686,12 +686,12 @@ function helpscreen()
{
$helpdoc = "$langdir/answer.html";
}
$helpoutput.= "\t\t\t\t\t\t<iframe width='200' height='400' src='$helpdoc' marginwidth='2' marginheight='2'>\n"
."\t\t\t\t\t\t</iframe>\n"
."\t\t\t\t\t</td>"
."\t\t\t\t</tr>\n"
."\t\t\t</table></td></tr></table>\n"
."\t\t</td>\n";
$helpoutput.= "<iframe width='200' height='400' src='$helpdoc' marginwidth='2' marginheight='2'>\n"
."</iframe>\n"
."\t</td>"
."</tr>\n"
."\t</table></td></tr></table>\n"
."</td>\n";
return $helpoutput;
}

Expand Down
16 changes: 8 additions & 8 deletions admin/assessments.php
Expand Up @@ -99,24 +99,24 @@
--></script>";
$assessmentsoutput.="<table width='100%' border='0' >\n"
. "\t<tr>\n"
. "\t\t<td>\n"
. "<td>\n"
. "<div class='menubar'>\n"
. "\t<div class='menubar-title'>\n"
. "\t\t<strong>".$clang->gT("Assessments")."</strong>\n";
. "<strong>".$clang->gT("Assessments")."</strong>\n";

$assessmentsoutput.= "\t</div>\n"
. "\t<div class='menubar-main'>\n"
. "\t\t<div class='menubar-left'>\n"
. "\t\t\t<a href=\"#\" onclick=\"window.open('$scriptname?sid=$surveyid', '_top')\" onmouseout=\"hideTooltip()\" onmouseover=\"showTooltip(event,'".$clang->gT("Return to Survey Administration", "js")."');return false\">" .
"<img name='Administration' src='$imagefiles/home.png' title='' alt='' /></a>\n"
. "\t\t\t<img src='$imagefiles/blank.gif' alt='' width='11' />\n"
. "\t\t\t<img src='$imagefiles/seperator.gif' alt='' />\n";
. "<div class='menubar-left'>\n"
. "\t<a href=\"#\" onclick=\"window.open('$scriptname?sid=$surveyid', '_top')\" title='".$clang->gTview("Return to survey administration")."'>" .
"<img name='Administration' src='$imagefiles/home.png' alt='".$clang->gT("Return to survey administration")."' /></a>\n"
. "\t<img src='$imagefiles/blank.gif' alt='' width='11' />\n"
. "\t<img src='$imagefiles/seperator.gif' alt='' />\n";

if ($surveyinfo['assessments']!='Y')
{
$assessmentsoutput.='<span style="font-size:11px;">'.sprintf($clang->gT("Notice: Assessment mode for this survey is not activated. You can activate it in the %s survey settings %s (tab 'Notification & data management')."),'<a href="admin.php?action=editsurvey&sid='.$surveyid.'">','</a>').'</span>';
}
$assessmentsoutput.= "\t\t</div>\n"
$assessmentsoutput.= "</div>\n"
. "\t</div>\n"
. "</div>\n";
$assessmentsoutput .= "<p style='margin:0;font-size:1px;line-height:1px;height:1px;'>&nbsp;</p>"; //CSS Firefox 2 transition fix
Expand Down

0 comments on commit fe468ba

Please sign in to comment.