All of Jason\'s updates
[webos-internals:shivaramv-modifications.git] / top-bar / top-bar-date-as-carrier-string.patch
1 diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
2 index 5dc60f6..c432095 100644
3 --- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
4 +++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
5 @@ -296,7 +296,7 @@ updateAppMenuTitle: function(payload) {
6         if (payload.title) {
7                 $('carrier').hide();
8                 if (payload.id == "com.palm.app.phone" || payload.id == "com.palm.app.firstuse"){ 
9 -                       $('appname').innerHTML = this.carrierText;
10 +                       $('appname').innerHTML = payload.appmenu || payload.title;
11                         this.phoneIsForeground = true;
12                 }
13                 else if (this.isPreferences(payload))  {
14 @@ -388,8 +388,8 @@ handleStatusChange: function(payload) {
15                 
16         if (payload.locked != null) {
17                 if (payload.locked) {
18 +                       $('date').hide();
19                         $('clock').hide();
20 -                       $('date').show();
21                         this.deviceLocked = true;
22                 }
23                 else {
24 @@ -582,8 +582,8 @@ handlePowerQueryNotifications: function(payload){
25                                 $('rssi').className = "flight-mode";
26                         }
27                         else {
28 -                               this.carrierText = this.$L("Phone offline");
29 -                               this.carrierTextEnglish = "Phone offline";
30 +                               this.carrierText = new Date().toDateString();
31 +                               this.carrierTextEnglish = this.carrierText;
32                                 $('carrier').innerHTML = this.carrierText;
33                         }                                                       
34                         $('roaming').hide();
35 @@ -611,8 +611,8 @@ handleNetworkStatusQueryNotification: function(payload) {
36                                 this.carrierTextEnglish = "Palm";
37                         }
38                         else{
39 -                               this.carrierText = this.$L(payload.extended.networkName.escapeHTML());
40 -                               this.carrierTextEnglish = payload.extended.networkName.escapeHTML();
41 +                               this.carrierText = new Date().toDateString();
42 +                               this.carrierTextEnglish = this.carrierText;
43                         } 
44                                 
45                         $('carrier').innerHTML = this.carrierText;              
46 @@ -988,8 +988,8 @@ handletelephonyNotifications: function(payload) {
47                                 this.updateAirplaneModeProgress('phone');
48                         }
49                         else {
50 -                               this.carrierText = this.$L("Phone offline");
51 -                               this.carrierTextEnglish = "Phone offline";
52 +                               this.carrierText = new Date().toDateString();
53 +                               this.carrierTextEnglish = this.carrierText;
54                                 $('carrier').innerHTML = this.carrierText;
55                         }
56                         $('datanet').className = 'off';
57 @@ -1015,8 +1015,8 @@ handletelephonyNotifications: function(payload) {
58                                 }
59                                         
60                                 else{
61 -                                       this.carrierText = this.$L(networkMsg.networkName.escapeHTML());
62 -                                       this.carrierTextEnglish = networkMsg.networkName.escapeHTML();
63 +                                       this.carrierText = new Date().toDateString();
64 +                                       this.carrierTextEnglish = this.carrierText;
65                                 }       
66                                         
67                                 $('carrier').innerHTML = this.carrierText;
68 @@ -2750,6 +2750,9 @@ updateClockEveryMinute: function() {
69         var date = new Date();
70         var format = Mojo.Format.getFormatHash()['shortTime24'];
71         
72 +       this.carrierText = new Date().toDateString();
73 +       $('carrier').innerHTML = this.carrierText;
74 +       
75         if (Mojo.Format.using12HrTime()) {
76                 if (date.getHours() > 12) {
77                         date.setHours(date.getHours() % 12);