summaryrefslogtreecommitdiff
path: root/demos/controls
diff options
context:
space:
mode:
authorxue <>2005-12-23 03:34:36 +0000
committerxue <>2005-12-23 03:34:36 +0000
commit5227e60e5c3a3a7ecee5c1f5693dd2dfe3667168 (patch)
tree69e7b5dce4444956d850c61c6072996b42d622d4 /demos/controls
parent925c51d0b63b61340ef89462e32e5fb784165428 (diff)
Diffstat (limited to 'demos/controls')
-rw-r--r--demos/controls/index.php8
-rw-r--r--demos/controls/protected/application.xml33
-rw-r--r--demos/controls/protected/pages/HomePage.php41
-rw-r--r--demos/controls/protected/pages/HomePage.tpl76
-rw-r--r--demos/controls/protected/pages/LoginPage.php20
-rw-r--r--demos/controls/protected/pages/LoginPage.tpl16
-rw-r--r--demos/controls/protected/pages/PlainPage.tpl6
-rw-r--r--demos/controls/protected/pages/config.xml9
-rw-r--r--demos/controls/protected/pages/fungii_logo.gifbin5473 -> 0 bytes
-rw-r--r--demos/controls/protected/pages/master/MasterPage.php7
-rw-r--r--demos/controls/protected/pages/master/MasterPage.tpl18
-rw-r--r--demos/controls/protected/pages/private/MemberPage.php12
-rw-r--r--demos/controls/protected/pages/private/MemberPage.tpl13
-rw-r--r--demos/controls/protected/pages/private/config.xml10
-rw-r--r--demos/controls/protected/userFile.xml5
-rw-r--r--demos/controls/themes/BlueTheme/buttons.skin3
-rw-r--r--demos/controls/themes/BlueTheme/icon_profile.gifbin771 -> 0 bytes
-rw-r--r--demos/controls/themes/BlueTheme/labels.skin2
-rw-r--r--demos/controls/themes/BlueTheme/simple.css1
19 files changed, 0 insertions, 280 deletions
diff --git a/demos/controls/index.php b/demos/controls/index.php
deleted file mode 100644
index 95d06df0..00000000
--- a/demos/controls/index.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-require_once(dirname(__FILE__).'/../../framework/prado.php');
-
-$application=new TApplication(dirname(__FILE__).'/protected/application.xml');
-$application->run();
-
-?> \ No newline at end of file
diff --git a/demos/controls/protected/application.xml b/demos/controls/protected/application.xml
deleted file mode 100644
index 20c84e3f..00000000
--- a/demos/controls/protected/application.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<application id="controls" mode="Debug">
- <paths>
- <alias id="Demo" path="." />
- <alias id="Pages" path="pages" />
- </paths>
- <!-- modules configured and loaded for all services -->
- <modules>
- <!--
- <module id="cache" class="System.Data.TSqliteCache" DbFile="Demo.cache"/>
- -->
- <module id="session" class="THttpSession" />
- </modules>
- <services>
- <!-- page service, BasePath is required -->
- <service id="page" BasePath="Demo.pages" DefaultPage="home">
- <!-- modules configured and loaded when page service is requested -->
- <modules>
- <!-- user manager module -->
- <module id="users" class="System.Security.TUserManager" UserFile="Demo.userFile" PasswordMode="Clear">
- <user name="demo" password="work" />
- <user name="demo2" password="work2" />
- </module>
- <!-- auth manager module -->
- <module id="auth" class="System.Security.TAuthManager" UserManager="users" LoginPage="login" />
- </modules>
- </service>
- </services>
- <parameters>
- <parameter id="adminEmail">foo@foo.com</parameter>
- </parameters>
-</application> \ No newline at end of file
diff --git a/demos/controls/protected/pages/HomePage.php b/demos/controls/protected/pages/HomePage.php
deleted file mode 100644
index 1b513aba..00000000
--- a/demos/controls/protected/pages/HomePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-class HomePage extends TPage
-{
- public function onPreInit($param)
- {
- parent::onPreInit($param);
- if(!$this->User->IsGuest)
- $this->Theme='';
- }
-
- public function onLoad($param)
- {
- parent::onLoad($param);
- if(!$this->IsPostBack)
- {
- //$this->dataBind();
- }
- }
-
- public function testClick($sender,$param)
- {
- if($sender->BackColor==='')
- $sender->BackColor='blue';
- else
- $sender->BackColor='';
- $this->TextBox->focus();
- }
-
- public function clickImage($sender,$param)
- {
- $this->TextBox->Text="You Clicked (".$param->X.", ".$param->Y.")";
- }
-
- public function linkClicked($sender,$param)
- {
- $sender->Text="Hello World";
- }
-}
-
-?> \ No newline at end of file
diff --git a/demos/controls/protected/pages/HomePage.tpl b/demos/controls/protected/pages/HomePage.tpl
deleted file mode 100644
index 5d016682..00000000
--- a/demos/controls/protected/pages/HomePage.tpl
+++ /dev/null
@@ -1,76 +0,0 @@
-<%@ MasterClass="Pages.master.MasterPage" Title="Main Page" %>
-<com:TContent id="body" >
-<com:TForm>
-<div>
-<com:THiddenField Value="test" />
-<h1>Welcome! <%=$this->User->Name %></h1>
-
-<com:TJavascriptLogger />
-
-<com:TLiteral Text="<literal>" Encode="true"/>
-
-<com:TTextBox
- ID="TextBox"
- Text="textbox"
- AutoPostBack="true"
- CausesValidation="false" />
-
-<com:TLabel
- Text="test"
- AssociatedControlID="checkbox" /><br/>
-
-<com:System.Web.UI.WebControls.TButton
- text="Toggle Button"
- ForeColor="red"
- Font.size="18"
- Click="testClick" /> (requires membership)<br/>
-
-<com:TCheckBox
- Text="Checkbox"
- ID="checkbox"
- AutoPostBack="true" /><br/>
-
-<com:TRadioButton
- Text="Radiobutton"
- ID="radiobutton"
- AutoPostBack="true" /><br/>
-
-<com:TImage
- ImageUrl=<%~/fungii_logo.gif %> />
-
-<com:TImageButton
- ImageUrl=<%~/fungii_logo.gif %>
- Click="clickImage"/><br/>
-
-<com:THyperLink
- Text="Visit a 'classless' page"
- NavigateUrl="?sp=page.plain" /> |
-
-<com:THyperLink
- Text="Visit member only page"
- NavigateUrl="?sp=page.private.member" />
-
-<com:TLinkButton
- Text="Click Me"
- Click="linkClicked"
- onclick="javascript:alert('you hit me')"/>
-
-
-<com:TListBox SelectionMode="Single" SelectedIndexChanged="testClick" AutoPostBack="true">
- <com:TListItem Text="a" Selected="true" />
- <com:TListItem Text=<%$ adminEmail %> />
- <com:TListItem Text="c" />
- <com:TListItem Text="d" Selected="true" />
-</com:TListBox>
-
-<com:TDropDownList>
- <com:TListItem Text="a" />
- <com:TListItem Text="b" />
- <com:TListItem Text="c" Selected="true" />
- <com:TListItem Text="d" />
-</com:TDropDownList>
-
-<%# $this->Page->TextBox->Text %>
-</div>
-</com:TForm>
-</com:TContent> \ No newline at end of file
diff --git a/demos/controls/protected/pages/LoginPage.php b/demos/controls/protected/pages/LoginPage.php
deleted file mode 100644
index f29ed540..00000000
--- a/demos/controls/protected/pages/LoginPage.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-class LoginPage extends TPage
-{
- public function login($sender,$param)
- {
- $manager=$this->Application->getModule('auth');
- if($manager->login($this->username->Text,$this->password->Text))
- $this->Application->Response->redirect($this->Application->Request->Items['ReturnUrl']);
- else
- $this->error->Text='login failed';
- }
-
- public function defaultClicked($sender,$param)
- {
- $sender->Text="Clicked";
- }
-}
-
-?> \ No newline at end of file
diff --git a/demos/controls/protected/pages/LoginPage.tpl b/demos/controls/protected/pages/LoginPage.tpl
deleted file mode 100644
index 0030dfb2..00000000
--- a/demos/controls/protected/pages/LoginPage.tpl
+++ /dev/null
@@ -1,16 +0,0 @@
-<%@ MasterClass="Pages.master.MasterPage" %>
-<com:TContent id="body" >
-<com:TForm>
-<div>
-<com:TPanel DefaultButton="defButton" GroupingText="Login" Width="270px" HorizontalAlign="center" ScrollBars="Both">
-<com:TLabel Text="Username" AssociatedControlID="username"/>
-<com:TTextBox ID="username" /><br/>
-<com:TLabel Text="Password" AssociatedControlID="password"/>
-<com:TTextBox ID="password" TextMode="Password" /><br/>
-<com:TButton Text="Login" Click="login" />
-<com:TLabel ID="error" />
-<com:TButton ID="defButton" Text="Default Button" Click="defaultClicked" />
-</com:TPanel>
-</div>
-</com:TForm>
-</com:TContent> \ No newline at end of file
diff --git a/demos/controls/protected/pages/PlainPage.tpl b/demos/controls/protected/pages/PlainPage.tpl
deleted file mode 100644
index 1238a5fb..00000000
--- a/demos/controls/protected/pages/PlainPage.tpl
+++ /dev/null
@@ -1,6 +0,0 @@
-<%@ MasterClass="Pages.master.MasterPage" %>
-<com:TContent id="body" >
-<div>
-This is a page without explicitly defined page class.
-</div>
-</com:TContent> \ No newline at end of file
diff --git a/demos/controls/protected/pages/config.xml b/demos/controls/protected/pages/config.xml
deleted file mode 100644
index ce3ced8a..00000000
--- a/demos/controls/protected/pages/config.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<configuration>
- <pages Theme="BlueTheme">
- <page id="home" class="HomePage" />
- <page id="login" class="LoginPage" />
- <page id="plain" class="TPage" TemplateFile="Demo.pages.PlainPage" />
- </pages>
-</configuration> \ No newline at end of file
diff --git a/demos/controls/protected/pages/fungii_logo.gif b/demos/controls/protected/pages/fungii_logo.gif
deleted file mode 100644
index b667c73e..00000000
--- a/demos/controls/protected/pages/fungii_logo.gif
+++ /dev/null
Binary files differ
diff --git a/demos/controls/protected/pages/master/MasterPage.php b/demos/controls/protected/pages/master/MasterPage.php
deleted file mode 100644
index d919e710..00000000
--- a/demos/controls/protected/pages/master/MasterPage.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-class MasterPage extends TPage
-{
-}
-
-?> \ No newline at end of file
diff --git a/demos/controls/protected/pages/master/MasterPage.tpl b/demos/controls/protected/pages/master/MasterPage.tpl
deleted file mode 100644
index c2ce8436..00000000
--- a/demos/controls/protected/pages/master/MasterPage.tpl
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-
-<com:THead>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</com:THead>
-
-<body>
-<com:TContentPlaceHolder id="body" />
-<p>
-<a href="http://validator.w3.org/check?uri=referer"><img
-src="http://www.w3.org/Icons/valid-xhtml10"
-alt="Valid XHTML 1.0 Strict" height="31" width="88" style="border:0"/></a>
-</p>
-</body>
-
-</html> \ No newline at end of file
diff --git a/demos/controls/protected/pages/private/MemberPage.php b/demos/controls/protected/pages/private/MemberPage.php
deleted file mode 100644
index ecec9e4d..00000000
--- a/demos/controls/protected/pages/private/MemberPage.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-class MemberPage extends TPage
-{
- public function logout($sender,$param)
- {
- $this->Application->getModule('auth')->logout();
- $this->Application->Response->redirect($this->Application->Service->constructUrl('home'));
- }
-}
-
-?> \ No newline at end of file
diff --git a/demos/controls/protected/pages/private/MemberPage.tpl b/demos/controls/protected/pages/private/MemberPage.tpl
deleted file mode 100644
index 6582aec6..00000000
--- a/demos/controls/protected/pages/private/MemberPage.tpl
+++ /dev/null
@@ -1,13 +0,0 @@
-<%@ MasterClass="Pages.master.MasterPage" %>
-<com:TContent id="body" >
-<com:TForm>
-<div>
-Congratulations, <com:TLabel Text=<%=$this->User->Name%> />!<br/>
-<%=
- $this->Application->User->Name;
-%>
-You have reached this member-only area.
-<com:TButton Text="Logout" Click="logout" />
-</div>
-</com:TForm>
-</com:TContent> \ No newline at end of file
diff --git a/demos/controls/protected/pages/private/config.xml b/demos/controls/protected/pages/private/config.xml
deleted file mode 100644
index 775590cd..00000000
--- a/demos/controls/protected/pages/private/config.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<configuration>
- <authorization>
- <deny pages="member" users="?" />
- </authorization>
- <pages>
- <page id="member" class="MemberPage" />
- </pages>
-</configuration> \ No newline at end of file
diff --git a/demos/controls/protected/userFile.xml b/demos/controls/protected/userFile.xml
deleted file mode 100644
index b5d02df0..00000000
--- a/demos/controls/protected/userFile.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<configuration>
- <user name="demo3" password="work3" />
-</configuration> \ No newline at end of file
diff --git a/demos/controls/themes/BlueTheme/buttons.skin b/demos/controls/themes/BlueTheme/buttons.skin
deleted file mode 100644
index 8db810bc..00000000
--- a/demos/controls/themes/BlueTheme/buttons.skin
+++ /dev/null
@@ -1,3 +0,0 @@
-<com:TButton BackColor="blue" ForeColor="red" Font.Size="18px" />
-<com:TButton SkinID="abc" BackColor="red" ForeColor="blue" />
-<com:TImageButton ImageUrl=<%~/icon_profile.gif%> /> \ No newline at end of file
diff --git a/demos/controls/themes/BlueTheme/icon_profile.gif b/demos/controls/themes/BlueTheme/icon_profile.gif
deleted file mode 100644
index 7ae1cdb8..00000000
--- a/demos/controls/themes/BlueTheme/icon_profile.gif
+++ /dev/null
Binary files differ
diff --git a/demos/controls/themes/BlueTheme/labels.skin b/demos/controls/themes/BlueTheme/labels.skin
deleted file mode 100644
index 64a8c469..00000000
--- a/demos/controls/themes/BlueTheme/labels.skin
+++ /dev/null
@@ -1,2 +0,0 @@
-<com:TLabel BackColor="blue" ForeColor="red" />
-<com:TLabel SkinID="abc" BackColor="red" ForeColor="blue" /> \ No newline at end of file
diff --git a/demos/controls/themes/BlueTheme/simple.css b/demos/controls/themes/BlueTheme/simple.css
deleted file mode 100644
index 22df4a9e..00000000
--- a/demos/controls/themes/BlueTheme/simple.css
+++ /dev/null
@@ -1 +0,0 @@
-body {background-color: silver;} \ No newline at end of file