many improvements in frontend

git-svn-id: file:///home/jan/tmp/wetterstation/trunk@120 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
losinshi 2006-09-21 00:04:31 +00:00
parent 641b4efa29
commit 11bb95d185
18 changed files with 131 additions and 42 deletions

View File

@ -1 +1,5 @@
<center>
<div class="set" id="chart">
{content:addChart:only}
</div>
</center>

View File

@ -1 +1,14 @@
{content:addModule:wind_2}{content:addModule:press_1}{content:addModule:hum_1}{content:addModule:hum_4}{content:addModule:rain_3}{content:addModule:temp_1}{content:addModule:temp_4}
<center>
<div class="set">
{content:addModule:temp_1}
{content:addModule:hum_1}
{content:addModule:press_1}
<br>
{content:addModule:temp_4}
{content:addModule:hum_4}
<br>
{content:addModule:wind_2}
<br>
{content:addModule:rain_3}
</div>
</center>

View File

@ -1 +1,5 @@
<center>
<div class="set" id="report">
{content:addReport:standard}
</div>
</center>

View File

@ -1,7 +1,7 @@
<h3 class="mod_headline">Sensor {content:fill:sens_id} - {content:fill:sens_location}</h3>
<ul class="val_list">
<li class="val_elm">
<a href="{content:addSetLink:full}" class="mod_small_link">
<a href="{content:addSetLink:full}#temp_{content:fill:sens_id}" class="mod_small_link">
<div class="mod_header">
<h4 class="mod_subheadline">Temparatur</h4>
</div>
@ -15,7 +15,7 @@
</a>
</li>
<li class="val_elm">
<a href="{content:addSetLink:full}" class="mod_small_link">
<a href="{content:addSetLink:full}#hum_{content:fill:sens_id}" class="mod_small_link">
<div class="mod_header">
<h4 class="mod_subheadline">Luftfeuchte</h4>
</div>

View File

@ -1,4 +1,6 @@
<h3 class="mod_headline">Luftfeuchtigkeit - {content:fill:sens_location}</h3>
<a name="hum_{content:fill:sens_id}">
<h3 class="mod_headline">Luftfeuchtigkeit - {content:fill:sens_location}</h3>
</a>
<p class="mod_description">{content:fill:sens_description}</p>
<div class="mod_subsec">
<h4 class="mod_subhead">Momentane Werte</h4>

View File

@ -1,7 +1,7 @@
<h3 class="mod_headline">Sensor {content:fill:sens_id} - {content:fill:sens_location}</h3>
<ul class="val_list">
<li class="val_elm">
<a href="{content:addSetLink:full}" class="mod_small_link">
<a href="{content:addSetLink:full}#temp_{content:fill:sens_id}" class="mod_small_link">
<div class="mod_header">
<h4 class="mod_subheadline">Temparatur</h4>
</div>
@ -15,7 +15,7 @@
</a>
</li>
<li class="val_elm">
<a href="{content:addSetLink:full}" class="mod_small_link">
<a href="{content:addSetLink:full}#hum_{content:fill:sens_id}" class="mod_small_link">
<div class="mod_header">
<h4 class="mod_subheadline">Luftfeuchte</h4>
</div>
@ -29,7 +29,7 @@
</a>
</li>
<li class="val_elm">
<a href="{content:addSetLink:full}" class="mod_small_link">
<a href="{content:addSetLink:full}#press_{content:fill:sens_id}" class="mod_small_link">
<div class="mod_header">
<h4 class="mod_subheadline">Luftdruck</h4>
</div>
@ -38,7 +38,7 @@
<span class="mod_av">(&Oslash; {content:fill:press_av_value}hPa)</span>
</div>
<div class="mod_footer">
<nobr><span class="mod_max">max: {content:fill:press_max_val}hPa</span><span class="mod_min">min: {content:fill:press_min_val}0hPa</span></nobr>
<nobr><span class="mod_max">max: {content:fill:press_max_val}hPa</span><span class="mod_min">min: {content:fill:press_min_val}hPa</span></nobr>
</div>
</a>
</li>

