From 5e3caed030722be404c1b56f2af1e149799b5eda Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 27 Aug 2007 21:23:33 +0000 Subject: Added tutorial for TKeyboard. --- .gitattributes | 3 ++ .../protected/pages/Controls/Keyboard.page | 34 ++++++++++++++++++++++ .../pages/Controls/Samples/TKeyboard/Home.page | 15 ++++++++++ .../pages/Controls/Samples/TKeyboard/Home.php | 11 +++++++ .../pages/GettingStarted/NewFeatures.page | 1 + .../Javascripts/source/prado/controls/controls.js | 3 -- framework/Web/UI/WebControls/TKeyboard.php | 4 +-- 7 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 demos/quickstart/protected/pages/Controls/Keyboard.page create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.page create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.php diff --git a/.gitattributes b/.gitattributes index 10dbecf5..54835c3a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1246,6 +1246,7 @@ demos/quickstart/protected/pages/Controls/ImageButton.page -text demos/quickstart/protected/pages/Controls/ImageMap.page -text demos/quickstart/protected/pages/Controls/InlineFrame.page -text demos/quickstart/protected/pages/Controls/JavascriptLogger.page -text +demos/quickstart/protected/pages/Controls/Keyboard.page -text demos/quickstart/protected/pages/Controls/Label.page -text demos/quickstart/protected/pages/Controls/LinkButton.page -text demos/quickstart/protected/pages/Controls/List.page -text @@ -1323,6 +1324,8 @@ demos/quickstart/protected/pages/Controls/Samples/TImageMap/Home.page -text demos/quickstart/protected/pages/Controls/Samples/TImageMap/Home.php -text demos/quickstart/protected/pages/Controls/Samples/TImageMap/hotspots.gif -text demos/quickstart/protected/pages/Controls/Samples/TInlineFrame/Home.page -text +demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.page -text +demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.php -text demos/quickstart/protected/pages/Controls/Samples/TLabel/Home.page -text demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.page -text demos/quickstart/protected/pages/Controls/Samples/TLinkButton/Home.php -text diff --git a/demos/quickstart/protected/pages/Controls/Keyboard.page b/demos/quickstart/protected/pages/Controls/Keyboard.page new file mode 100644 index 00000000..06c91049 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Keyboard.page @@ -0,0 +1,34 @@ + + +

TKeyboard

+ + +

+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: +

+ +<com:TTextBox ID="PasswordInput" /> +<com:TKeyboard ForControl="PasswordInput" /> + + +

+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 +

+ + + +
$Id$
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.page new file mode 100644 index 00000000..95340e1d --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.page @@ -0,0 +1,15 @@ + +

TKeyboard Samples

+ +
+ + + +
+
+ +
+ + +
$Id$
+
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.php new file mode 100644 index 00000000..689f45c8 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TKeyboard/Home.php @@ -0,0 +1,11 @@ +Result->Text='You have entered "'.$this->PasswordInput->Text.'".'; + } +} + +?> \ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page index 560bbfd9..a5136d72 100644 --- a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page +++ b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page @@ -9,6 +9,7 @@ This page summarizes the main new features that are introduced in each PRADO rel

Version 3.1.1

diff --git a/framework/Web/Javascripts/source/prado/controls/controls.js b/framework/Web/Javascripts/source/prado/controls/controls.js index 8975a7a2..c4dcf562 100644 --- a/framework/Web/Javascripts/source/prado/controls/controls.js +++ b/framework/Web/Javascripts/source/prado/controls/controls.js @@ -457,7 +457,6 @@ Prado.WebUI.TKeyboard.prototype = type : function(key) { - var input = this.forControl; var command = key.toLowerCase(); @@ -474,7 +473,6 @@ Prado.WebUI.TKeyboard.prototype = } if (command != 'exit') input.focus(); - }, saveSelection : function() @@ -493,7 +491,6 @@ Prado.WebUI.TKeyboard.prototype = if (value == 'bksp') {this.selection.moveStart("character", -1); this.selection.text = '';} else if (value == 'del') {this.selection.moveEnd("character", 1); this.selection.text = '';} else {this.selection.text = value;} - this.selection.select(); } else diff --git a/framework/Web/UI/WebControls/TKeyboard.php b/framework/Web/UI/WebControls/TKeyboard.php index 4ff15613..bc701331 100644 --- a/framework/Web/UI/WebControls/TKeyboard.php +++ b/framework/Web/UI/WebControls/TKeyboard.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2007 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id: $ + * @version $Id$ * @package System.Web.UI.WebControls * @since 3.1.1 */ @@ -33,7 +33,7 @@ * also be changed by specifying {@link setKeyboardCssClass KeyboardCssClass}. * * @author Sergey Morkovkin and Qiang Xue - * @version $Id: $ + * @version $Id$ * @since 3.1.1 */ class TKeyboard extends TWebControl -- cgit v1.2.3