summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Controls')
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Data.page6
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/HtmlArea4.page2
-rw-r--r--demos/quickstart/protected/pages/Controls/Markdown.page40
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/NewControl.page2
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TConditional/Home.page4
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/THtmlArea/Home.page8
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/THtmlArea4/Home.page8
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TMarkdown/Home.page31
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/Standard.page8
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/TextHighlighter.page1
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/id/NewControl.page2
-rwxr-xr-xdemos/quickstart/protected/pages/Controls/id/TextHighlighter.page1
14 files changed, 103 insertions, 12 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Data.page b/demos/quickstart/protected/pages/Controls/Data.page
index 3843b332..829a4ef5 100755
--- a/demos/quickstart/protected/pages/Controls/Data.page
+++ b/demos/quickstart/protected/pages/Controls/Data.page
@@ -2,6 +2,12 @@
<h1 id="5001">Data Controls</h1>
+<p class="block-content">
+Data controls are used to display a repeated content like a list or a table. The content is generated from a collection of items containing the data, called the <tt>DataSource</tt>, and a template describing the appearance, called <tt>Renderer</tt>.
+<br/>
+The process of assigning a DataSource to a Data control and render the template for each item is called <tt>data binding</tt>.
+</p>
+
<ul id="u1" class="block-content">
<li>
<a href="?page=Controls.DataList">TDataList</a> is used to display or modify a list of data items.
diff --git a/demos/quickstart/protected/pages/Controls/HtmlArea4.page b/demos/quickstart/protected/pages/Controls/HtmlArea4.page
index 1fa33424..f7092230 100755
--- a/demos/quickstart/protected/pages/Controls/HtmlArea4.page
+++ b/demos/quickstart/protected/pages/Controls/HtmlArea4.page
@@ -1,6 +1,6 @@
<com:TContent ID="body" >
-<h1>THtmlArea4</h1>
+<h1 id="84009">THtmlArea4</h1>
<com:DocLink ClassPath="System.Web.UI.WebControls.THtmlArea4" />
<p class="block-content">
diff --git a/demos/quickstart/protected/pages/Controls/Markdown.page b/demos/quickstart/protected/pages/Controls/Markdown.page
new file mode 100644
index 00000000..2fea9fc2
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Markdown.page
@@ -0,0 +1,40 @@
+<com:TContent ID="body" >
+
+<h1 id="106010">TMarkdown</h1>
+<com:DocLink ClassPath="System.Web.UI.WebControls.TMarkdown" />
+
+<p class="block-content">
+<tt>TMarkdown</tt> is a text formatter that produces html content from plain text. The formatter follows the <a href="http://www.wikipedia.org/wiki/Markdown">Markdown</a> syntax and the <a href="https://help.github.com/articles/github-flavored-markdown">GFM</a> (GitHub Flavored Markdown) extension.
+</p>
+<p class="block-content">
+Any content in the body of <tt>TMarkdown</tt>, including both static text and the rendering results of its child controls, is first converted using the Markdown syntax. Then, to any code block found in the html, syntax highlighting is applied. The code being highlighted follows the syntax of the specified <tt>Language</tt>, which can be 'php' (default), 'prado', 'css', 'html', etc. Here, 'prado' stands for the syntax of PRADO control templates. If the language is not specified in the <tt>Language</tt> property, it can be evinced from the Markdown syntax.
+</p>
+<p class="block-content">
+If line numbers are desired in front of each line, set <tt>ShowLineNumbers</tt> to true.
+</p>
+<p class="block-content">
+To use <tt>TMarkdown</tt>, simply enclose the contents to be formatted within the body of a <tt>TMarkdown</tt> control. The following example formats some text and piece of PHP code,
+</p>
+<com:TTextHighlighter Language="prado" CssClass="source block-content" >
+&lt;com:TMarkdown ShowLineNumbers="true" &gt;
+PRADO Markdown Test
+===================
+
+Some text and a list:
+* item 1
+* item 2
+
+Now, some code:
+
+```php
+public function test() {
+ // comment
+ echo "look me i'm colorful";
+}
+```
+&lt;/com:TMarkdown&gt;
+</com:TTextHighlighter>
+
+<com:RunBar PagePath="Controls.Samples.TMarkdown.Home" />
+
+</com:TContent>
diff --git a/demos/quickstart/protected/pages/Controls/NewControl.page b/demos/quickstart/protected/pages/Controls/NewControl.page
index 10c789db..9a680f43 100755
--- a/demos/quickstart/protected/pages/Controls/NewControl.page
+++ b/demos/quickstart/protected/pages/Controls/NewControl.page
@@ -10,7 +10,7 @@ In general, there are two ways of writing new controls: composition of existing
<h2 id="5402">Composition of Existing Controls</h2>
<p id="660430" class="block-content">
-Composition is the easiest way of creating new controls. It mainly involves instantiating existing controls, configuring them and making them the constituent components. The properties of the constituent components are exposed through <a href="?page=Fundamentals.Components">subproperties</a>.
+Composition is the easiest way of creating new controls. It mainly involves instantiating existing controls, configuring them and making them the constituent components. The properties of the constituent components are exposed through <a href="?page=Fundamentals.Components1">subproperties</a>.
</p>
<p id="660431" class="block-content">
One can compose a new control in two ways. One is to extend <tt>TCompositeControl</tt> and override the <tt>TControl::createChildControls()</tt> method. The other is to extend <tt>TTemplateControl</tt> (or its child classes) and write a control template. The latter is easier to use and can organize the layout constituent components more intuitively, while the former is more efficient because it does not require parsing of the template.
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TConditional/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TConditional/Home.page
index 5702970a..a7383e8d 100755
--- a/demos/quickstart/protected/pages/Controls/Samples/TConditional/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TConditional/Home.page
@@ -1,9 +1,9 @@
<com:TContent ID="body">
<h1>TConditional Samples</h1>
-<com:TConditional Condition="Prado::getVersion()==='3.2.3'">
+<com:TConditional Condition="Prado::getVersion()==='3.2.4'">
<prop:TrueTemplate>
- <com:TLabel Text="You are using PRADO 3.2.3" />
+ <com:TLabel Text="You are using PRADO 3.2.4" />
</prop:TrueTemplate>
<prop:FalseTemplate>
<com:TLabel Text="You are using PRADO <%= Prado::getVersion() %>" />
diff --git a/demos/quickstart/protected/pages/Controls/Samples/THtmlArea/Home.page b/demos/quickstart/protected/pages/Controls/Samples/THtmlArea/Home.page
index 5150922f..5f01c07e 100755
--- a/demos/quickstart/protected/pages/Controls/Samples/THtmlArea/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/THtmlArea/Home.page
@@ -29,7 +29,7 @@ THtmlArea with manually set options
</td></tr>
<tr><td class="samplenote">
-THtmlArea with visual editting disabled:
+THtmlArea with visual editing disabled:
</td><td class="sampleaction">
<com:THtmlArea ID="HtmlArea3" EnableVisualEdit="false" />
<br/>
@@ -38,6 +38,12 @@ THtmlArea with visual editting disabled:
<com:TLiteral Encode="true" ID="Result3" />
</td></tr>
+<tr><td class="samplenote">
+Read-only THtmlArea:
+</td><td class="sampleaction">
+<com:THtmlArea ID="HtmlArea4" ReadOnly="true" Text="Sample html text: <b>bold</b> <i>italic</i>" />
+</td></tr>
+
</table>
</com:TContent>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/THtmlArea4/Home.page b/demos/quickstart/protected/pages/Controls/Samples/THtmlArea4/Home.page
index 6bb6449c..2b6c7a7a 100755
--- a/demos/quickstart/protected/pages/Controls/Samples/THtmlArea4/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/THtmlArea4/Home.page
@@ -29,7 +29,7 @@ THtmlArea4 with manually set options
</td></tr>
<tr><td class="samplenote">
-THtmlArea4 with visual editting disabled:
+THtmlArea4 with visual editing disabled:
</td><td class="sampleaction">
<com:THtmlArea4 ID="HtmlArea3" EnableVisualEdit="false" />
<br/>
@@ -38,6 +38,12 @@ THtmlArea4 with visual editting disabled:
<com:TLiteral Encode="true" ID="Result3" />
</td></tr>
+<tr><td class="samplenote">
+Read-only THtmlArea:
+</td><td class="sampleaction">
+<com:THtmlArea4 ID="HtmlArea4" ReadOnly="true" Text="Sample html text: <b>bold</b> <i>italic</i>" />
+</td></tr>
+
</table>
</com:TContent>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TMarkdown/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TMarkdown/Home.page
new file mode 100755
index 00000000..4cd0f86b
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TMarkdown/Home.page
@@ -0,0 +1,31 @@
+<com:TContent ID="body">
+
+<h1>TMarkdown Samples</h1>
+
+<table class="sampletable">
+
+<tr><td class="samplenote">
+Formatting text and code:
+</td><td class="sampleaction">
+<com:TMarkdown ShowLineNumbers="true">
+PRADO Markdown Test
+===================
+
+Some text and a list:
+* item 1
+* item 2
+
+Now, some code:
+
+```php
+public function test() {
+ // comment
+ echo "look me i'm colorful";
+}
+```
+</com:TMarkdown>
+</td></tr>
+
+</table>
+
+</com:TContent>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
index de419172..6e6cb54d 100755
--- a/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TPanel/Home.page
@@ -67,6 +67,5 @@ will be clicked because it is set as the default button of the panel.
</com:TPanel>
</td></tr>
</table>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
index 9bd86078..c7506c67 100755
--- a/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TTextHighlighter/Home.page
@@ -12,7 +12,6 @@ Highlighting PHP statements:
$str = 'one|two|three|four';
// will output an array
print_r(explode('|', $str, 2));
-?>
</com:TTextHighlighter>
</td></tr>
diff --git a/demos/quickstart/protected/pages/Controls/Standard.page b/demos/quickstart/protected/pages/Controls/Standard.page
index 463f90a5..43fecfb3 100755
--- a/demos/quickstart/protected/pages/Controls/Standard.page
+++ b/demos/quickstart/protected/pages/Controls/Standard.page
@@ -1,7 +1,9 @@
<com:TContent ID="body" >
<h1 id="52001">Standard Controls</h1>
-<p id="260001" class="block-content">* the tutorial for this control is not completed yet.</p>
+<p class="block-content">
+ Standard controls are the most basic controls in PRADO. They can represent a simple html tag like an &lt;input&gt; or even more comple controls like a date picker or a WYSIWYG text area. Standard controls are in the <tt>System.Web.UI.WebControls</tt> namespace.
+</p>
<ul id="u1" class="block-content">
<li>
<a href="?page=Controls.Accordion">TAccordion</a> displays an accordion consisting of multiple views. At any time, only one view is visible.
@@ -104,6 +106,10 @@
</li>
<li>
+ <a href="?page=Controls.Markdown">TMarkdown</a> formats its body content following the <a href="http://www.wikipedia.org/wiki/Markdown">Markdown</a> syntax.
+ </li>
+
+ <li>
<a href="?page=Controls.MultiView">TMultiView</a> represents a container for a group of <tt>TView</tt> controls, each of which is container for other controls. At any time, at most one <tt>TView</tt> is visible.
</li>
diff --git a/demos/quickstart/protected/pages/Controls/TextHighlighter.page b/demos/quickstart/protected/pages/Controls/TextHighlighter.page
index 1babbb33..5d3428f9 100755
--- a/demos/quickstart/protected/pages/Controls/TextHighlighter.page
+++ b/demos/quickstart/protected/pages/Controls/TextHighlighter.page
@@ -17,7 +17,6 @@ To use <tt>TTextHighlighter</tt>, simply enclose the contents to be syntax highl
<?php
$str = 'one|two|three|four';
print_r(explode('|', $str, 2)); // will output an array
-?>
&lt;/com:TTextHighlighter&gt;
</com:TTextHighlighter>
diff --git a/demos/quickstart/protected/pages/Controls/id/NewControl.page b/demos/quickstart/protected/pages/Controls/id/NewControl.page
index ea083f6c..85c6eff0 100755
--- a/demos/quickstart/protected/pages/Controls/id/NewControl.page
+++ b/demos/quickstart/protected/pages/Controls/id/NewControl.page
@@ -10,7 +10,7 @@ Secara umum, ada dua cara penulisan kontrol baru: komposisi kontrol yang sudah a
<h2 id="5402">Komposisi Kontrol yang Sudah Ada</h2>
<p id="660430" class="block-content">
-Komposisi adalah cara termudah membuat kontrol baru. Ia melibatkan terutama penurunan kontrol yang sudah ada, mengkonfigurasinya dan menjadikannya unsur komponen. Properti dari unsur komponen diperlihatkan melalui <a href="?page=Fundamentals.Components">subproperti</a>.
+Komposisi adalah cara termudah membuat kontrol baru. Ia melibatkan terutama penurunan kontrol yang sudah ada, mengkonfigurasinya dan menjadikannya unsur komponen. Properti dari unsur komponen diperlihatkan melalui <a href="?page=Fundamentals.Components1">subproperti</a>.
</p>
<p id="660431" class="block-content">
Seseorang dapat menciptakan sebuah kontrol baru dalam dua cara. Pertama adalah memperluas <tt>TCompositeControl</tt> dan mengganti metode <tt>TControl::createChildControls()</tt>. Kedua adalah memperluas <tt>TTemplateControl</tt> (atau kelas anaknya) dan menulis template kontrol. Yang terakhir lebih mudah digunakan dan bisa mengatur tata letak unsur komponen lebih intuitif, sementara pembentuk lebih efisien karena ia tidak perlu menguraikan template.
diff --git a/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page b/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page
index b2b500b0..b1bb4ce7 100755
--- a/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page
+++ b/demos/quickstart/protected/pages/Controls/id/TextHighlighter.page
@@ -17,7 +17,6 @@ Untuk menggunakan <tt>TTextHighlighter</tt>, cukup kurung konten yang sintaksnya
<?php
$str = 'one|two|three|four';
print_r(explode('|', $str, 2)); // akan mengeluarkan array
-?>
&lt;/com:TTextHighlighter&gt;
</com:TTextHighlighter>