View File

@ -1,4 +1,6 @@
<h3 class="mod_headline">Luftdruck - {content:fill:sens_location}</h3>
<a name="press_{content:fill:sens_id}">
<h3 class="mod_headline">Luftdruck - {content:fill:sens_location}</h3>
</a>
<p class="mod_description">{content:fill:sens_description}</p>
<div class="mod_subsec">
<h4 class="mod_subhead">Momentane Werte</h4>

View File

@ -1,4 +1,6 @@
<h3 class="mod_headline">Regen - {content:fill:sens_location}</h3>
<a name="rain_{content:fill:sens_id}">
<h3 class="mod_headline">Regen - {content:fill:sens_location}</h3>
</a>
<p class="mod_description">{content:fill:sens_description}</p>
<div class="mod_subsec">
<h4 class="mod_subhead">Aktuelle Werte</h4>

View File

@ -1,7 +1,7 @@
<h3 class="mod_headline">Sensor {content:fill:sens_id} - {content:fill:sens_location}</h3>
<ul class="val_list">
<li class="val_elm">
<a href="{content:addSetLink:full}" class="mod_small_link">
<a href="{content:addSetLink:full}#rain_{content:fill:sens_id}" class="mod_small_link">
<div class="mod_header">
<h4 class="mod_subheadline">Regen</h4>
</div>

View File

@ -1,4 +1,6 @@
<h3 class="mod_headline">Temperatur - {content:fill:sens_location}</h3>
<a name="temp_{content:fill:sens_id}">
<h3 class="mod_headline">Temperatur - {content:fill:sens_location}</h3>
</a>
<p class="mod_description">{content:fill:sens_description}</p>
<div class="mod_subsec">
<h4 class="mod_subhead">Momentane Werte</h4>

View File

@ -1,4 +1,6 @@
<h3 class="mod_headline">Wind - {content:fill:sens_location}</h3>
<a name="wind_{content:fill:sens_id}">
<h3 class="mod_headline">Wind - {content:fill:sens_location}</h3>
</a>
<p class="mod_description">{content:fill:sens_description}</p>
<div class="mod_subsec">
<h4 class="mod_subhead">Momentane Werte</h4>

View File

@ -1,7 +1,7 @@
<h3 class="mod_headline">Sensor {content:fill:sens_id} - {content:fill:sens_location}</h3>
<ul class="val_list">
<li class="val_elm">
<a href="{content:addSetLink:full}" class="mod_small_link">
<a href="{content:addSetLink:full}#wind_{content:fill:sens_id}" class="mod_small_link">
<div class="mod_header">
<h4 class="mod_subheadline">Wind</h4>
</div>

View File

@ -1,11 +1,13 @@
{content:part:top}
{content:addModule:auto}
<br>
<div class="report">
<h3 class="report_head">Report:</h3>
<div class="rpt_subsec">
{content:part:end}
...Hier die Tabelle...
{content:part:bottom}
</div>
</div>

View File

