Skip to content

Commit

Permalink
Fix issue 04117: Check for old table layouts
Browse files Browse the repository at this point in the history
Dev Converted table-based layouts to tableless/CSS layouts (where applicable)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8412 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Tony Partner committed Feb 18, 2010
1 parent ba55003 commit 8c5f692
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 43 deletions.
8 changes: 4 additions & 4 deletions admin/globalsettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function globalsettingsdisplay()
$editsurvey .= "\t<div class='tab-page'> <h2 class='tab'>".$clang->gT("Overview & Update")."</h2>\n";
$editsurvey .= checksettings();
$thisupdatecheckperiod=getGlobalSetting('updatecheckperiod');
$editsurvey .= "<br /></p><div class='settingcaption'>".$clang->gT("Updates")."</div><ul>"
$editsurvey .= "<br /></p><div class='header'>".$clang->gT("Updates")."</div><ul>"
. "\t<li><label for='updatecheckperiod'>".$clang->gT("Check for updates:")."</label>\n"
. "\t\t\t<select name='updatecheckperiod' id='updatecheckperiod'>\n"
. "\t\t\t\t<option value='0'";
Expand Down Expand Up @@ -372,10 +372,10 @@ function globalsettingsdisplay()
$editsurvey .= "</div>\n";

// The external button to sumbit Survey edit changes
$editsurvey .= "\t<p><input type='button' onclick='$(\"#frmglobalsettings\").submit();' class='standardbtn' value='".$clang->gT("Save settings")."' /><br />\n";
$editsurvey .= "\t<p><input type='button' onclick='$(\"#frmglobalsettings\").submit();' class='standardbtn' value='".$clang->gT("Save settings")."' /><br /></p>\n";
if ($demoModeOnly==true)
{
$editsurvey .= '<p>'.$clang->gT("Note: Demo mode is activated. Marked (*) settings won't be saved.");
$editsurvey .= '<p>'.$clang->gT("Note: Demo mode is activated. Marked (*) settings won't be saved.").'</p>\n';
}


Expand Down Expand Up @@ -466,7 +466,7 @@ function checksettings()
{$deactivatedtokens=count($oldtokenlist);} else {$deactivatedtokens=0;}
if(isset($tokenlist) && is_array($tokenlist))
{$activetokens=count($tokenlist);} else {$activetokens=0;}
$cssummary = "<div class='settingcaption'>".$clang->gT("System overview")."</div>\n";
$cssummary = "<div class='header'>".$clang->gT("System overview")."</div>\n";
// Database name & default language
$cssummary .= "<br /><table class='statisticssummary'><tr>\n"
. "<td width='50%' align='right'>\n"
Expand Down
7 changes: 2 additions & 5 deletions admin/grouphandling.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@
$egquery = "SELECT * FROM ".db_table_name('groups')." WHERE sid=$surveyid AND gid=$gid AND language='$baselang'";
$egresult = db_execute_assoc($egquery);
$editgroup = PrepareEditorScript();
$editgroup .= "<table width='100%' border='0'>\n\t<tr><td class='settingcaption'>"
. "".$clang->gT("Edit Group")."</td></tr></table>\n"
$editgroup .= "<div class='header'>".$clang->gT("Edit Group")."</div>\n"
. "<form name='editgroup' action='$scriptname' method='post'>\n"
. '<div class="tab-pane" id="tab-pane-group-'.$gid.'">';

Expand Down Expand Up @@ -238,9 +237,7 @@
}
}

$ordergroups = "<table width='100%' border='0'>\n<tr ><td colspan='2' class='settingcaption'>"
. "".$clang->gT("Change Group Order")."</td></tr>"
. "</table>\n";
$ordergroups = "<div class='header'>".$clang->gT("Change Group Order")."</div><br />\n";

// Get groups dependencies regarding conditions
// => Get an array of groups containing questions with conditions outside the group
Expand Down
8 changes: 3 additions & 5 deletions admin/statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,12 @@
$statisticsoutput .= "<!-- Close filter group --></tr>\n</table></div></td></tr>\n";
}

