summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-06-01 19:49:56 +0000
committerctrlaltca@gmail.com <>2011-06-01 19:49:56 +0000
commitad30a2e5e2bbe11908a78e7731ed5d2d8c55c9b9 (patch)
tree23f1a395a5f9e2dc13d2957d43dc5a5dc0bbefd4
parent5c0a31f2407037665e8640e486c36d6c71c5ca90 (diff)
added documentation for TColorPicker class
-rw-r--r--.gitattributes1
-rw-r--r--demos/quickstart/protected/pages/ActiveControls/Home.page2
-rw-r--r--demos/quickstart/protected/pages/Controls/ColorPicker.page29
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TColorPicker/Home.page37
-rw-r--r--demos/quickstart/protected/pages/Controls/Standard.page2
-rw-r--r--framework/Web/UI/WebControls/TColorPicker.php25
-rw-r--r--framework/Web/UI/WebControls/TDatePicker.php2
7 files changed, 89 insertions, 9 deletions
diff --git a/.gitattributes b/.gitattributes
index bc0ce443..5648a82a 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1471,6 +1471,7 @@ demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TCheckBoxList/Home.php -text
demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TClientSideValidator/Home.php -text
+demos/quickstart/protected/pages/Controls/Samples/TColorPicker/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page -text
demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.php -text
demos/quickstart/protected/pages/Controls/Samples/TConditional/Home.page -text
diff --git a/demos/quickstart/protected/pages/ActiveControls/Home.page b/demos/quickstart/protected/pages/ActiveControls/Home.page
index a42bd111..62d79cb8 100644
--- a/demos/quickstart/protected/pages/ActiveControls/Home.page
+++ b/demos/quickstart/protected/pages/ActiveControls/Home.page
@@ -133,7 +133,7 @@ TActiveButton</a> control. See also the later part of the <a href="?page=Tutoria
</li>
</ul>
-<h2>Active Data Controls</h2>
+<h2 id="134001">Active Data Controls</h2>
<ul id="u2" class="block-content">
<li>
* <a href="?page=ActiveControls.ActiveDataList">TActiveDataList</a>
diff --git a/demos/quickstart/protected/pages/Controls/ColorPicker.page b/demos/quickstart/protected/pages/Controls/ColorPicker.page
index cc931840..57c39857 100644
--- a/demos/quickstart/protected/pages/Controls/ColorPicker.page
+++ b/demos/quickstart/protected/pages/Controls/ColorPicker.page
@@ -3,8 +3,33 @@
<h1 id="2201">TColorPicker</h1>
<com:DocLink ClassPath="System.Web.UI.WebControls.TColorPicker" />
-<p id="270244" class="block-content">
-TBD
+<p class="block-content">
+<tt>TColorPicker</tt> displays a text box for color input purpose.
+Next to the textbox there's a button filled with the current chosen color.
+Users can write a color name directly in the text box as an hex triplet (also known as HTML notation, eg: #FF00FF).
+<br/>Alternatively, if the <tt>ShowColorPicker</tt> property is enabled (it is by default), users can click the button
+to have a color picker UI appear. A color chan be chosen directly by clicking on the color picker.
</p>
+<p class="block-content">
+TColorPicker has three different color picker UI <tt>Mode</tt>s:</p>
+ <ul id="u1" class="block-content">
+ <li><tt>Simple</tt> - Grid with 12 simple colors.</li>
+ <li><tt>Basic</tt> - Grid with the most common 70 colors. This is the default mode.</li>
+ <li><tt>Full</tt> - Full-featured color picker.</li>
+ </ul>
+
+<p class="block-content">The <tt>CssClass</tt> property can be used to override the CSS class name
+for the color picker panel. The <tt>ColorStyle</tt> property changes the overall color picker style.
+The following <tt>ColorStyle</tt> values are available:</p>
+ <ul id="u2" class="block-content">
+ <li><tt>default</tt> - The default color picker style.</li>
+ </ul>
+
+<p class="block-content">If the <tt>Mode</tt> property is set to <tt>Full</tt>, the color picker panel will
+display an "Ok" and "Cancel" buttons. You can customize the button labels setting the <tt>OKButtonText</tt>
+and <tt>CancelButtonText</tt> properties.</p>
+
+<com:RunBar PagePath="Controls.Samples.TColorPicker.Home" />
+
<div class="last-modified">$Id$</div></com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TColorPicker/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TColorPicker/Home.page
new file mode 100644
index 00000000..0a1f3705
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TColorPicker/Home.page
@@ -0,0 +1,37 @@
+<com:TContent ID="body">
+
+<h1>TColorPicker Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+ <td class="samplenote">Default TColorPicker, Mode="Basic"</td>
+ <td class="sampleaction">
+ <com:TColorPicker />
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">Mode="Simple"<br />pre-selected red color</td>
+ <td class="sampleaction">
+ <com:TColorPicker Mode="Simple" Text="#FF0000"/>
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">Mode="Full"</td>
+ <td class="sampleaction">
+ <com:TColorPicker Mode="Full"/>
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">Disabled color picker panel: ShowColorPicker="false"</td>
+ <td class="sampleaction">
+ <com:TColorPicker ShowColorPicker="false"/>
+ </td>
+</tr>
+
+</table>
+
+<div class="last-modified">$Id: Home.page 1650 2007-01-24 06:55:32Z wei $</div></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 3b6079d6..38a541ca 100644
--- a/demos/quickstart/protected/pages/Controls/Standard.page
+++ b/demos/quickstart/protected/pages/Controls/Standard.page
@@ -23,7 +23,7 @@
<a href="?page=Controls.ClientScriptLoader">TClientScriptLoader</a> loads custom javascript libraries.
</li>
- <li>*
+ <li>
<a href="?page=Controls.ColorPicker">TColorPicker</a> represents an input field taking color values via a color dialog.
</li>
diff --git a/framework/Web/UI/WebControls/TColorPicker.php b/framework/Web/UI/WebControls/TColorPicker.php
index 0fc7eef4..1066bf76 100644
--- a/framework/Web/UI/WebControls/TColorPicker.php
+++ b/framework/Web/UI/WebControls/TColorPicker.php
@@ -13,8 +13,25 @@
/**
* TColorPicker class.
*
- * Be aware, this control is EXPERIMENTAL and is not stablized yet.
+ * TColorPicker displays a text box for color input purpose.
+ * Next to the textbox there's a button filled with the current chosen color.
+ * Users can write a color name directly in the text box as an hex triplet (also known as HTML notation, eg: #FF00FF).
+ * Alternatively, if the <b>ShowColorPicker</b> property is enabled (it is by default), users can click the button
+ * to have a color picker UI appear. A color chan be chosen directly by clicking on the color picker.
*
+ * TColorPicker has three different color picker UI <b>Mode</b>s:
+ * # <b>Simple</b> - Grid with 12 simple colors.
+ * # <b>Basic</b> - Grid with the most common 70 colors. This is the default mode.
+ * # <b>Full</b> - Full-featured color picker.
+ *
+ * The <b>CssClass</b> property can be used to override the CSS class name
+ * for the color picker panel. The <b>ColorStyle</b> property sets the packages
+ * styles available. E.g. <b>default</b>.
+ *
+ * If the <b>Mode</b> property is set to <b>Full</b>, the color picker panel will
+ * display an "Ok" and "Cancel" buttons. You can customize the button labels setting the <b>OKButtonText</b>
+ * and <b>CancelButtonText</b> properties.
+ *
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @version $Id$
* @package System.Web.UI.WebControls
@@ -226,9 +243,9 @@ class TColorPicker extends TTextBox
* that a {@link TColorPicker} control can take.
*
* The following enumerable values are defined:
- * - Simple
- * - Basic
- * - Full
+ * # Simple - Grid with 12 simple colors.
+ * # Basic - Grid with the most common 70 colors. This is the default mode.
+ * # Full - Full-featured color picker.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php
index 1bac5a1c..5d5a17e6 100644
--- a/framework/Web/UI/WebControls/TDatePicker.php
+++ b/framework/Web/UI/WebControls/TDatePicker.php
@@ -56,7 +56,7 @@ Prado::using('System.Web.UI.WebControls.TTextBox');
*
* The <b>InputMode</b> property can be set to "TextBox" or "DropDownList" with
* default as "TextBox".
- * In <tt>DropDownList</tt> mode, in addition to the popup date picker, three
+ * In <b>DropDownList</b> mode, in addition to the popup date picker, three
* drop down list (day, month and year) are presented to select the date .
*
* The <b>PositionMode</b> property can be set to "Top" or "Bottom" with default