9 modified, 4 new for 1.3.1
[webos-internals:shivaramv-modifications.git] / messaging / messaging-add-select-all-and-new-message.patch
1 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
2 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
3 @@ -57,6 +57,11 @@
4                         template: new Template($L("#{chatAddress} is offline")),
5                         isTransientFn: ChatFlags.isTransientOffline
6                 };
7 +               this.appMenuComposeNewItem = {
8 +                       label: $L('Compose new...'),
9 +                       command: 'composeNew',
10 +                       disabled: false
11 +               };
12                 this.messageTemplatePath = 'chatview/message/';
13                 
14                 this.appMenuAddPictureItem = {
15 @@ -78,6 +84,7 @@
16                 var chatEditItems = {
17                         label: $L('Edit'),
18                         items: [
19 +                           Mojo.Menu.selectAllItem,
20                                 Mojo.Menu.cutItem,
21                                 Mojo.Menu.copyItem,
22                                 {label: $L('Copy All'), command: 'copyall'},            
23 @@ -89,6 +94,7 @@
24                         visible: true,
25                         label: $L('Chat view menu'),
26                         items: [
27 +               this.appMenuComposeNewItem,                     
28                                 chatEditItems,
29                                 this.appMenuAddPictureItem,
30                                 Mojo.Menu.helpItem
31 @@ -226,7 +232,10 @@
32                         this.handleFocus();
33                 }               
34         },
35 -
36 +       
37 +  loadComposeView: function(params) {
38 +    this.controller.stageController.pushScene('compose',params);
39 +  },
40         cleanup: function(){
41                 this.chatViewHeaderClickTarget.stopObserving(Mojo.Event.tap, this.handleHeaderTap);
42                 this.chatListWidget.stopObserving(Mojo.Event.listTap, this.handleMessageTap);
43 @@ -311,7 +320,10 @@
44         
45         handleCommand: function(event){
46                 if (event.type == Mojo.Event.command) {
47 -                       if (event.command == 'addPicture') {
48 +                       if (event.command == 'composeNew') {
49 +                               this.loadComposeView();
50 +                               event.stop();
51 +                       } else if (event.command == 'addPicture') {
52                                 this.attachFilePicker();
53                                 event.stop();
54                         } else if (event.command == 'blockUsername') {
55 \ No newline at end of file