$statisticsoutput .= "\t\t<tr><td align='center' class='settingcaption'>\n"
$statisticsoutput .= "\t\t<tr><td><div class='header'>\n"

."<input type=\"checkbox\" id='btn_$flt[1]' onclick=\"selectCheckboxes('grp_$flt[1]', 'summary[]', 'btn_$flt[1]');\" />"

//use current groupname and groupid as heading
."<font size='1'><strong>$flt[4]</strong> (".$clang->gT("Question group")." $flt[1])</font></td></tr>\n\t\t"
."<font size='1'><strong>$flt[4]</strong> (".$clang->gT("Question group")." $flt[1])</font></div></td></tr>\n\t\t"
."<tr><td align='center'>\n"
."<div id='grp_$flt[1]'><table class='filtertable'><tr>\n";

Expand Down Expand Up @@ -1588,9 +1588,7 @@


//add line to separate the the filters from the other options
$statisticsoutput .= "<tr><td align='center' class='settingcaption'>
<font size='1' face='verdana'>&nbsp;</font>
</td></tr>";
$statisticsoutput .= "<tr class='statistics-tbl-separator'><td></td></tr>";

$statisticsoutput .= "</table>";

Expand Down
21 changes: 21 additions & 0 deletions admin/styles/default/adminstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,21 @@ div.messagebox .warningheader {
background-color: #FFEEEE;
}

/* ComfortUpdate interface */

.updater-background {
background-color:#f8f8ff;
padding:1% 10%;
}

textarea.updater-changelog {
width:800px;
height:300px;
background-color:#fff;
font-family:Monospace;
font-size:11px;
}

/*controls the width of select boxes in group order dialog*/
.movableNode select {
max-width:200px;
Expand Down Expand Up @@ -1200,6 +1215,12 @@ margin:0 auto;
width:200px;
}

.statistics-tbl-separator td {
background-color:#D2E0F2;
height:2px;
padding:0;
}

#statistics_general_filter {
width:650px;
margin:0 auto;
Expand Down
17 changes: 7 additions & 10 deletions admin/tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,11 @@
{
$tokenoutput .= "\t<div class='messagebox'><div class='header'>"
.$clang->gT("Token control")."</div>\n"
."\t<strong>"
.$clang->gT("Error")."</strong></font><br />".$clang->gT("You have not selected a survey")."<br /><br />"
."\t<br /><div class='warningheader'>".$clang->gT("Error")."</div>"
."<br />".$clang->gT("You have not selected a survey")."<br /><br />"
."<input type='submit' value='"
.$clang->gT("Main admin screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br /><br /></td></tr>\n"
."</div></div>\n"
."</body>\n</html>";
.$clang->gT("Main admin screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br />\n"
."</div>\n";
return;
}

Expand All @@ -267,12 +266,11 @@
{
$tokenoutput .= "\t<div class='messagebox'>\n<div class='header'>\n"
.$clang->gT("Token control")."</div>\n"
."\t<font color='red'><strong>".$clang->gT("Error")."</strong></font>"
."\t<br /><div class='warningheader'>".$clang->gT("Error")."</div>"
."<br />".$clang->gT("The survey you selected does not exist")
."<br /><br />\n\t<input type='submit' value='"
.$clang->gT("Main admin screen")."' onclick=\"window.open('$scriptname', '_top')\" /><br />"
."</div></div>\n"
."</body>\n</html>";
."</div>\n";
return;
}
else // A survey DOES exist
Expand Down Expand Up @@ -1737,8 +1735,7 @@
$_SESSION['USER_RIGHT_SUPERADMIN'] == 1)
)
{
$tokenoutput .= "<table width='100%' border='0'>\n\t<tr><td class='settingcaption'>"
. "".$clang->gT("Manage token attribute fields")."</td></tr></table>\n";
$tokenoutput .= "<div class='header'>".$clang->gT("Manage token attribute fields")."</div>\n";
$tokenfields=GetTokenFieldsAndNames($surveyid,true);
$nrofattributes=0;
$tokenoutput.='<form action="'.$scriptname.'" method="post">'
Expand Down
37 changes: 18 additions & 19 deletions admin/update/updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function UpdateStep1()
setGlobalSetting('updatekey',sanitize_paranoid_string($_POST['updatekey']));
}
$error=false;
$output='<div class="background"><div class="header">'.$clang->gT('Welcome to the ComfortUpdate').'</div><br />';
$output='<div class="header">'.$clang->gT('Welcome to the ComfortUpdate').'</div><div class="updater-background"><br />';
$output.=$clang->gT('The LimeSurvey ComfortUpdate is an easy procedure to quickly update to the latest version of LimeSurvey.').'<br />';
$output.=$clang->gT('The following steps will be done by this update:').'<br /><ul>';
$output.='<li>'.$clang->gT('Your LimeSurvey installation is checked if the update can be run successfully.').'</li>';
Expand All @@ -46,7 +46,7 @@ function UpdateStep1()

