diff options
7 files changed, 66 insertions, 5 deletions
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 @@ +<com:TContent ID="body" >
+
+<h1>TKeyboard</h1>
+<com:DocLink ClassPath="System.Web.UI.WebControls.TKeyboard" />
+
+<p>
+<tt>TKeyboard</tt> 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.
+</p>
+
+<p>
+To use TKeyboard, write a template like following:
+</p>
+<com:TTextHighlighter Language="prado" CssClass="source">
+<com:TTextBox ID="PasswordInput" />
+<com:TKeyboard ForControl="PasswordInput" />
+</com:TTextHighlighter>
+
+<p>
+A TKeyboard control is associated with a <tt>TTextBox</tt> control by specifying
+<tt>ForControl</tt> 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 <tt>AutoHide</tt> to false to keep the keyboard showing all the time.
+</p>
+
+<p>
+The appearance of the keyboard can also be changed by specifying a customized CSS file via
+<tt>CssUrl</tt>. By default, the CSS class name for the keyboard is 'Keyboard'. This may
+also be changed by specifying <tt>KeyboardCssClass</tt>
+</p>
+
+<com:RunBar PagePath="Controls.Samples.TKeyboard.Home" />
+
+<div class="last-modified">$Id$</div></com:TContent>
\ 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 @@ +<com:TContent ID="body">
+<h1>TKeyboard Samples</h1>
+
+<div>
+<com:TTextBox ID="PasswordInput" />
+<com:TButton Text="Submit" OnClick="buttonClicked" />
+<com:TLiteral ID="Result" />
+</div>
+<div>
+<com:TKeyboard ForControl="PasswordInput" AutoHide="true" />
+</div>
+
+
+<div class="last-modified">$Id$</div>
+</com:TContent>
\ 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 @@ +<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->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 <h2>Version 3.1.1</h2>
<ul>
<li>Added a new control <a href="?page=Controls.TabPanel">TTabPanel</a> that displays tabbed views.</li>
+<li>Added a new control <a href="?page=Controls.Keyboard">TKeyboard</a> that displays a virtual keyboard for text input.</li>
<li>Added a new module TCacheHttpSession that stores session data using a cache module to improve the session performance.</li>
<li>Added Oracle DB support to Active Record</li>
</ul>
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 <sergeymorkovkin@mail.ru> and Qiang Xue <qiang.xue@gmail.com>
- * @version $Id: $
+ * @version $Id$
* @since 3.1.1
*/
class TKeyboard extends TWebControl
|