From 47088abad9dbdd4ea24180753fa47ea3e363390c Mon Sep 17 00:00:00 2001 From: xue <> Date: Thu, 9 Feb 2006 14:32:13 +0000 Subject: Added Printer-friendly version of quickstart tutorial. --- demos/quickstart/protected/controls/Layout.php | 25 +++++++++++++++++----- demos/quickstart/protected/controls/Layout.tpl | 8 +++---- .../quickstart/protected/controls/SampleLayout.php | 12 +---------- 3 files changed, 25 insertions(+), 20 deletions(-) (limited to 'demos/quickstart/protected/controls') diff --git a/demos/quickstart/protected/controls/Layout.php b/demos/quickstart/protected/controls/Layout.php index a82d2fff..21eb764e 100644 --- a/demos/quickstart/protected/controls/Layout.php +++ b/demos/quickstart/protected/controls/Layout.php @@ -2,13 +2,28 @@ class Layout extends TTemplateControl { - public function toggleTopicPanel($sender,$param) + public function __construct() { - $this->TopicPanel->Visible=!$this->TopicPanel->Visible; - if($this->TopicPanel->Visible) - $sender->Text="Hide TOC"; + if(isset($this->Request['notheme'])) + $this->Service->RequestedPage->EnableTheming=false; + parent::__construct(); + } + + public function onLoad($param) + { + parent::onLoad($param); + $url=$this->Request->RequestUri; + if(strpos($url,'?')===false) + $url.='index.php?notheme=true'; else - $sender->Text="Show TOC"; + $url.='¬heme=true'; + $this->PrinterLink->NavigateUrl=$url; + + if(isset($this->Request['notheme'])) + { + $this->MainMenu->Visible=false; + $this->TopicPanel->Visible=false; + } } } diff --git a/demos/quickstart/protected/controls/Layout.tpl b/demos/quickstart/protected/controls/Layout.tpl index 52eb08f5..6d56b490 100644 --- a/demos/quickstart/protected/controls/Layout.tpl +++ b/demos/quickstart/protected/controls/Layout.tpl @@ -12,12 +12,12 @@
- +PDF Version | + + diff --git a/demos/quickstart/protected/controls/SampleLayout.php b/demos/quickstart/protected/controls/SampleLayout.php index 2224572a..a89b905d 100644 --- a/demos/quickstart/protected/controls/SampleLayout.php +++ b/demos/quickstart/protected/controls/SampleLayout.php @@ -2,22 +2,12 @@ class SampleLayout extends TTemplateControl { - public function __construct() { - if(isset($this->Request['functionaltest'])) + if(isset($this->Request['notheme'])) $this->Service->RequestedPage->EnableTheming=false; parent::__construct(); } - - public function toggleTopicPanel($sender,$param) - { - $this->TopicPanel->Visible=!$this->TopicPanel->Visible; - if($this->TopicPanel->Visible) - $sender->Text="Hide TOC"; - else - $sender->Text="Show TOC"; - } } ?> \ No newline at end of file -- cgit v1.2.3