if (!is_writable($tempdir))
{
$output.= "<li>".sprintf($clang->gT("Tempdir %s is not writable"),$tempdir)."<li>";
$output.= "<li class='errortitle'>".sprintf($clang->gT("Tempdir %s is not writable"),$tempdir)."<li>";
$error=true;
}
if (!is_writable($rootdir.DIRECTORY_SEPARATOR.'version.php'))
Expand Down Expand Up @@ -78,7 +78,7 @@ function UpdateStep1()
$full_body .= $body;
}
$changelog=json_decode($full_body,true);
$output.='<textarea style="width:800px; height:300px; background-color:#fff; font-family:Monospace; font-size:11px;" readonly="readonly">'.htmlspecialchars($changelog['changelog']).'</textarea>';
$output.='<textarea class="updater-changelog" readonly="readonly">'.htmlspecialchars($changelog['changelog']).'</textarea>';
}
else
{
Expand All @@ -89,18 +89,18 @@ function UpdateStep1()

if ($error)
{
$output.='<br />'.$clang->gT('When checking your installation we found one or more problems. Please check for any error messages above and fix these before you can proceed.');
$output.='<br /><br />'.$clang->gT('When checking your installation we found one or more problems. Please check for any error messages above and fix these before you can proceed.');
$output.="<p><button onclick=\"window.open('$scriptname?action=update&amp;subaction=step1', '_top')\"";
$output.=">".$clang->gT('Check again')."</button>";
$output.=">".$clang->gT('Check again')."</button></p>";
}
else
{
$output.='<br />'.$clang->gT('Everything looks alright. Please proceed to the next step.');
$output.='<br /><br />'.$clang->gT('Everything looks alright. Please proceed to the next step.');
$output.="<p><button onclick=\"window.open('$scriptname?action=update&amp;subaction=step2', '_top')\"";
if ($updatekey==''){ $output.="disabled='disabled'"; }
$output.=">".sprintf($clang->gT('Proceed to step %s'),'2')."</button>";
$output.=">".sprintf($clang->gT('Proceed to step %s'),'2')."</button></p>";
}
$output.='</div><table><tr>';
$output.='</div>';
return $output;
}

Expand All @@ -114,7 +114,7 @@ function UpdateStep2()
require_once($homedir."/classes/http/http.php");
$updatekey=getGlobalSetting('updatekey');

$output='<div class="background"><div class="settingcaption">'.$clang->gT('ComfortUpdate Step 2').'</div><br />';
$output='<div class="header">'.$clang->gT('ComfortUpdate Step 2').'</div><div class="updater-background"><br />';

$http=new http_class;
/* Connection timeout */
Expand Down Expand Up @@ -145,7 +145,6 @@ function UpdateStep2()

