summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
authorxue <>2006-02-09 14:32:13 +0000
committerxue <>2006-02-09 14:32:13 +0000
commit47088abad9dbdd4ea24180753fa47ea3e363390c (patch)
tree966c86862df4eb6bfd964fdbb7649d0eba1e8526 /demos/quickstart
parentaa46c9ab78abdd23c273c5e49b402a87a2aefcdb (diff)
Added Printer-friendly version of quickstart tutorial.
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/controls/Layout.php25
-rw-r--r--demos/quickstart/protected/controls/Layout.tpl8
-rw-r--r--demos/quickstart/protected/controls/SampleLayout.php12
-rw-r--r--demos/quickstart/themes/PradoSoft/style.css6
4 files changed, 28 insertions, 23 deletions
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.='&notheme=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 @@
<div class="image"></div>
</div>
-<div id="menu">
+<com:TPanel ID="MainMenu" CssClass="mainmenu">
<a href="?">Home</a> |
<a href="http://www.pradosoft.com">PradoSoft.com</a> |
-<a href="prado3_quick_start.pdf">Download in PDF</a> |
-<com:TLinkButton Text="Hide TOC" OnClick="toggleTopicPanel" />
-</div>
+<a href="prado3_quick_start.pdf">PDF Version</a> |
+<com:THyperLink ID="PrinterLink" Text="Printer-friendly Version" />
+</com:TPanel>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
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
diff --git a/demos/quickstart/themes/PradoSoft/style.css b/demos/quickstart/themes/PradoSoft/style.css
index e054d05a..df8d1e19 100644
--- a/demos/quickstart/themes/PradoSoft/style.css
+++ b/demos/quickstart/themes/PradoSoft/style.css
@@ -68,7 +68,7 @@ a
-#menu {
+.mainmenu {
padding:10px;
padding-right:10px;
background:#EDEDED;
@@ -79,12 +79,12 @@ a
font-size: 9pt;
}
-#menu a {
+.mainmenu a {
color:#737373;
text-decoration:none;
}
-#menu a:hover {
+.mainmenu a:hover {
color: #FF0000;
}