@ -4,12 +4,27 @@ body {
}
div.module, div.chart, div.report {
border-color: #006600;
border-style: solid;
border-width: 1px;
background: #FDDDAD;
padding: 3px;
margin: 2px;
border-color: #006600;
border-style: solid;
border-width: 1px;
background: #FDDDAD;
padding: 3px;
margin: 2px;
position:relative;
}
div.module {
width:643px;
text-align:left;
}
div.report {
width:443px;
}
div.report {
text-align:center;
overflow:hidden;
}
div.module table tr td {
@ -41,6 +56,17 @@ div.module h3.mod_headline, div.report h3.report_head, div.chart h3.chart_headli
color: #222222;
}
div.report h3.report_head {
width:100%;
text-align:left;
}
div.chart h3.chart_headline {
width:100%;
text-align:left;
}
div.module h4.mod_subhead {
margin-top:2px;
margin-left:2px;
@ -121,11 +147,13 @@ div.module div.mod_subsec div.chart_link_div a.chart_link img.chart_link_prev {
div.back_link_div {
background: #fafafa;
border: 1px solid #aa8888;
position: absolute;
position: relative;
display:block;
padding: 3px;
margin:5px;
left: 0px;
bottom: 0px:
height:20px;
width:80px;
margin-top:20px;
}
div.back_link_div a.back_link {
@ -138,19 +166,15 @@ div.back_link_div a.back_link {
}
div.chart {
overflow:auto;
overflow:hidden;
padding:10px;
text-align: center;
width: 820px;
width:816px;
}
div.report {
/* width:400px;*/
}
div.report div.rpt_subsec {
width:350px;
width:400px;
padding: 10px
}
@ -179,25 +203,29 @@ div.report div.rpt_subsec table.report_table tr.report_line:hover {
background: #FFb696;
}
div.small_set {
div.small_set, div.set {
border-color: #D0B080;
border-style: dotted;
border-width: 1px;
padding: 8px;
padding-left: 8px;
padding-right: 8px;
padding-top: 8px;
padding-bottom: 8px;
position:relative;
width:660px;
width:659px;
}
div.set#chart {
width: 845px;
}
div.small_set div.module {
margin:2px;
background: #FFEBBB;
position:relative;
height:135px;
overflow:hidden;
text-align:center;
}
div.small_set div.module {
width: 643px;
height:155px;
}

View File

@ -1,5 +1,6 @@
<?
include_once("php_inc/config.inc.php");
include_once("php_inc/module_set.inc.php");
class Chart{
@ -19,7 +20,7 @@ class Chart{
$buff = '<div class="chart_link_div">';
$buff .= '<a href="';
$buff .= $_SERVER['PHP_SELF'].'?setType='.$chartArray[4]."&chartName=".$chartName;
$buff .= ModuleSet::buildArgLink(array("setType"=>$chartArray[4], "chartName"=>$chartName));
$buff .= '" class="chart_link">';
$buff .= $chartArray[1];

View File

@ -112,7 +112,7 @@ class Module{
}
function addSetLink($setName){
return $_SERVER['PHP_SELF'].'?setType='.$setName;
return ModuleSet::buildArgLink(array("setType"=>$setName));
}
}

View File

@ -65,13 +65,39 @@ class ModuleSet{
}
function getBackLink(){
$buff = '<div class="back_link_div">';
$buff = '<center>';
$buff .= '<div class="back_link_div">';
$buff .= '<a class="back_link" href="';
$buff .= $_SERVER['HTTP_REFERER'];
$buff .= '">';
$buff .= 'zur&uuml;ck';
$buff .= "</a>";
$buff .= "</div>";
$buff .= '</center>';
return $buff;
}
function addSetLink($setName){
return ModuleSet::buildArgLink(array("setType"=>$setName));
}
function buildArgLink($optArray){
$tempArg = $_GET;
foreach ($optArray as $key => $value){
$tempArg[$key] = $value;
}
$buff = $_SERVER['PHP_SELF'];
$i = 1;
foreach ($tempArg as $key => $value){
if($i){
$i--;
$buff .= '?'.$key.'='.$value;
} else {
$buff .= '&'.$key.'='.$value;
}
}
return $buff;
}

View File

@ -1,5 +1,6 @@
<?
include_once("php_inc/config.inc.php");
include_once("php_inc/module_set.inc.php");
class Report{
@ -120,7 +121,7 @@ class Report{
$buff = '<div class="report_link_div">';
$buff .= '<a href="';
$buff .= $_SERVER['PHP_SELF'].'?setType='.$rptArray[12]."&rptName=".$rptName;
$buff .= ModuleSet::buildArgLink(array("setType"=>$rptArray[12], "rptName"=>$rptName));
$buff .= '" class="report_link">';
$buff .= $rptArray[0];