if (isset($updateinfo['error']))
{
$output='<div class="settingcaption">'.$clang->gT('ComfortUpdate Step 2').'</div><div class="background"><br />';
$output.=$clang->gT('On requesting the update information from limesurvey.org there has been an error:').'<br />';

if ($updateinfo['error']==1)
Expand All @@ -166,8 +165,8 @@ function UpdateStep2()
$output.="<div class='messagebox'>
<div class='warningheader'>".$clang->gT('Update server busy')."</div>
<p>".$clang->gT('The update server seems to be currently busy . This happens most likely if the necessary update files for a new version are prepared.')."<br />
".$clang->gT('Please be patient and try again in about 10 minutes.')."</div>
<p><button onclick=\"window.open('$scriptname?action=globalsettings', '_top')\">".sprintf($clang->gT('Back to global settings'),'4')."</button>";
".$clang->gT('Please be patient and try again in about 10 minutes.')."</p></div>
<p><button onclick=\"window.open('$scriptname?action=globalsettings', '_top')\">".sprintf($clang->gT('Back to global settings'),'4')."</button></p>";

}
else
Expand Down Expand Up @@ -239,13 +238,13 @@ function UpdateStep2()
{
$output.='<br />'.$clang->gT('When checking your file permissions we found one or more problems. Please check for any error messages above and fix these before you can proceed.');
$output.="<p><button onclick=\"window.open('$scriptname?action=update&amp;subaction=step2', '_top')\"";
$output.=">".$clang->gT('Check again')."</button>";
$output.=">".$clang->gT('Check again')."</button></p>";
}
else
{
$output.=$clang->gT('Please check any problems above and then proceed to the next step.').'<br />';
$output.="<p><button onclick=\"window.open('$scriptname?action=update&amp;subaction=step3', '_top')\" ";
$output.=">".sprintf($clang->gT('Proceed to step %s'),'3')."</button>";
$output.=">".sprintf($clang->gT('Proceed to step %s'),'3')."</button></p>";

}
}
Expand All @@ -259,7 +258,7 @@ function UpdateStep3()
{
global $clang, $scriptname, $homedir, $buildnumber, $updatebuild, $debug, $rootdir, $publicdir, $tempdir, $database_exists, $databasetype, $action, $demoModeOnly;

$output='<div class="background"><div class="settingcaption">'.$clang->gT('ComfortUpdate Step 3').'</div>';
$output='<div class="header">'.$clang->gT('ComfortUpdate Step 3').'</div><div class="updater-background">';
$output.='<h3>'.$clang->gT('Creating DB & file backup').'</h3>';
if (!isset( $_SESSION['updateinfo']))
{
Expand Down Expand Up @@ -332,8 +331,8 @@ function UpdateStep3()

$output.=$clang->gT('Please check any problems above and then proceed to the final step.');
$output.="<p><button onclick=\"window.open('$scriptname?action=update&amp;subaction=step4', '_top')\" ";
$output.=">".sprintf($clang->gT('Proceed to step %s'),'4')."</button>";
$output.='</div><table><tr>';
$output.=">".sprintf($clang->gT('Proceed to step %s'),'4')."</button></p>";
$output.='</div>';
return $output;
}

Expand All @@ -342,7 +341,7 @@ function UpdateStep4()
{
global $clang, $scriptname, $homedir, $buildnumber, $updatebuild, $debug, $rootdir, $publicdir, $tempdir, $database_exists, $databasetype, $action, $demoModeOnly;

$output='<div class="background"><div class="settingcaption">'.$clang->gT('ComfortUpdate Step 3').'</div><br />';
$output='<div class="header">'.$clang->gT('ComfortUpdate Step 4').'</div><div class="updater-background"><br />';
if (!isset( $_SESSION['updateinfo']))
{
$output.=$clang->gT('On requesting the update information from limesurvey.org there has been an error:').'<br />';
Expand Down Expand Up @@ -458,7 +457,7 @@ function UpdateStep4()
}


$output.="<p><button onclick=\"window.open('$scriptname?action=globalsettings&amp;subaction=updatecheck', '_top')\" >".$clang->gT('Back to main menu')."</button>";
$output.="<p><button onclick=\"window.open('$scriptname?action=globalsettings&amp;subaction=updatecheck', '_top')\" >".$clang->gT('Back to main menu')."</button></p>";
$output.='</div>';
setGlobalSetting('updatelastcheck','1980-01-01 00:00');
setGlobalSetting('updateavailable','0');
Expand Down

0 comments on commit 8c5f692

Please sign in to comment.