summaryrefslogtreecommitdiff
path: root/demos/controls/protected
diff options
context:
space:
mode:
Diffstat (limited to 'demos/controls/protected')
-rw-r--r--demos/controls/protected/pages/HomePage.php7
-rw-r--r--demos/controls/protected/pages/config.xml2
-rw-r--r--demos/controls/protected/themes/BlueTheme/buttons.skin2
-rw-r--r--demos/controls/protected/themes/BlueTheme/labels.skin2
4 files changed, 12 insertions, 1 deletions
diff --git a/demos/controls/protected/pages/HomePage.php b/demos/controls/protected/pages/HomePage.php
index 4cfc3b0a..6c69e44b 100644
--- a/demos/controls/protected/pages/HomePage.php
+++ b/demos/controls/protected/pages/HomePage.php
@@ -2,6 +2,13 @@
class HomePage extends TPage
{
+ public function onPreInit($param)
+ {
+ parent::onPreInit($param);
+ if(!$this->getUser()->getIsGuest())
+ $this->setTheme('');
+ }
+
public function testClick($sender,$param)
{
if($sender->BackColor==='')
diff --git a/demos/controls/protected/pages/config.xml b/demos/controls/protected/pages/config.xml
index 224a058c..f6bbc9a3 100644
--- a/demos/controls/protected/pages/config.xml
+++ b/demos/controls/protected/pages/config.xml
@@ -4,7 +4,7 @@
<authorization>
<deny pages="home" users="?" verb="post" />
</authorization>
- <pages>
+ <pages Theme="BlueTheme">
<page id="home" type="HomePage" />
<page id="login" type="LoginPage" />
<page id="plain" type="TPage" TemplateFile="Demo.pages.PlainPage" />
diff --git a/demos/controls/protected/themes/BlueTheme/buttons.skin b/demos/controls/protected/themes/BlueTheme/buttons.skin
new file mode 100644
index 00000000..9b155fd4
--- /dev/null
+++ b/demos/controls/protected/themes/BlueTheme/buttons.skin
@@ -0,0 +1,2 @@
+<com:TButton BackColor="blue" ForeColor="red" Font.Size="18px" />
+<com:TButton SkinID="abc" BackColor="red" ForeColor="blue" /> \ No newline at end of file
diff --git a/demos/controls/protected/themes/BlueTheme/labels.skin b/demos/controls/protected/themes/BlueTheme/labels.skin
new file mode 100644
index 00000000..64a8c469
--- /dev/null
+++ b/demos/controls/protected/themes/BlueTheme/labels.skin
@@ -0,0 +1,2 @@
+<com:TLabel BackColor="blue" ForeColor="red" />
+<com:TLabel SkinID="abc" BackColor="red" ForeColor="blue" /> \ No newline at end of file