16 Updated patches.
[webos-internals:shivaramv-modifications.git] / messaging / messaging-enable-landscape-messaging.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..db6cc9c 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 @@ -129,6 +129,9 @@ var ChatviewAssistant = Class.create({
6                 Mojo.Log.info("++++++ChatviewAssistant::setup");
7                 this.controller.setupWidget(Mojo.Menu.appMenu, this.appMenuAttrs, this.appMenuModel);
8                 
9 +               // enable free orientation
10 +               this.controller.window.PalmSystem.setWindowOrientation("free");
11 +               
12                 var messageTextWidgetAttributes = {
13                         modelProperty: 'value',
14                         hintText: $L('Enter message here...'),
15 @@ -229,6 +232,14 @@ var ChatviewAssistant = Class.create({
16                 this.handleClearNotifications();
17         },
18         
19 +       orientationChanged: function(orientation) {
20 +               if (orientation === "left" || orientation === "right") {
21 +                       this.controller.sceneElement.addClassName('landscape');
22 +               } else {
23 +                       this.controller.sceneElement.removeClassName('landscape');
24 +               }
25 +       },
26 +
27         handleClearNotifications: function() {
28                 if (this.isWindowFocused && this.isSceneActive && this.isScreenOn && !this.isScreenLocked) {
29                         Mojo.Log.info("[CV] ****** handleClearNotifications ---- calling handleStageFocus()");
30 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
31 index 3183de4..a7e81be 100644
32 --- a/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
33 +++ b/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
34 @@ -95,6 +95,9 @@ var ComposeAssistant = Class.create({
35  
36      this.controller.setupWidget(Mojo.Menu.appMenu, this.appMenuAttrs, this.appMenuModel);
37  
38 +       // enable free orientation
39 +       this.controller.window.PalmSystem.setWindowOrientation("free");
40 +
41         this.searchList = {
42                 "property": "to$A",
43                 "includeEmails": false,
44 @@ -449,6 +452,14 @@ var ComposeAssistant = Class.create({
45         this.setCharacterCounterMaxLength();
46    },
47    
48 +       orientationChanged: function(orientation) {
49 +               if (orientation === "left" || orientation === "right") {
50 +                       this.controller.sceneElement.addClassName('landscape');
51 +               } else {
52 +                       this.controller.sceneElement.removeClassName('landscape');
53 +               }
54 +       },
55 +
56    cleanup: function() {
57         this.saveToDraft();
58         
59 diff --git a/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js b/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
60 index c301f25..d8a28dc 100644
61 --- a/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
62 +++ b/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
63 @@ -203,7 +203,9 @@ var ListviewAssistant = Class.create(App.Scene, {
64                         items: this.commandMenuModel
65                 };
66         
67 -               this.controller.setupWidget(Mojo.Menu.commandMenu, {}, this.cmdMenuModel);
68 +               this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);
69 +               // enable free orientation
70 +               this.controller.window.PalmSystem.setWindowOrientation("free");
71         
72                 this.filterField = this.controller.get('filterField');
73                 this.buddyListHeader = this.controller.get('buddyListHeader');
74 @@ -1344,6 +1346,14 @@ var ListviewAssistant = Class.create(App.Scene, {
75                 this.controller.stageController.pushScene('debug');
76         },
77         
78 +       orientationChanged: function(orientation) {
79 +               if (orientation === "left" || orientation === "right") {
80 +                       this.controller.sceneElement.addClassName('landscape');
81 +               } else {
82 +                       this.controller.sceneElement.removeClassName('landscape');
83 +               }
84 +       },
85 +       
86         cleanup: function() {
87                 // save the listview state
88                 MessagingMojoService.setIsHistoryViewSelected(this.controller, (this.currentListView == this.Messaging.Views.HISTORY));
89 diff --git a/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css b/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
90 index 019deb5..acd0763 100644
91 --- a/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
92 +++ b/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
93 @@ -701,11 +701,11 @@ img.avatar-overlay {
94  }
95  
96  .their-chat .message-container {
97 -               width: 255px;
98 +       width: 85%;
99  }
100  
101  .my-chat .message-container {
102 -               width: 280px;
103 +       width: 95%;
104  }
105  
106  .chat-entry .chat-balloon {
107 @@ -994,7 +994,7 @@ img.avatar-overlay {
108                 position: fixed;
109                 bottom: 0px;
110                 left: 0px;
111 -               width: 320px;
112 +               width: 100%;
113  }
114  
115  /* Force addressing widget to sit on top of