[Phphtmllib-devel] SF.net SVN: phphtmllib:[3363] trunk/open2300/lib
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2010-02-24 02:08:05
|
Revision: 3363 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3363&view=rev Author: hemna Date: 2010-02-24 02:07:59 +0000 (Wed, 24 Feb 2010) Log Message: ----------- fixed menus Modified Paths: -------------- trunk/open2300/lib/core/page/open2300Page.inc trunk/open2300/lib/modules/home/page/HomePage.inc trunk/open2300/lib/modules/wxdate/page/WxDate.inc Modified: trunk/open2300/lib/core/page/open2300Page.inc =================================================================== --- trunk/open2300/lib/core/page/open2300Page.inc 2010-02-24 02:07:07 UTC (rev 3362) +++ trunk/open2300/lib/core/page/open2300Page.inc 2010-02-24 02:07:59 UTC (rev 3363) @@ -40,6 +40,8 @@ * Where the nav blocks go */ const ID_NAV = 'leftBlock'; + + protected $centering_width = "500px"; /** * This is the constructor. @@ -123,13 +125,18 @@ } protected function header_block() { - $header = new DIVtag(array('id' => 'pageheader')); + $header = new Container(); $header->add( new DIVtag(array('id' => 'idPageHeadText'),"Hemna's Weather Station"), - new DIVtag(array('id' => 'idPageSubHeadText'),"Pilot Hill, CA"), - new DIVtag(array('id' => self::ID_MENU), $this->menu_block()) ); + new DIVtag(array('id' => 'idPageSubHeadText'),"Pilot Hill, CA") + ); - return $header; + $table = TABLEtag::factory("1024",0,0,0,"center"); + + $table->add_row(new TDtag(array("id" => "pageheader"), + $header)); + $table->add_row(new TDtag(array('id' => self::ID_MENU), $this->menu_block())); + return $table; } /** @@ -159,8 +166,8 @@ */ protected function main_block() { - $main = new DIVtag(); - $main->set_id(self::ID_BODY); + $main = new DIVtag(array("id" => self::ID_BODY, + "style" => "width: ".$this->centering_width."; margin-left: auto; margin-right:auto;")); $table = TABLEtag::factory("100%", 0); Modified: trunk/open2300/lib/modules/home/page/HomePage.inc =================================================================== --- trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-24 02:07:07 UTC (rev 3362) +++ trunk/open2300/lib/modules/home/page/HomePage.inc 2010-02-24 02:07:59 UTC (rev 3363) @@ -12,6 +12,8 @@ class HomePage extends open2300Page { private $wx = null; + + protected $centering_width = "1400px"; function __construct() { @@ -21,25 +23,8 @@ public function request_vars() { return array(); - } + } - protected function main_block() { - - $main = new DIVtag(array("id" => self::ID_BODY, - "style" => "width: 1400px; margin-left: auto; margin-right:auto;")); - - $table = TABLEtag::factory("100%", 0); - - $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; - } - /** * */ Modified: trunk/open2300/lib/modules/wxdate/page/WxDate.inc =================================================================== --- trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-24 02:07:07 UTC (rev 3362) +++ trunk/open2300/lib/modules/wxdate/page/WxDate.inc 2010-02-24 02:07:59 UTC (rev 3363) @@ -11,6 +11,8 @@ private $wx = null; private $wxdate = null; + protected $centering_width = "810px"; + function __construct() { parent::__construct('Hemna WX Station'); @@ -22,26 +24,6 @@ Log::singleton()->debug("use date of ".$this->wxdate); } - - - - protected function main_block() { - - $main = new DIVtag(array("id" => self::ID_BODY, - "style" => "width: 810px; margin-left: auto; margin-right:auto;")); - - $table = TABLEtag::factory("100%", 0); - - $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; - } - protected function left_block() { global $config; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |