16 Updated patches.
[webos-internals:shivaramv-modifications.git] / messaging / messaging-remove-send-and-attach-buttons.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..d95f82c 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 @@ -62,11 +62,12 @@ var ChatviewAssistant = Class.create({
6                 };
7                 this.messageTemplatePath = 'chatview/message/';
8                 
9 -               this.appMenuAddPictureItem = {
10 +               /* this.appMenuAddPictureItem = {
11                         label: $L('Attach file...'),
12                         command: 'addPicture',
13                         disabled: false
14 -               };
15 +               }; */
16 +               this.appMenuAddPictureItem = {label: $L('Attach file...'), shortcut: 'p', command:'addPicture', enabled:true};
17  
18                 this.appMenuBlockUsernameItem = {
19                         label: $L('Block this person'),
20 @@ -334,6 +335,8 @@ var ChatviewAssistant = Class.create({
21                         } else if (event.command === 'copyall') {
22                                 this.copyConversationToClipboard();
23                         }
24 +               } else if (event.type == Mojo.Event.forward) { 
25 +                       this.considerForSend();
26                 } else if (event.type === Mojo.Event.back) {
27                         event.stop();
28                         this.popAndRevealListView();
29 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
30 index 3183de4..7bdbacf 100644
31 --- a/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
32 +++ b/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
33 @@ -15,7 +15,7 @@ var ComposeAssistant = Class.create({
34                         this.toggleDebugMenu = listviewSceneAssistant.toggleDebugMenu.bind(listviewSceneAssistant,true);
35                 }
36  
37 -               this.appMenuAddPictureItem = {label: $L('Attach file...'), command:'addPicture', enabled:true};
38 +               this.appMenuAddPictureItem = {label: $L('Attach file...'), shortcut: 'p', command:'addPicture', enabled:true};
39  
40                 this.appMenuAttrs = {omitDefaultItems: true};   
41                 this.appMenuModel = { visible:true, label: $L('Chat view menu'), items: [Mojo.Menu.editItem,this.appMenuAddPictureItem,Mojo.Menu.helpItem]};   
42 @@ -484,6 +484,8 @@ var ComposeAssistant = Class.create({
43                                 this.attachFilePicker();
44                                 event.stop();
45                         } 
46 +               } else if (event.type == Mojo.Event.forward) {  
47 +               this.considerForSend();                         
48                 } else if(event.type == Mojo.Event.back) {
49                         if (this.launchedAsForward === undefined) {
50                                 event.stop();
51 diff --git a/usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html b/usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html
52 index d0d8745..7576a6e 100644
53 --- a/usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html
54 +++ b/usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html
55 @@ -27,10 +27,10 @@
56                                                         </div>
57                                                         <img id="attachmentImage" src=""/>
58                                                 </div>
59 -                                               <div id="ActionButton" class="icon right empty">
60 +                                               <div id="ActionButton" class="icon right empty" style="display:none;">
61                                                         <div id="AttachButton" class="stuck attachButton" style="display:none;" x-mojo-tap-highlight="momentary">
62                                                         </div>
63 -                                                       <div id="SendButton" class="stuck sendButton" x-mojo-tap-highlight="immediate">
64 +                                                       <div id="SendButton" class="stuck sendButton" style="display:none;" x-mojo-tap-highlight="immediate">
65                                                                 <div id="segmentCounterContainer">
66                                                                         <div id="segmentCounter">
67                                                                         </div>
68 diff --git a/usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html b/usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html
69 index 30daa88..d1e2948 100644
70 --- a/usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html
71 +++ b/usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html
72 @@ -11,10 +11,10 @@
73                                                 </div>
74                                                 <img id="attachmentImage" src=""/>
75                                         </div>
76 -                                       <div id="ActionButton" class="icon right empty">
77 +                                       <div id="ActionButton" class="icon right empty" style="display:none;">
78                                                 <div id="AttachButton" class="stuck attachButton" x-mojo-tap-highlight="momentary">
79                                                 </div>
80 -                                               <div id="SendButton" class="stuck sendButton" x-mojo-tap-highlight="momentary">
81 +                                               <div id="SendButton" class="stuck sendButton" style="display:none;" x-mojo-tap-highlight="momentary">
82                                                         <div id="segmentCounterContainer">
83                                                                 <div id="segmentCounter">
84                                                                 </div>