updates and additions
[webos-internals:imagineer1981s-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 29204c4..5b36143 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 @@ -315,7 +315,7 @@ var ChatviewAssistant = Class.create({
6                         hintText: $L('Enter message here...'),
7                         multiline: true,
8                         focus: false,
9 -                       enterSubmits: true,
10 +                       enterSubmits: false,
11                         inputName: "messageTextElement",
12                         className: " ",
13                         changeOnKeyPress: true
14 @@ -2066,6 +2066,7 @@ var ChatviewAssistant = Class.create({
15                                 }
16                                 //msg.messageText = PalmSystem.runTextIndexer(msg.messageText);
17                                 delayed.messageText = msg.messageText;
18 +                               msg.messageText = msg.messageText.replace(/\n/g,"<br>");
19                         }
20                         
21                         var icons = this.Messaging.IMAccounts.getIcons(msg.serviceName);
22 @@ -2929,7 +2930,7 @@ var ChatviewAssistant = Class.create({
23                 // It will be cleared on key up.
24                 if (event) {
25                         if (Mojo.Char.isEnterKey(event.keyCode)) {
26 -                               this.sendButton.addClassName('selected');
27 +                               //this.sendButton.addClassName('selected');
28                         } else if (event.keyCode===129) {
29                                 this.ctrlKeyPressed = true;
30                         } else if (event.keyCode===Mojo.Char.spaceBar && this.ctrlKeyPressed) {
31 @@ -2947,11 +2948,11 @@ var ChatviewAssistant = Class.create({
32         handleTextAreaKeyUp: function(event) {
33                 if (event) {
34                         if (Mojo.Char.isEnterKey(event.keyCode)) {
35 -                               this.considerForSend();
36 -                               Event.stop(event);
37 +                               //this.considerForSend();
38 +                               //Event.stop(event);
39                                 
40                                 // Remove highlight that was added on keydown.
41 -                               this.sendButton.removeClassName('selected');
42 +                               //this.sendButton.removeClassName('selected');
43                         } else if (event.keyCode===129) {
44                                 this.ctrlKeyPressed = false;
45                         }
46 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
47 index 57dfb0f..484bebb 100644
48 --- a/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
49 +++ b/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
50 @@ -164,7 +164,7 @@ var ComposeAssistant = Class.create({
51                     hintText: $L('Enter message here...'),
52                     multiline: true,
53                     focus: (this.prePopulatedRecipients.length > 0),
54 -                   enterSubmits: true,
55 +                   enterSubmits: false,
56                         requiresEnterKey: true,
57                     modelProperty: "value",
58                         changeOnKeyPress: true
59 @@ -669,8 +669,8 @@ var ComposeAssistant = Class.create({
60  
61         handleTextAreaKeyUp: function(event) {
62                 if (event && Mojo.Char.isEnterKey(event.keyCode)) {
63 -                       this.considerForSend();
64 -                       Event.stop(event);
65 +                       //this.considerForSend();
66 +                       //Event.stop(event);
67                 }               
68         },
69