summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected
diff options
context:
space:
mode:
authorxue <>2006-07-07 14:54:15 +0000
committerxue <>2006-07-07 14:54:15 +0000
commit61bb16ee2e5f0a66234e1575242169a10fde47b5 (patch)
tree3ee24dcc36ceae2c213130df1ea3d5c9fc110a27 /demos/quickstart/protected
parent7b84938b1b5964f2274d66e28ba17435924ffe35 (diff)
Merge from 3.0 branch till 1253.
Diffstat (limited to 'demos/quickstart/protected')
-rw-r--r--demos/quickstart/protected/pages/Advanced/Scripts3.page3
-rw-r--r--demos/quickstart/protected/pages/Controls/ClientScript.page52
-rw-r--r--demos/quickstart/protected/pages/Controls/Standard.page4
3 files changed, 59 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Scripts3.page b/demos/quickstart/protected/pages/Advanced/Scripts3.page
index 9883f43e..123caa3a 100644
--- a/demos/quickstart/protected/pages/Advanced/Scripts3.page
+++ b/demos/quickstart/protected/pages/Advanced/Scripts3.page
@@ -29,4 +29,7 @@ that require a particular library will also automatically load the necessary lib
For example, if you add a TDatePicker component on the page, the <tt>datapicker</tt>
and its dependencies will be automatically included on the page.</p>
+<p>See <a href="?page=Controls.ClientScript">TClientScript</a> for options of adding
+ your custom javascript code to the page.</p>
+
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/ClientScript.page b/demos/quickstart/protected/pages/Controls/ClientScript.page
new file mode 100644
index 00000000..5dab41d5
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/ClientScript.page
@@ -0,0 +1,52 @@
+<com:TContent ID="body" >
+
+<h1>TClientScript</h1>
+<com:DocLink ClassPath="System.Web.UI.WebControls.TClientScript" />
+<h2>Including Bundled Javascript Libraries in Prado</h2>
+<p>
+<tt>TClientScript</tt> allows javascript code to be insert or linked to the
+page template. Prado is bundled with a large library of javascript functionality
+including effects, AJAX, basic event handlers, and many others. The bundled
+javascript libraries can be linked to the current page template using the
+<tt>UsingPradoScripts</tt> property. Multiple bundled javascript libraries
+can be specified using comma delimited string of the name of javascript library
+to include on the page. For following example will include the "ajax" and "effects" library.
+</p>
+<com:TTextHighlighter Language="prado" CssClass="source">
+&lt;com:TClientScript UsingPradoScripts="ajax, effects" /&gt;
+</com:TTextHighlighter>
+
+<p>
+ The available bundled libraries included in Prado are
+ <ul>
+ <li><tt>prado</tt> : basic prado javascript framework based on Prototype</li>
+ <li><tt>effects</tt> : visual effects from script.aculo.us</li>
+ <li><tt>ajax</tt> : ajax and callback related based on Prototype</li>
+ <li><tt>validator</tt> : validation</li>
+ <li><tt>logger</tt> : javascript logger and object browser</li>
+ <li><tt>datepicker</tt> : datepicker</li>
+ <li><tt>rico</tt> : Rico library</li>
+ <li><tt>colorpicker</tt> : colorpicker</li>
+ </ul>
+</p>
+<p>The dependencies for each library are automatically resolved. That is,
+ specifying, say the "ajax", will also include the "prado" library.</p>
+
+<h2>Including Custom Javascript Files</h2>
+<p>Custom javascript files can be register using the <tt>ScriptUrl</tt> property.
+The following example includes the javascript file "test.js" to the page. In this case, the file
+"test.js" is relative the current template you are using. Since the property value is
+<a href="?page=Configurations.Templates3">dynamic asset tag</a>, the file "test.js" will be published
+automatically, that is, the file will be copied to the assets directory if necessary.
+</p>
+<com:TTextHighlighter Language="prado" CssClass="source">
+&lt;com:TClientScript ScriptUrl=&lt;%~ test.js %&gt; /&gt;
+</com:TTextHighlighter>
+<p>You can include javascript files from other servers by specifying the full URL string in
+ the <tt>ScriptUrl</tt> property.</p>
+
+<h2>Including Custom Javascript Code Blocks</h2>
+<p> Any content within the <tt>TClientScript</tt> control tag will be considered as
+ javascript code and will be rendered where it is declared.</p>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Standard.page b/demos/quickstart/protected/pages/Controls/Standard.page
index 156b39e5..086ba293 100644
--- a/demos/quickstart/protected/pages/Controls/Standard.page
+++ b/demos/quickstart/protected/pages/Controls/Standard.page
@@ -11,6 +11,10 @@
<a href="?page=Controls.CheckBox">TCheckBox</a> represents a checkbox on a Web page. It can be used to collect two-state user input.
</li>
+ <li>
+ <a href="?page=Controls.ClientScript">TClientScript</a> adds javascript code to the page.
+ </li>
+
<li>*
<a href="?page=Controls.ColorPicker">TColorPicker</a> represents an input field taking color values via a color dialog.
</li>