From cb90a05700b7ca6b621420598ff232aa2285310c Mon Sep 17 00:00:00 2001
From: "ctrlaltca@gmail.com" <>
Date: Thu, 2 Jun 2011 19:49:27 +0000
Subject: upported to trunk/ last doc changes, everything should be fine now
---
demos/quickstart/protected/pages/Controls/Captcha.page | 18 +++++++++---------
.../protected/pages/Controls/ClientScriptLoader.page | 12 ++++++------
.../protected/pages/Controls/Conditional.page | 6 +++---
.../quickstart/protected/pages/Controls/Keyboard.page | 12 ++++++------
demos/quickstart/protected/pages/Controls/List.page | 12 ++++++++++++
demos/quickstart/protected/pages/Controls/Slider.page | 12 ++++++------
.../quickstart/protected/pages/Controls/Standard.page | 4 ++--
.../protected/pages/Controls/Validation.page | 16 ++++++++++++++++
8 files changed, 60 insertions(+), 32 deletions(-)
(limited to 'demos/quickstart/protected/pages/Controls')
diff --git a/demos/quickstart/protected/pages/Controls/Captcha.page b/demos/quickstart/protected/pages/Controls/Captcha.page
index 8a6e8a81..fd1accb2 100644
--- a/demos/quickstart/protected/pages/Controls/Captcha.page
+++ b/demos/quickstart/protected/pages/Controls/Captcha.page
@@ -1,36 +1,36 @@
+
TCaptcha displays a CAPTCHA that can be used to determine if the input is entered by a real user instead of some program. TCaptcha displays a token (a string consisting of alphanumeric characters) as an image and the user is expected to repeat the token in a text box. The token image is generated in a way such that it can be recognized by a human being, but not a program.
+
To use TCaptcha, you must enable the PHP GD2 extension with TrueType font support. Unlike other CAPTCHA scripts, TCaptcha does not need session or cookie.
+
The token generated by TCaptcha can be configured in several ways. To specify the length of characters in the token, set MinTokenLength and MaxTokenLength. To use case-insensitive token comparison and generate upper-case-only token, set CaseSensitive to false. More advanced users can try to set TokenAlphabet to specify which characters may appear in the generated tokens.
+
The validation of the token is related with two properties: TestLimit (defaults to 5 times) and TokenExpiry (defaults to 600 seconds). The former specifies how many times a token can be tested with on the server side, and the latter says when a generated token will expire. If the validation fails in any of the two scenarios, a new token will be automatically generated.
+
To specify the appearance of the generated token image, set TokenImageTheme to be an integer between 0 and 63. You may try the following example to see how this value affects the generated token image. The size of the generated token image is determined by TokenFontSize. In particular, the image width is proportional to the font size. You may also set Width to scale the generated image to your desired size, but the scaled image may not look good. By setting ChangingTokenBackground to true, the image background of the token will be variating even though the token is the same during postbacks.
+
Upon postback, user input can be validated by calling the method TCaptcha.validate(). More easily, you can use a TCaptchaValidator to automate the validation work for you. The TCaptchaValidator has the additional benefit of being able to validate the user input on the client-side. By default, a generated token will remain unchanged during postbacks. A new token can be generated by calling TCaptcha.regenerateToken() manually.
+
The following template shows a typical use of the TCaptcha control:
TCaptcha
+TCaptcha
TClientScriptLoader
+TClientScriptLoader
Allowable scripts and script dependencies can be grouped by using a "packages.php" file with the following format. This "packages.php" is optional, if absent the file names @@ -81,7 +81,7 @@ on both 'package1' and 'package2' groupings. That is, 'pac will combine, in order, 'file1.js', 'file2.js', 'file3.js', and 'file4.js'.
-To load a particular javascript file or package, set the PackageScripts property with value 'package1' to load the 'package1' scripts. @@ -96,10 +96,10 @@ Dependencies of the packages are automatically resolved by the script loader php </script> -
Each <com:TClientScriptLoader> generates an HTML <script> +
Each <com:TClientScriptLoader> generates an HTML <script> element to load the required javascript files.
-The DebugMode property when false removes comments and white spaces from the published javascript files. If the DebugMode property is not set, the debug mode is determined from the @@ -113,7 +113,7 @@ directory for the next requests. That is, in non-debug mode the scripts are cach in the assets directory until they are deleted. -
The EnableGzip property (default is true) enables the
published javascripts to be served as zipped if the browser and php server allows it.
diff --git a/demos/quickstart/protected/pages/Controls/Conditional.page b/demos/quickstart/protected/pages/Controls/Conditional.page
index e8ea4a65..1fd35e6a 100644
--- a/demos/quickstart/protected/pages/Controls/Conditional.page
+++ b/demos/quickstart/protected/pages/Controls/Conditional.page
@@ -1,6 +1,6 @@
@@ -17,13 +17,13 @@ you set Condition in template only and the expression should not refer
objects that are available on or after the onInit lifecycle.
+
TConditional is very light. It instantiates either TrueTemplate
FalseTemplate, but never both. And the condition is evaluated only once.
A typical usage of TConditional is shown as following:
+
TKeyboard displays a virtual keyboard that users can click on to enter input in
an associated text box. It helps to reduce the keyboard recording hacking.
+
To use TKeyboard, write a template like following:
+
A TKeyboard control is associated with a TTextBox control by specifying
ForControl to be the ID of that control. When the textbox is in focus,
a virtual keyboard will pop up; and when the text box is losing focus, the keyboard
will hide automatically. Set AutoHide to false to keep the keyboard showing all the time.
+
The appearance of the keyboard can also be changed by specifying a customized CSS file via
CssUrl. By default, the CSS class name for the keyboard is 'Keyboard'. This may
also be changed by specifying KeyboardCssClass
diff --git a/demos/quickstart/protected/pages/Controls/List.page b/demos/quickstart/protected/pages/Controls/List.page
index c7505181..241fdaf4 100644
--- a/demos/quickstart/protected/pages/Controls/List.page
+++ b/demos/quickstart/protected/pages/Controls/List.page
@@ -49,12 +49,14 @@ $listbox->dataBind();
TListBox displays a list box that allows single or multiple selection. Set the property SelectionMode as Single to make a single selection list box, and Multiple a multiple selection list box. The number of rows displayed in the box is specified via the Rows property value.
TDropDownList displays a dropdown list box that allows users to select a single option from a few prespecified ones.
TCheckBoxList displays a list of checkboxes on a Web page. The alignment of the text besides each checkbox can be specified TextAlign. The layout of the checkboxes can be controlled by the following properties:
TRadioButtonList is similar to TCheckBoxList in every aspect except that each TRadioButtonList displays a group of radiobuttons. Only one of the radiobuttions can be selected (TCheckBoxList allows multiple selections.)
TBulletedList displays items in a bullet format on a Web page. The style of the bullets can be specified by BulletStyle. When the style is CustomImage, the bullets are displayed as images, which is specified by BulletImageUrl.
+This is an EXPERIMENTAL class that displays clickable images that represent a TRadioButtonList.
+TConditional
+TConditional
TKeyboard
+TKeyboard
TListBox
+TDropDownList
+TCheckBoxList
+TRadioButtonList
+TBulletedList
+TRatingList
+
+
The range boundaries are defined by MinValue and MaxValue properties. The default range is from 0 to 100. The StepSize property can be used to define the step between 2 values inside the range. @@ -17,13 +17,13 @@ Notice that this step will be recomputed if there is more than 200 values betwee You can also provide the allowed values by setting the Values array.
-+
The handle sub-properties can be accessed by Handle property. You can also provide your own control for the handle, using HandleClass property. Note that this class must be a subclass of TSliderHandle
-+
The TSlider control can be easily customized using CssClasses. You can provide your own css file, using the CssUrl property. The css class for TSlider can be set by the CssClass property. Defaults values are 'hslider' for @@ -33,15 +33,15 @@ draw a red block as a cursor. 'handle-image' css class is also provided f as the handle.
-+
If AutoPostBack property is true, postback is performed as soon as the value changed.
-+
TSlider raises the onValueChanged event when the value of the slider has changed during postback.
-+
You can also attach ClientSide javascript events handler to the slider :
* the tutorial for this control is not completed yet.
+* the tutorial for this control is not completed yet.
TRequiredFieldValidator ensures that the user enters some data in the specified input field. By default, TRequiredFieldValidator will check if the user input is empty or not. The validation fails if the input is empty. By setting InitialValue, the validator can check if the user input is different from InitialValue. If not, the validation fails.
@@ -41,6 +43,8 @@ TRequiredFieldValidator ensures that the user enters some data in the specifiedTRegularExpressionValidator verifies the user input against a regular pattern. The validation fails if the input does not match the pattern. The regular expression can be specified by the RegularExpression property. Some commonly used regular expressions include:
@@ -65,6 +69,8 @@ Note, TRegularExpressionValidator only checks for nonempty user input. Use a TReTEmailAddressValidator verifies that the user input is a valid email address. The validator uses a regular expression to check if the input is in a valid email address format. If CheckMXRecord is true, the validator will also check whether the MX record indicated by the email address is valid, provided checkdnsrr() is available in the installed PHP.
@@ -75,6 +81,8 @@ Note, if the input being validated is empty, TEmailAddressValidator will not doTCompareValidator compares the user input with a constant value specified by ValueToCompare, or another user input specified by ControlToCompare. The Operator property specifies how to compare the values, which includes Equal, NotEqual, GreaterThan, GreaterThanEqual, LessThan and LessThanEqual. Before comparison, the values being compared will be converted to the type specified by DataType listed as follows,
@@ -94,6 +102,8 @@ Note, if the input being validated is empty, TEmailAddressValidator will not doTDataTypeValidator verifies if the input data is of specific type indicated by DataType. The data types that can be checked against are the same as those in TCompareValidator.
@@ -106,6 +116,8 @@ TDataTypeValidator verifies if the input data is of specific type indicated by <TRangeValidator verifies whether an input value is within a specified range. TRangeValidator uses three key properties to perform its validation. The MinValue and MaxValue properties specify the minimum and maximum values of the valid range. The DataType property specifies the data type of the value being validated. The value will be first converted into the specified type and then compare with the valid range. The data types that can be checked against are the same as those in TCompareValidator.
@@ -124,6 +136,8 @@ are compared as strictly less than the MaxValue and/or strictly greaterTCustomValidator performs user-defined validation (either server-side or client-side or both) on an input control.
@@ -148,6 +162,8 @@ function ValidationFunctionName(sender, parameter)TValidationSummary displays a summary of validation errors inline on a Web page, in a message box, or both.
-- cgit v1.2.3