[Phphtmllib-devel] SF.net SVN: phphtmllib:[3205] trunk/open2300
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-01-26 04:16:43
|
Revision: 3205 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3205&view=rev Author: hemna Date: 2009-01-26 04:16:39 +0000 (Mon, 26 Jan 2009) Log Message: ----------- updates to the home ui Modified Paths: -------------- trunk/open2300/.project trunk/open2300/htdocs/css/main.css trunk/open2300/lib/core/page/open2300Page.inc trunk/open2300/lib/modules/home/page/HomePage.inc trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc Added Paths: ----------- trunk/open2300/htdocs/images/top_banner.gif Modified: trunk/open2300/.project =================================================================== --- trunk/open2300/.project 2009-01-26 02:31:26 UTC (rev 3204) +++ trunk/open2300/.project 2009-01-26 04:16:39 UTC (rev 3205) @@ -1,22 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>open2300</name> + <name>wx.hemna.com</name> <comment></comment> <projects> </projects> <buildSpec> - <buildCommand> - <name>org.eclipse.php.core.PhpIncrementalProjectBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.wst.validation.validationbuilder</name> - <arguments> - </arguments> - </buildCommand> </buildSpec> <natures> - <nature>org.eclipse.php.core.PHPNature</nature> </natures> </projectDescription> Modified: trunk/open2300/htdocs/css/main.css =================================================================== --- trunk/open2300/htdocs/css/main.css 2009-01-26 02:31:26 UTC (rev 3204) +++ trunk/open2300/htdocs/css/main.css 2009-01-26 04:16:39 UTC (rev 3205) @@ -1,6 +1,6 @@ body { margin: 0px 0px 0px 0px; - font-size: 12px; + font-size: 12pt; font-family: Verdana, Trebuchet, Helvetica, Sans-Serif; font-weight: normal; font-style: normal; @@ -11,59 +11,40 @@ #phphtmllib { font-family: arial, helvetica; - font-size: 10pt; + font-size: .6em; } -#headerLeft { +#pageheader { background-color: #AFB5FF; - width: 220px; - height: 50px; -} - -#headerRight { - background-color: #AFB5FF; - height: 50px; - width: 560px; -} - -.pageheader { - background-color: #AFB5FF; width: 100%; - height:52px; - padding-top: 2px; + height:150px; + background-image: url('/images/top_banner.gif'); + background-position: top left; } -.navheader { - background-color: #AFB5FF; - width: 100%; - height:19px; - padding-top: 2px; -} +#idPageHeadText { + width: 100%; + text-align:center; + font-size:1.4em; + font-weight:bold; + padding-top:8px; +} -.subheader { - background-color: #5969FF; - width: 100%; - border-top: 2px solid #999999; - border-bottom: 2px solid #999999; -} - #maincontent { background-color:#ffffff; - width:100%; + width:100%; } .leftblock { width: 180px; - padding-top: 10px; - - background-color: #eeeeee; + padding:20px; vertical-align: top; } .rightblock { width: 100%; - padding: 20px 20px 0px 20px; + padding:20px; vertical-align: top; } @@ -71,192 +52,23 @@ width: 100%; } - -#idLeftContent { - position: absolute; - top:80px; - left:20px - width:220px; - padding-left:0px; - vertical-align:top; -} - -#idRightContent { - position:absolute; - top:80px; - left: 220px; - margin-left: 200px; - vertical-align:top; -} - -.headsubtitle { - font-size: 10pt; - font-weight: bold; - background-color: #5969FF; - color: #FFFFFF; - width: 100%; - padding-top: 5px; - padding-bottom: 5px; -} - -#subheadleft { - background-color: #5969FF; - padding: 5px 0px 0px 5px; - margin-bottom: 5px; -} -#subheadright { - background-color: #5969FF; - padding: 5px 5px 0px 0px; - margin-bottom: 5px; -} - -.headseperator { - font-size: 1px; - line-height: 1px; - background-color: #999999; - width: 100%; -} - - - -TD.divider { - width: 1px; - font-size: 1px; - line-height: 1px; - border-left: 1px dashed #999999; -} - - -.infoboxBar { - font-size: 1px; - height: 12px; - background-color: #000000; - margin-bottom: 3px; -} - - -.newsheader { - background-color: #f1f1f1; - padding: 5px 5px 5px 5px; - margin: 0px -5px 0px -5px; - height: 15px; -} - -.infoboxHeader { - font: 10px Verdana; - color: #fff; - margin-left: 5px; -} - -.infoboxitem { - font-size: 10px; - line-height: 20px; -} - -.infoboxbody { - border: 1px solid #c0c0c0; - padding: 5px 5px 5px 5px; -} - -.outline { - border: 1px solid #c0c0c0; -} - -.quotebox { - margin: 0px 10px 0px 5px; - line-height: 16px; - padding: 15px; - text-align: justify; - background-color: #fffdf1; - border: 1px dashed #000000; -} - -.codebox { - font-size: 12px; - line-height: 16px; - font-weight: normal; - font-style: normal; - color: #000000; - text-align: left; - margin: 0px 10px 0px 5px; - padding: 15px; - background-color: #f1f1f1; -} - -.threadmap { - font-size: 11px; - line-height: 20px; - /* font-size: 11px; - line-height: 20px; */ -} - - -.articleinfo { - height:100px; - font-size: 10px; -} - -.required { - color: #CC0000; -} - - -.toolbar-button { - background-color: #F1F1F1; - border: 1px solid buttonface; - margin: 1px; -} - -.toolbar-raised { - border-top: 1px solid buttonhighlight; - border-left: 1px solid buttonhighlight; - border-bottom: 1px solid buttonshadow; - border-right: 1px solid buttonshadow; - background-color: #F1F1F1; - margin: 1px; -} - -.toolbar-pressed { - border-top: 1px solid buttonshadow; - border-left: 1px solid buttonshadow; - border-bottom: 1px solid buttonhighlight; - border-right: 1px solid buttonhighlight; - background-color: #F1F1F1; - margin: 1px; -} - -.ulist { - font-size: 10pt; - line-height: 12pt; -} - - -.h1 { - font-family: arial; - font-size: 1.5em; - font-weight: bold; - color: #999999; -} - -.h2 { - font-family: arial; - font-size: 1.2em; - font-weight: bold; - color: #000000; -} - .wx { padding:2px; background-color: #eeeeee; - border: 1px solid #aaaaaa; - + border: 1px solid #aaaaaa; } +#idCurrentConditions { + font-size: .6em; +} + #idCurrentConditionscontents{ border: 1px solid #000088; } #idCurrentConditionscontents .cctitle { + font-size: .8em; + font-weight:bold; background-color: #000088; color: #ffffff; padding:2px; @@ -280,7 +92,7 @@ .datalist_col_head { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; font-weight: bold; color: #000000; background-color: #eeeeee; @@ -299,14 +111,14 @@ .datalist_col_head a.head_link:active,a.head_link:visited,a.head_link:link { color: #000000; font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; font-weight: bold; text-decoration: none; } .datalist_col_head_hover { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; font-weight: bold; color: #000000; background-color: #4054AB; @@ -324,7 +136,7 @@ .datalist_col_head_clicked { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; font-weight: bold; color: #000000; background-color: #4054AB; @@ -346,7 +158,7 @@ .datalist_title { font-family: arial; - font-size: 10pt; + font-size: .8em; font-weight: bold; color: #ffffff; background-color: #000088; @@ -368,7 +180,7 @@ .datalist_search_block { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; padding-left: 5px; padding-bottom:6px; padding-right:40px; @@ -380,7 +192,7 @@ .datalist_data_cell { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; background-color: #ffffff; padding-left: 3px; padding-right: 3px; @@ -390,7 +202,7 @@ .datalist_data_cell_selected { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; background-color: #f7f7f7; padding-left: 3px; padding-right: 3px; @@ -399,7 +211,7 @@ .datalist_data_cell_odd { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; background-color: #fafafa; padding-left: 3px; padding-right: 3px; @@ -408,7 +220,7 @@ } .datalist_data_cell_odd_selected { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; background-color: #f7f7f7; padding-left: 3px; padding-right: 3px; @@ -422,7 +234,7 @@ .datalist_actionbar_data_cell { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; background: #efefef; padding-left: 3px; padding-right: 3px; @@ -448,5 +260,5 @@ .datalist_font8 { font-family: arial, helvetica, sans-serif; - font-size: 10pt; + font-size: .8em; } Added: trunk/open2300/htdocs/images/top_banner.gif =================================================================== (Binary files differ) Property changes on: trunk/open2300/htdocs/images/top_banner.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/open2300/lib/core/page/open2300Page.inc =================================================================== --- trunk/open2300/lib/core/page/open2300Page.inc 2009-01-26 02:31:26 UTC (rev 3204) +++ trunk/open2300/lib/core/page/open2300Page.inc 2009-01-26 04:16:39 UTC (rev 3205) @@ -120,10 +120,9 @@ } protected function header_block() { - $header = DIVtag::factory(); - $header->set_class("pageheader"); + $header = new DIVtag(array('id' => 'pageheader')); - $header->add( new DIVtag(array('style' => 'text-align:center; size:12pt; font-weight:bold;padding-top:5px;'),"Hemna's Weather Station.") ); + $header->add( new DIVtag(array('id' => 'idPageHeadText'),"Hemna's Weather Station.") ); return $header; } @@ -140,11 +139,12 @@ $main->set_id("maincontent"); $table = TABLEtag::factory("100%", 0); - $left_div = DIVtag::factory("", $this->left_block() ); - $table->add_row( /*TDtag::factory("leftblock", "", $left_div ), - TDtag::factory("divider", "", " "),*/ + $table->add_row( TDtag::factory("leftblock", "", $this->left_block() ), TDtag::factory("rightblock", "", $this->content_block() )); + + $table->add_row(new TDtag(array("colspan"=> 2), + $this->footer_block())); $main->add( $table ); return $main; @@ -166,12 +166,6 @@ $this->add( html_comment( "MAIN BODY BLOCK BEGIN") ); $this->add( $this->main_block() ); $this->add( html_comment( "MAIN BODY BLOCK END") ); - - //add the footer area. - $this->add( html_comment( "FOOTER BLOCK BEGIN") ); - $this->add( $this->footer_block() ); - $this->add( html_comment( "FOOTER BLOCK END") ); - } /** @@ -218,7 +212,10 @@ $p->set_tag_attributes( array("align" => "center") ); $footer_div->add($p); - return $footer_div; + return Container::factory( + html_comment( "FOOTER BLOCK BEGIN") + $footer_div, + html_comment( "FOOTER BLOCK END")); } Modified: trunk/open2300/lib/modules/home/page/HomePage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/HomePage.inc 2009-01-26 02:31:26 UTC (rev 3204) +++ trunk/open2300/lib/modules/home/page/HomePage.inc 2009-01-26 04:16:39 UTC (rev 3205) @@ -11,14 +11,39 @@ class HomePage extends open2300Page { + private $wx = null; + function __construct() { parent::__construct('Hemna WX Station'); + $this->wx = weatherDataObject::find("1=1 order by datetime desc"); } public function request_vars() { return array(); } + + /** + * + */ + function left_block() { + + $container = Container::factory(); + $script = SCRIPTtag::factory(); + $script->add("Event.observe(window, 'load', start_updates);"); + + $container->add($script); + + $left_div = new DIVtag(array('id'=> '')); + + $left_div->add(new DIVtag(array('style' => "width: 320px;"),new CurrentConditions($this->wx))); + $left_div->add(BRtag::factory(2)); + $left_div->add('<object width="290" height="130"><param name="movie" value="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=KCASANJO77&camurl=http://icons.wunderground.com/webcamramdisk/h/e/hemna/1/current.jpg&freq=2.5&units=english&lang=EN" /><param name="quality" value="high"><embed src="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=KCACOOL3&camurl=http://icons.wunderground.com/webcamramdisk/h/e/hemna/1/current.jpg&freq=2.5&units=english&lang=EN" type="application/x-shockwave-flash" width="300" height="290" /></object>'); + + $container->add($left_div); + + return $container; + } /** @@ -27,21 +52,9 @@ * * @param Container object */ - function content_block() { - - $container = Container::factory(); - $container->add(' ', BRtag::factory(3)); - - $wx = weatherDataObject::find("1=1 order by datetime desc"); - - $left_div = new DIVtag(array('id'=> 'idLeftContent')); - - $left_div->add(new DIVtag(array('style' => "width: 320px;"),new CurrentConditions($wx))); - $left_div->add(BRtag::factory(2)); - $left_div->add('<object width="290" height="130"><param name="movie" value="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=KCASANJO77&camurl=http://icons.wunderground.com/webcamramdisk/h/e/hemna/1/current.jpg&freq=2.5&units=english&lang=EN" /><param name="quality" value="high"><embed src="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=KCACOOL3&camurl=http://icons.wunderground.com/webcamramdisk/h/e/hemna/1/current.jpg&freq=2.5&units=english&lang=EN" type="application/x-shockwave-flash" width="300" height="290" /></object>'); - + function content_block() { //add some graphs - $right_div = new DIVtag(array('id' => 'idRightContent')); + $right_div = new DIVtag(array('id' => '')); $img = IMGtag::factory(RequestBuilder::build_url('TempDewPointLineGraph')); $img->set_id('idTempDewLineGraph'); @@ -57,16 +70,9 @@ $rain_img = IMGtag::factory(RequestBuilder::build_url('RainLineGraph')); $rain_img->set_id('idRainLineGraph'); - $right_div->add(new DIVtag(array('id' => 'idRainLineGraphdiv', 'style'=> 'padding-top:10px;padding-bottom:10px;height:201px;'),$rain_img)); - - $container->add($left_div, $right_div); - - $script = SCRIPTtag::factory(); - $script->add("Event.observe(window, 'load', start_updates);"); - - $container->add($script); + $right_div->add(new DIVtag(array('id' => 'idRainLineGraphdiv', 'style'=> 'padding-top:10px;padding-bottom:10px;height:201px;'),$rain_img)); - return $container; + return $right_div; } } Modified: trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc =================================================================== --- trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc 2009-01-26 02:31:26 UTC (rev 3204) +++ trunk/open2300/lib/modules/home/widgets/MetarTextCurrentConditions.inc 2009-01-26 04:16:39 UTC (rev 3205) @@ -38,7 +38,7 @@ } } - public function render($indent_level=0, $output_debug=0) { + public function render($indent_level=0, $output_debug=0) { $metar = $GLOBALS['config']->get('station_name'); @@ -49,12 +49,17 @@ $stmt = $db->queryBindOneRowCache("Select min(temp_out) as low, max(temp_out) as high from weather where datetime like :date", array(":date" => $today.'%')); //if (class_exists("DateTime")) { - if ($GLOBALS['config']->get('has_date_time', FALSE)) { + if (FALSE && $GLOBALS['config']->get('has_date_time', FALSE)) { $cur_date = new DateTime($this->wx->get_datetime()); $cur_date->setTimezone(new DateTimeZone("UTC")); $metar .= " ".$cur_date->format("dHi")."Z"; } else { - $metar .= " 000000Z"; + //try using PEAR's Date object + include_once("Date.php"); + $cur_date = new Date($this->wx->get_datetime()); + + $cur_date->convertTZByID("GMT"); + $metar .= " ".$cur_date->format("%d%H%M")."Z"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |