From af68030fcf0c266300feb2c100149ecadef7d364 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 16 Jul 2006 01:50:23 +0000 Subject: Merge from 3.0 branch till 1264. --- .../protected/pages/Controls/ClientScript.page | 36 +++++++++++----------- .../protected/pages/Controls/DataGrid.page | 10 +++--- .../protected/pages/Controls/DataList.page | 2 +- .../protected/pages/Controls/DatePicker.page | 34 ++++++++++---------- .../protected/pages/Controls/HtmlArea.page | 4 +-- .../protected/pages/Controls/JavascriptLogger.page | 4 +-- .../protected/pages/Controls/NewControl.page | 6 ++-- .../quickstart/protected/pages/Controls/Panel.page | 2 +- .../protected/pages/Controls/Repeater.page | 2 +- .../protected/pages/Controls/Validation.page | 4 +-- .../protected/pages/Controls/Wizard.page | 6 ++-- 11 files changed, 55 insertions(+), 55 deletions(-) (limited to 'demos/quickstart/protected/pages/Controls') diff --git a/demos/quickstart/protected/pages/Controls/ClientScript.page b/demos/quickstart/protected/pages/Controls/ClientScript.page index 5dab41d5..d5687fb1 100644 --- a/demos/quickstart/protected/pages/Controls/ClientScript.page +++ b/demos/quickstart/protected/pages/Controls/ClientScript.page @@ -1,23 +1,23 @@ -

TClientScript

+

TClientScript

-

Including Bundled Javascript Libraries in Prado

+

Including Bundled Javascript Libraries in Prado

-TClientScript 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 -UsingPradoScripts property. Multiple bundled javascript libraries -can be specified using comma delimited string of the name of javascript library +TClientScript 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 +PradoScripts 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.

-<com:TClientScript UsingPradoScripts="ajax, effects" /> +<com:TClientScript PradoScripts="ajax, effects" />

- The available bundled libraries included in Prado are + The available bundled libraries included in Prado are

-

The dependencies for each library are automatically resolved. That is, +

The dependencies for each library are automatically resolved. That is, specifying, say the "ajax", will also include the "prado" library.

- -

Including Custom Javascript Files

-

Custom javascript files can be register using the ScriptUrl property. -The following example includes the javascript file "test.js" to the page. In this case, the file + +

Including Custom Javascript Files

+

Custom Javascript files can be register using the ScriptUrl 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 dynamic asset tag, the file "test.js" will be published automatically, that is, the file will be copied to the assets directory if necessary. @@ -42,11 +42,11 @@ automatically, that is, the file will be copied to the assets directory if neces <com:TClientScript ScriptUrl=<%~ test.js %> /> -

You can include javascript files from other servers by specifying the full URL string in +

You can include Javascript files from other servers by specifying the full URL string in the ScriptUrl property.

-

Including Custom Javascript Code Blocks

+

Including Custom Javascript Code Blocks

Any content within the TClientScript control tag will be considered as - javascript code and will be rendered where it is declared.

+ Javascript code and will be rendered where it is declared.

\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/DataGrid.page b/demos/quickstart/protected/pages/Controls/DataGrid.page index ed1ad32b..392b78ab 100644 --- a/demos/quickstart/protected/pages/Controls/DataGrid.page +++ b/demos/quickstart/protected/pages/Controls/DataGrid.page @@ -6,15 +6,15 @@ TDatagrid is an important control in building complex Web applications. It displays data in a tabular format with rows (also called items) and columns. A row is composed by cells, while columns govern how cells should be displayed according to their association with the columns. Data specified via DataSource or DataSourceID are bound to the rows and feed contents to cells.

-TDataGrid is highly interactive. Users can sort the data along specified columns, navigate through different pages of the data, and perform actions, such as editting and deleting, on rows of the data. +TDataGrid is highly interactive. Users can sort the data along specified columns, navigate through different pages of the data, and perform actions, such as editing and deleting, on rows of the data.

