new patches
[webos-internals:modifications.git] / top-bar / top-bar-date-as-carrier-string-no-year.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 786f7ae..d1ca2b9 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 @@ -297,7 +297,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 @@ -390,7 +390,7 @@ handleStatusChange: function(payload) {
15         if (payload.locked != null) {
16                 if (payload.locked) {
17                         $('clock').hide();
18 -                       $('date').show();
19 +                       $('date').hide();
20                         this.deviceLocked = true;
21                 }
22                 else {
23 @@ -583,8 +583,8 @@ handlePowerQueryNotifications: function(payload){
24                                 $('rssi').className = "flight-mode";
25                         }
26                         else {
27 -                               this.carrierText = this.$L("Phone offline");
28 -                               this.carrierTextEnglish = "Phone offline";
29 +                               this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
30 +                               this.carrierTextEnglish = this.carrierText;
31                                 $('carrier').innerHTML = this.carrierText;
32                         }                                                       
33                         $('roaming').hide();
34 @@ -612,8 +612,8 @@ handleNetworkStatusQueryNotification: function(payload) {
35                                 this.carrierTextEnglish = "Palm";
36                         }
37                         else{
38 -                               this.carrierText = this.$L(payload.extended.networkName.escapeHTML());
39 -                               this.carrierTextEnglish = payload.extended.networkName.escapeHTML();
40 +                               this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
41 +                               this.carrierTextEnglish = this.carrierText;
42                         } 
43                                 
44                         $('carrier').innerHTML = this.carrierText;              
45 @@ -989,8 +989,8 @@ handletelephonyNotifications: function(payload) {
46                                 this.updateAirplaneModeProgress('phone');
47                         }
48                         else {
49 -                               this.carrierText = this.$L("Phone offline");
50 -                               this.carrierTextEnglish = "Phone offline";
51 +                               this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
52 +                               this.carrierTextEnglish = this.carrierText;
53                                 $('carrier').innerHTML = this.carrierText;
54                         }
55                         $('datanet').className = 'off';
56 @@ -1016,8 +1016,8 @@ handletelephonyNotifications: function(payload) {
57                                 }
58                                         
59                                 else{
60 -                                       this.carrierText = this.$L(networkMsg.networkName.escapeHTML());
61 -                                       this.carrierTextEnglish = networkMsg.networkName.escapeHTML();
62 +                                       this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
63 +                                       this.carrierTextEnglish = this.carrierText;
64                                 }       
65                                         
66                                 $('carrier').innerHTML = this.carrierText;
67 @@ -2751,6 +2751,9 @@ updateClockEveryMinute: function() {
68         var date = new Date();
69         var format;
70         
71 +       this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
72 +       $('carrier').innerHTML = this.carrierText;
73 +       
74         if(Mojo.Format.using12HrTime()) 
75                 format = Mojo.Format.getFormatHash()['shortTime12'];
76         else