Patches.
[webos-internals:modifications.git] / messaging / messaging-enter-key-for-new-line.patch
1 diff --git a/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js b/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
2 index 484cd45..d35d6ee 100644
3 --- a/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
5 @@ -134,7 +134,7 @@ var ChatviewAssistant = Class.create({
6                         hintText: $L('Enter message here...'),
7                         multiline: true,
8                         focus: false,
9 -                       enterSubmits: true,
10 +                       enterSubmits: false,
11                         textFieldName: "messageTextElement",
12                         className: " ",
13                         changeOnKeyPress: true
14 @@ -1463,6 +1463,7 @@ var ChatviewAssistant = Class.create({
15                                 if (ChatFlags.isOutgoing(msg.flags)) {
16                                         msg.messageText = msg.messageText.escapeHTML();
17                                 }
18 +                               msg.messageText=msg.messageText.replace(/\n/g,"<br>");
19                                 //msg.messageText = PalmSystem.runTextIndexer(msg.messageText);
20                                 delayed.messageText = msg.messageText;
21                         }
22 @@ -2373,13 +2374,13 @@ var ChatviewAssistant = Class.create({
23         },
24  
25         handleTextAreaKeyUp: function(event) {
26 -               if (event && Mojo.Char.isEnterKey(event.keyCode)) {
27 -                       this.considerForSend();
28 -                       Event.stop(event);
29 +               //if (event && Mojo.Char.isEnterKey(event.keyCode)) {
30 +               //      this.considerForSend();
31 +               //      Event.stop(event);
32                         
33                         // Remove highlight that was added on keydown.
34 -                       this.sendButton.removeClassName('selected');
35 -               }
36 +               //      this.sendButton.removeClassName('selected');
37 +               //}
38         },
39  
40         handleTextAreaChange: function() {
41 diff --git a/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js b/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
42 index 3183de4..61ee5c2 100644
43 --- a/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
44 +++ b/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
45 @@ -120,7 +120,7 @@ var ComposeAssistant = Class.create({
46             hintText: $L('Enter message here...'),
47             multiline: true,
48             focus: false,
49 -           enterSubmits: true,
50 +           enterSubmits: false,
51                 requiresEnterKey: true,
52             modelProperty: "value",
53                 changeOnKeyPress: true
54 @@ -327,10 +327,10 @@ var ComposeAssistant = Class.create({
55         },
56  
57         handleTextAreaKeyUp: function(event) {
58 -               if (event && Mojo.Char.isEnterKey(event.keyCode)) {
59 -                       this.considerForSend();
60 -                       Event.stop(event);
61 -               }               
62 +               //if (event && Mojo.Char.isEnterKey(event.keyCode)) {
63 +               //      this.considerForSend();
64 +               //      Event.stop(event);
65 +               //}             
66         },
67  
68         handleTextAreaChange: function() {