You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2007/05/22 01:04:43 UTC

svn commit: r540345 - in /incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp: META-INF/sca-contribution.xml META-INF/sca-deployables/ chat.html

Author: lresende
Date: Mon May 21 16:04:42 2007
New Revision: 540345

URL: http://svn.apache.org/viewvc?view=rev&rev=540345
Log:
Remove the requirement of META-INF/sca-deployables and fixed html to send message when pressed enter

Removed:
    incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/META-INF/sca-deployables/
Modified:
    incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml
    incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/chat.html

Modified: incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml?view=diff&rev=540345&r1=540344&r2=540345
==============================================================================
--- incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml (original)
+++ incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/META-INF/sca-contribution.xml Mon May 21 16:04:42 2007
@@ -18,5 +18,5 @@
     * under the License.    
 -->
 <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0">
-   <deployable composite="chat"/>
+   <deployable composite="Chat"/>
 </contribution>

Modified: incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/chat.html
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/chat.html?view=diff&rev=540345&r1=540344&r2=540345
==============================================================================
--- incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/chat.html (original)
+++ incubator/tuscany/java/sca/samples/chat-webapp/src/main/webapp/chat.html Mon May 21 16:04:42 2007
@@ -6,6 +6,17 @@
 
     <script language="JavaScript">
 
+       function clickButton(e, buttonid){
+          var evt = e ? e : window.event;
+          var bt = document.getElementById(buttonid);
+          if (bt){
+              if (evt.keyCode == 13){
+                  bt.click();
+                  return false;
+              }
+          }
+       } 
+       
        ChatReference.chat = function(msg) {
           var chatLog = document.getElementById('chatLog');
           chatLog.innerHTML = msg + '<br>' + chatLog.innerHTML;
@@ -31,8 +42,8 @@
       Nickname: <input type="text" id="nickName" size="10"/>
       <br><br>
 
-      Enter text: <input type="text" id="chatText" size="80" onEnter="sendChat()"/>
-      <input type="button" value="Send" onclick="sendChat()" />
+      Enter text: <input type="text" id="chatText" size="80" onkeypress="return clickButton(event,'Send')"/>
+      <input type="button" name="Send" value="Send" id="Send" onclick="sendChat()" />
 
       <br><br>
       <div id="chatLog" style="overflow:auto; height:400px; border:1px solid"></div>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org