-Rows of TDataGrid can be accessed via its Items property. A row (item) can be in one of several modes: browsing, editting and selecting, which affects how cells in the row are displayed. To change an item's mode, modify EditItemIndex or SelectedItemIndex. Note, if an item is in edit mode, then selecting this item will have no effect. +Rows of TDataGrid can be accessed via its Items property. A row (item) can be in one of several modes: browsing, editing and selecting, which affects how cells in the row are displayed. To change an item's mode, modify EditItemIndex or SelectedItemIndex. Note, if an item is in edit mode, then selecting this item will have no effect.

Columns

-Columns of a data grid determine how the associated cells are displayed. For example, cells associated with a TBoundColumn are displayed differently according to their modes. A cell is displayed as a static text if the cell is in browsing mode, a text box if it is in editting mode, and so on. +Columns of a data grid determine how the associated cells are displayed. For example, cells associated with a TBoundColumn are displayed differently according to their modes. A cell is displayed as a static text if the cell is in browsing mode, a text box if it is in editing mode, and so on.

PRADO provides five types of columns: @@ -103,7 +103,7 @@ The following example uses manually specified columns to show a list of book inf

  • Publisher - displayed as a piece of text using TBoundColumn.
  • Price - displayed as a piece of text using TBoundColumn with output formatting string and customized styles.
  • In-stock or not - displayed as a checkbox using TCheckBoxColumn.
  • -
  • Rating - displayed as an image using TTemplateColumn which allows maximum freedom in specifiying cell contents.
  • +
  • Rating - displayed as an image using TTemplateColumn which allows maximum freedom in specifying cell contents.
  • Pay attention to how item (row) styles and column styles cooperate together to affect the appearance of the cells in the datagrid.

    @@ -111,7 +111,7 @@ The following example uses manually specified columns to show a list of book inf

    Interacting with TDataGrid

    -Besides the rich data presentation functionalities as demonstrated in previous section, TDataGrid is also highly user interactive. An import usage of TDataGrid is editting or deleting rows of data. The TBoundColumn can adjust the associated cell presentation according to the mode of datagrid items. When an item is in browsing mode, the cell is displayed with a static text; when the item is in editting mode, a textbox is displayed to collect user inputs. TDataGrid provides TEditCommandColumn for switching item modes. In addition, TButtonColumn offers developers the flexibility of creating arbitrary buttons for various user interactions. +Besides the rich data presentation functionalities as demonstrated in previous section, TDataGrid is also highly user interactive. An import usage of TDataGrid is editing or deleting rows of data. The TBoundColumn can adjust the associated cell presentation according to the mode of datagrid items. When an item is in browsing mode, the cell is displayed with a static text; when the item is in editing mode, a textbox is displayed to collect user inputs. TDataGrid provides TEditCommandColumn for switching item modes. In addition, TButtonColumn offers developers the flexibility of creating arbitrary buttons for various user interactions.

    The following example shows how to make the previous book information table an interactive one. It allows users to edit and delete book items from the table. Two additional columns are used in the example to allow users interact with the datagrid: TEditCommandColumn and TButtonColumn. diff --git a/demos/quickstart/protected/pages/Controls/DataList.page b/demos/quickstart/protected/pages/Controls/DataList.page index c1ff1147..75541564 100644 --- a/demos/quickstart/protected/pages/Controls/DataList.page +++ b/demos/quickstart/protected/pages/Controls/DataList.page @@ -50,7 +50,7 @@ The following example shows how to use TDataList to display tabular data, with d

    -A common use of TDataList is for maintaining tabular data, including browsing, editting, deleting data items. This is enabled by the command events and various item templates of TDataList. +A common use of TDataList is for maintaining tabular data, including browsing, editing, deleting data items. This is enabled by the command events and various item templates of TDataList.

    The following example displays a computer product information. Users can add new products, modify or delete existing ones. In order to locate the data item for updating or deleting, DataKeys property is used. diff --git a/demos/quickstart/protected/pages/Controls/DatePicker.page b/demos/quickstart/protected/pages/Controls/DatePicker.page index a37ff048..36d2f435 100644 --- a/demos/quickstart/protected/pages/Controls/DatePicker.page +++ b/demos/quickstart/protected/pages/Controls/DatePicker.page @@ -3,14 +3,14 @@

    TDatePicker

    -

    TDatePicker displays a text box for date input purpose. +

    TDatePicker displays a text box for date input purpose. When the text box receives focus, a calendar will pop up and users can pick up from it a date that will be automatically entered into the text box. The format of the date string displayed in the text box is determined by the DateFormat property. Valid formats are the combination of the following tokens: - - + + Character Format Pattern (en-US) --------------------------------------------------------------------- d day digit @@ -32,7 +32,7 @@ only accepts integers such as the Unix timestamp.

    -TDatePicker has three Mode to show the date picker popup. +TDatePicker has three Mode to show the date picker popup.

    • Basic - Only shows a text input, focusing on the input shows the date picker.
    • Button - Shows a button next to the text input, clicking on the button shows the date, button text can be by the ButtonText property.
    • @@ -40,8 +40,8 @@ TDatePicker has three Mode to show the date picker popup.

    -

    The CssClass property can be used to override the css class name -for the date picker panel. The CalendarStyle property changes the overall calendar style. +

    The CssClass property can be used to override the CSS class name +for the date picker panel. The CalendarStyle property changes the overall calendar style. The following CalendarStyle values are available:

    • default - The default calendar style.
    • @@ -50,9 +50,9 @@ The following CalendarStyle values are available:

      The InputMode property can be set to "TextBox" or "DropDownList" with default as "TextBox". In DropDownList mode, in addition to the popup date picker, three -drop down list (day, month and year) are presented to select the date . +drop down list (day, month and year) are presented to select the date . When InputMode equals "DropDownList", the order and appearance of the date, month, and year -will depend on the pattern specified in DateFormat property. +will depend on the pattern specified in DateFormat property.

      The popup date picker can be hidden by specifying ShowCalendar as false. Much of the @@ -64,20 +64,20 @@ where FromYear is the starting year and UpToYear is the last y The starting day of the week can be changed by the FirstDayOfWeek property, with 0 as Sunday, 1 as Monday, etc.

      -

      Note 1: If the InputMode is "TextBox", the DateFormat should -only NOT contain MMM or MMMM patterns. The +

      Note 1: If the InputMode is "TextBox", the DateFormat should +only NOT contain MMM or MMMM patterns. The server side date parser will not be able to determine the correct date if MMM or MMMM are used. When InputMode equals "DropDownList", all patterns can be used.

      - +

      Note 2: When the TDatePicker is used together -with a validator, the DateFormat property of the validator must be equal to -the DateFormat of the TDatePicker AND must set DataType="Date" -on the validator to ensure correct validation. See +with a validator, the DateFormat property of the validator must be equal to +the DateFormat of the TDatePicker AND must set DataType="Date" +on the validator to ensure correct validation. See TCompareValidator, -TDataTypeValidator and -TRangeValidator +TDataTypeValidator and +TRangeValidator for details.

      - + \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/HtmlArea.page b/demos/quickstart/protected/pages/Controls/HtmlArea.page index 00a65573..e40a4444 100644 --- a/demos/quickstart/protected/pages/Controls/HtmlArea.page +++ b/demos/quickstart/protected/pages/Controls/HtmlArea.page @@ -24,7 +24,7 @@ The default editor gives only the basic tool bar. To change or add additional to

      -The client-side visual editting capability is supported by Internet Explorer 5.0+ for Windows and Gecko-based browser. If the browser does not support the visual editting, a traditional textarea will be displayed. +The client-side visual editing capability is supported by Internet Explorer 5.0+ for Windows and Gecko-based browser. If the browser does not support the visual editing, a traditional textarea will be displayed.

      @@ -39,7 +39,7 @@ Firefox 1.5b2           OK              OK
       Safari 2.0 (412)                        OK(1)
       Opera 9 Preview 1       OK(1)           OK(1)
       ----------------------------------------------------
      -(1) - Partialy working
      +(1) - Partially working
       ----------------------------------------------------
       
      diff --git a/demos/quickstart/protected/pages/Controls/JavascriptLogger.page b/demos/quickstart/protected/pages/Controls/JavascriptLogger.page index ccb4a27b..2c0032f8 100644 --- a/demos/quickstart/protected/pages/Controls/JavascriptLogger.page +++ b/demos/quickstart/protected/pages/Controls/JavascriptLogger.page @@ -4,7 +4,7 @@

      -TJavascriptLogger provides logging for client-side javascript. It is mainly a wrapper of the javascript developed at http://gleepglop.com/javascripts/logger/. +TJavascriptLogger provides logging for client-side javascript. It is mainly a wrapper of the Javascript developed at http://gleepglop.com/javascripts/logger/.

      @@ -15,7 +15,7 @@ To use TJavascriptLogger, simply place the following component tag in a

      -Then, the client-side javascript may contain the following statements. When they are executed, they will appear in the logger window. +Then, the client-side Javascript may contain the following statements. When they are executed, they will appear in the logger window.

      Logger.info('something happend'); diff --git a/demos/quickstart/protected/pages/Controls/NewControl.page b/demos/quickstart/protected/pages/Controls/NewControl.page index 54465ff7..5662f848 100644 --- a/demos/quickstart/protected/pages/Controls/NewControl.page +++ b/demos/quickstart/protected/pages/Controls/NewControl.page @@ -13,7 +13,7 @@ In general, there are two ways of writing new controls: composition of existing 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 subproperties.

      -One can compose a new control in two ways. One is to extend TCompositeControl and override the TControl::createChildControls() method. The other is to extend TTemplateControl (or its child classes) and write a control template. The latter is easier to use and can organize the layout constituent compoents more intuitively, while the former is more efficient because it does not require parsing of the template. +One can compose a new control in two ways. One is to extend TCompositeControl and override the TControl::createChildControls() method. The other is to extend TTemplateControl (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.

      As an example, we show how to create a labeled textbox called LabeledTextBox using the above two approaches. A labeled textbox displays a label besides a textbox. We want reuse the PRADO provided TLabel and TTextBox to accomplish this task. @@ -130,8 +130,8 @@ Other important properties and methods include: TWebControl is mainly used as a base class for controls representing HTML elements. It provides a set of properties that are common among HTML elements. It breaks the TControl::render() into the following methods that are more suitable for rendering an HTML element:

        -
      • addAttributesToRender() - adds attributes for the HTML element to be rendered. This method is often overriden by derived classes as they usually have different attributes to be rendered.
      • -
      • renderBeginTag() - renders the openning HTML tag.
      • +
      • addAttributesToRender() - adds attributes for the HTML element to be rendered. This method is often overridden by derived classes as they usually have different attributes to be rendered.
      • +
      • renderBeginTag() - renders the opening HTML tag.
      • renderContents() - renders the content enclosed within the HTML element. By default, it displays the items in the Controls collection of the control. Derived classes may override this method to render customized contents.
      • renderEndTag() - renders the closing HTML tag.
      diff --git a/demos/quickstart/protected/pages/Controls/Panel.page b/demos/quickstart/protected/pages/Controls/Panel.page index d507da36..be36095b 100644 --- a/demos/quickstart/protected/pages/Controls/Panel.page +++ b/demos/quickstart/protected/pages/Controls/Panel.page @@ -4,7 +4,7 @@

      -TPanel acts as a presentational container for other control. It displays a <div> element on a page. The property Wrap specifies whether the panel's body content should wrap or not, while HorizontalAlign governs how the content is aligned horizontally and Direction indicates the content direction (left to right or right to left). You can set BackImageUrl to give a background image to the panel, and you can ste GroupingText so that the panel is displayed as a field set with a legend text. Finally, you can specify a default button to be fired when users press 'return' key within the panel by setting the DefaultButton property. +TPanel acts as a presentational container for other control. It displays a <div> element on a page. The property Wrap specifies whether the panel's body content should wrap or not, while HorizontalAlign governs how the content is aligned horizontally and Direction indicates the content direction (left to right or right to left). You can set BackImageUrl to give a background image to the panel, and you can set GroupingText so that the panel is displayed as a field set with a legend text. Finally, you can specify a default button to be fired when users press 'return' key within the panel by setting the DefaultButton property.

      diff --git a/demos/quickstart/protected/pages/Controls/Repeater.page b/demos/quickstart/protected/pages/Controls/Repeater.page index 795e27aa..d8f3fd0a 100644 --- a/demos/quickstart/protected/pages/Controls/Repeater.page +++ b/demos/quickstart/protected/pages/Controls/Repeater.page @@ -5,7 +5,7 @@ TRepeater displays its content defined in templates repeatedly based on the given data specified by the DataSource or DataSourceID property. The repeated contents can be retrieved from the Items property. Each item is created by instantiating a template and each is a child control of the repeater.

      -Like normal control templates, the repeater templates can contain static text, controls and special tags, which after instantiation, become child contents of the corresponding item. TRepeater defiens five templates for different purposes, +Like normal control templates, the repeater templates can contain static text, controls and special tags, which after instantiation, become child contents of the corresponding item. TRepeater defines five templates for different purposes,

      • HeaderTemplate - the template used for displaying content at the beginning of a repeater;
      • diff --git a/demos/quickstart/protected/pages/Controls/Validation.page b/demos/quickstart/protected/pages/Controls/Validation.page index a28c8faf..12836b8c 100644 --- a/demos/quickstart/protected/pages/Controls/Validation.page +++ b/demos/quickstart/protected/pages/Controls/Validation.page @@ -26,7 +26,7 @@ Validators share a common set of properties, which are defined in the base class
      • Dynamic - the space for displaying the error message is NOT reserved. Therefore, showing up the error message will shift the layout of your page around (usually down).
      -
    • ControlCssClass - the Css class that is applied to the control being validated in case the validation fails.
    • +
    • ControlCssClass - the CSS class that is applied to the control being validated in case the validation fails.
    • FocusOnError - set focus at the validating place if the validation fails. Defaults to false.
    • FocusElementID - the ID of the HTML element that will receive focus if validation fails and FocusOnError is true.
    @@ -71,7 +71,7 @@ TEmailAddressValidator verifies that the user input is a valid email address. Th Note, if the input being validated is empty, TEmailAddressValidator will not do validation. Use a TRequiredFieldValidator to ensure the value is not empty.

    - +

    TCompareValidator

    diff --git a/demos/quickstart/protected/pages/Controls/Wizard.page b/demos/quickstart/protected/pages/Controls/Wizard.page index ce8bc774..fe910aa7 100644 --- a/demos/quickstart/protected/pages/Controls/Wizard.page +++ b/demos/quickstart/protected/pages/Controls/Wizard.page @@ -74,15 +74,15 @@ In this sample, we use wizard to collect user's preference of color. In the firs Given a set of wizard steps, TWizard supports three different ways of navigation among them:

      -
    • Bidirectional - Users can navigate forward and backward along a sequence of wizard steps. User input data is usally collected at the last step. This is also known as commit-at-the-end model. It is the default navigation way that TWizard supports.
    • -
    • Unidirectional - Users can navigate forward along a sequence of wizard steps. Backward move is not allowed. User input data is usally collected step by step. This is also known as command-as-you-go model. To disallow backward move to a specific step, set its AllowReturn property to false.
    • +
    • Bidirectional - Users can navigate forward and backward along a sequence of wizard steps. User input data is usually collected at the last step. This is also known as commit-at-the-end model. It is the default navigation way that TWizard supports.
    • +
    • Unidirectional - Users can navigate forward along a sequence of wizard steps. Backward move is not allowed. User input data is usually collected step by step. This is also known as command-as-you-go model. To disallow backward move to a specific step, set its AllowReturn property to false.
    • Nonlinear - User input in a step determines which step to go next. To do so, set ActiveStepIndex to the step that you want the user to go to. In this case, when a user clicks on the previous button in the navigation panel, the previous step that they visited (not the previous step in the sequential order) will become visible.

    Using Templates in Wizard

    -TWizard supports more concrete control of its outlook through templating. In particular, it provides the following template properties that allow complete customization of the wizard's header, navigation and side bar. +TWizard supports more concrete control of its outlook through templates. In particular, it provides the following template properties that allow complete customization of the wizard's header, navigation and side bar.

    • Header - HeaderTemplate.
    • -- cgit v1.2.3