You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2012/12/19 14:25:02 UTC
svn commit: r1423856 - in /myfaces/tomahawk/trunk:
core/src/main/java/org/apache/myfaces/custom/inputTextHelp/
core/src/main/resources/org/apache/myfaces/custom/inputTextHelp/resource/
core20/src/main/java/org/apache/myfaces/custom/inputTextHelp/ core2...
Author: werpu
Date: Wed Dec 19 13:25:01 2012
New Revision: 1423856
URL: http://svn.apache.org/viewvc?rev=1423856&view=rev
Log:
TOMAHAWK-1654
Modified:
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java
myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/inputTextHelp/resource/inputTextHelp.js
myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java
myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.inputTextHelp/inputTextHelp.js
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java?rev=1423856&r1=1423855&r2=1423856&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java Wed Dec 19 13:25:01 2012
@@ -35,8 +35,8 @@ import org.apache.myfaces.component.html
*/
public abstract class AbstractHtmlInputTextHelp extends HtmlInputText
{
- public static final String JS_FUNCTION_SELECT_TEXT = "selectText";
- public static final String JS_FUNCTION_RESET_HELP = "resetHelpValue";
+ public static final String JS_FUNCTION_SELECT_TEXT = "org.apache.myfaces.InputTextHelp.selectText";
+ public static final String JS_FUNCTION_RESET_HELP = "org.apache.myfaces.InputTextHelp.resetHelpValue";
public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlInputTextHelp";
public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.TextHelp";
Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/inputTextHelp/resource/inputTextHelp.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/inputTextHelp/resource/inputTextHelp.js?rev=1423856&r1=1423855&r2=1423856&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/inputTextHelp/resource/inputTextHelp.js (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/inputTextHelp/resource/inputTextHelp.js Wed Dec 19 13:25:01 2012
@@ -1,17 +1,20 @@
-function resetHelpValue(helpText, id)
-{
- var element=document.getElementById(id);
- if(element.value==helpText)
- {
- element.value="";
- }
-}
+window.org = window.org || {};
+org.apache = org.apache || {};
+org.apache.myfaces = org.apache.myfaces || {};
+if (!org.apache.myfaces.InputTextHelp) {
+ org.apache.myfaces.InputTextHelp = function() {};
-function selectText(helpText, id)
-{
- var element=document.getElementById(id);
- if(element.value==helpText)
- {
- element.select();
- }
+ org.apache.myfaces.InputTextHelp.resetHelpValue = function(helpText, id) {
+ var element = document.getElementById(id);
+ if (element.value == helpText) {
+ element.value = "";
+ }
+ };
+
+ org.apache.myfaces.InputTextHelp.selectText = function(helpText, id) {
+ var element = document.getElementById(id);
+ if (element.value == helpText) {
+ element.select();
+ }
+ };
}
\ No newline at end of file
Modified: myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java?rev=1423856&r1=1423855&r2=1423856&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java (original)
+++ myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/inputTextHelp/AbstractHtmlInputTextHelp.java Wed Dec 19 13:25:01 2012
@@ -36,8 +36,8 @@ import org.apache.myfaces.component.html
*/
public abstract class AbstractHtmlInputTextHelp extends HtmlInputText
{
- public static final String JS_FUNCTION_SELECT_TEXT = "selectText";
- public static final String JS_FUNCTION_RESET_HELP = "resetHelpValue";
+ public static final String JS_FUNCTION_SELECT_TEXT = "org.apache.myfaces.InputTextHelp.selectText";
+ public static final String JS_FUNCTION_RESET_HELP = "org.apache.myfaces.InputTextHelp.resetHelpValue";
public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlInputTextHelp";
public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.TextHelp";
Modified: myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.inputTextHelp/inputTextHelp.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.inputTextHelp/inputTextHelp.js?rev=1423856&r1=1423855&r2=1423856&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.inputTextHelp/inputTextHelp.js (original)
+++ myfaces/tomahawk/trunk/core20/src/main/javascript/oam.custom.inputTextHelp/inputTextHelp.js Wed Dec 19 13:25:01 2012
@@ -1,17 +1,20 @@
-function resetHelpValue(helpText, id)
-{
- var element=document.getElementById(id);
- if(element.value==helpText)
- {
- element.value="";
- }
-}
+window.org = window.org || {};
+org.apache = org.apache || {};
+org.apache.myfaces = org.apache.myfaces || {};
+if (!org.apache.myfaces.InputTextHelp) {
+ org.apache.myfaces.InputTextHelp = function() {};
+
+ org.apache.myfaces.InputTextHelp.resetHelpValue = function(helpText, id) {
+ var element = document.getElementById(id);
+ if (element.value == helpText) {
+ element.value = "";
+ }
+ };
-function selectText(helpText, id)
-{
- var element=document.getElementById(id);
- if(element.value==helpText)
- {
- element.select();
- }
-}
\ No newline at end of file
+ org.apache.myfaces.InputTextHelp.selectText = function(helpText, id) {
+ var element = document.getElementById(id);
+ if (element.value == helpText) {
+ element.select();
+ }
+ };
+}
\ No newline at end of file