[Phphtmllib-devel] SF.net SVN: phphtmllib:[3395] trunk/open2300/lib
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2010-02-27 18:47:34
|
Revision: 3395 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3395&view=rev Author: hemna Date: 2010-02-27 18:47:26 +0000 (Sat, 27 Feb 2010) Log Message: ----------- fixed datalist Modified Paths: -------------- trunk/open2300/lib/autoload.inc trunk/open2300/lib/modules/home/datalist/WXDataList.inc trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc Modified: trunk/open2300/lib/autoload.inc =================================================================== --- trunk/open2300/lib/autoload.inc 2010-02-27 18:34:40 UTC (rev 3394) +++ trunk/open2300/lib/autoload.inc 2010-02-27 18:47:26 UTC (rev 3395) @@ -1,7 +1,7 @@ <?php /** * This is an auto-generated file. Please do not modify! - * Generated on 2010-02-25T19:54:06-08:00 by AutoloadGenerator + * Generated on 2010-02-27T10:41:33-08:00 by AutoloadGenerator * * @package open2300 */ @@ -270,6 +270,7 @@ 'dark-blue-theme'=>'DarkBlueTheme', 'debug-panel-w'=>'DebugPanelWidget', 'dialog-w'=>'DialogWidget', +'dl'=>'WeatherDataListPage', 'error-box-w'=>'ErrorBoxWidget', 'exception-error'=>'ExceptionErrorPage', 'footer-nav'=>'FooterNav', @@ -319,7 +320,6 @@ 'ticker'=>'TickerConditions', 'tree-item-w'=>'TreeItemWidget', 'vertical-c-s-s-nav-table'=>'VerticalCSSNavTable', -'weather-dl'=>'WeatherDataListPage', 'web-cam'=>'WebCam', 'wind-flash-graph'=>'WindFlashGraph', 'wind-speed-line-graph'=>'WindSpeedLineGraph', @@ -352,6 +352,7 @@ 'DarkBlueTheme'=>'dark-blue-theme', 'DebugPanelWidget'=>'debug-panel-w', 'DialogWidget'=>'dialog-w', +'WeatherDataListPage'=>'dl', 'ErrorBoxWidget'=>'error-box-w', 'ExceptionErrorPage'=>'exception-error', 'FooterNav'=>'footer-nav', @@ -401,7 +402,6 @@ 'TickerConditions'=>'ticker', 'TreeItemWidget'=>'tree-item-w', 'VerticalCSSNavTable'=>'vertical-c-s-s-nav-table', -'WeatherDataListPage'=>'weather-dl', 'WebCam'=>'web-cam', 'WindFlashGraph'=>'wind-flash-graph', 'WindSpeedLineGraph'=>'wind-speed-line-graph', Modified: trunk/open2300/lib/modules/home/datalist/WXDataList.inc =================================================================== --- trunk/open2300/lib/modules/home/datalist/WXDataList.inc 2010-02-27 18:34:40 UTC (rev 3394) +++ trunk/open2300/lib/modules/home/datalist/WXDataList.inc 2010-02-27 18:47:26 UTC (rev 3395) @@ -40,7 +40,7 @@ $this->process_action(); - $this->add_header_item(self::LABEL_DATE, "100", "datetime", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE, "left"); + $this->add_header_item(self::LABEL_DATE, "120", "datetime", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE, "left"); $this->add_header_item(self::LABEL_OUT_TEMP, "20", "temp_out", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); $this->add_header_item(self::LABEL_DEWPOINT, "20", "dewpoint", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); $this->add_header_item(self::LABEL_WINDSPEED, "20", "wind_speed", HTMLDataList::SORTABLE, HTMLDataList::SEARCHABLE,"center"); @@ -79,13 +79,14 @@ $obj = $row_data['wind_speed'] . " mph"; break; - case self::LABEL_OUT_TEMP: + /* case self::LABEL_OUT_TEMP: $obj = $row_data['temp_out']. " F / ". WXConversion::fahrenheit_to_celsius($row_data['temp_out']). " C"; break; case self::LABEL_DEWPOINT: $obj = $row_data['dewpoint']. " F / ". WXConversion::fahrenheit_to_celsius($row_data['dewpoint']). " C"; break; + */ default: $obj = parent::build_column_item($row_data, $col_name); Modified: trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc 2010-02-27 18:34:40 UTC (rev 3394) +++ trunk/open2300/lib/modules/home/page/WeatherDataListPage.inc 2010-02-27 18:47:26 UTC (rev 3395) @@ -4,6 +4,10 @@ */ class WeatherDataListPage extends open2300Page { + + const ID = "dl"; + + protected $centering_width = "900px"; /** * Class Constructor @@ -13,6 +17,22 @@ parent::__construct('Hemna WX Station'); } +protected function main_block() { + + $main = new DIVtag(array("id" => self::ID_BODY, + "style" => "width: ".$this->centering_width."; margin-left: auto; margin-right:auto;")); + + $table = TABLEtag::factory("100%", 0); + + $table->add_row( TDtag::factory("", "", $this->content_block() )); + + $table->add_row(new TDtag(array(), + $this->footer_block())); + $main->add( $table ); + + return $main; + } + /** * build the main content for the page * and return it all inside a container object @@ -21,22 +41,13 @@ */ function content_block() { - $container = Container::factory(); - $container->add(' ', BRtag::factory(3)); - - $wx = weatherDataObject::find("1=1 order by datetime desc limit 0,1"); + $container = Container::factory(); - $left_div = new DIVtag(array('id'=> 'idLeftContent')); - - $left_div->add(new DIVtag(array('style' => "width: 300px;"),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&freq=2.5&units=english&lang=EN" /><embed src="http://www.wunderground.com/swf/pws_mini_rf_nc.swf?station=KCASANJO77&freq=2.5&units=english&lang=EN" type="application/x-shockwave-flash" width="290" height="130" /></object>'); - //add some graphs $right_div = new DIVtag(array('id' => 'idRightContent')); $right_div->add(new WXDataList); - $container->add($left_div, $right_div); + $container->add($right_div); $script = SCRIPTtag::factory(); $script->add("Event.observe(window, 'load', start_weather_dl_updates);"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |