updates and additions
[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 0e239cc..dbaae21 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 @@ -349,7 +349,7 @@ updateAppMenuTitle: function(payload) {
6         if (payload.title) {
7                 
8                 if (payload.id == "com.palm.app.phone" || payload.id == "com.palm.app.stk") { 
9 -                       Mojo.Dom.get('appname').innerHTML = this.carrierText;
10 +                       Mojo.Dom.get('appname').innerHTML = payload.appmenu || payload.title;
11                         this.phoneIsForeground = true;
12                 }
13                 else if (this.isPreferences(payload))  {
14 @@ -450,7 +450,7 @@ handleStatusChange: function(payload) {
15         if (payload.locked != null) {
16                 if (payload.locked) {
17                         Mojo.Dom.get('clock').hide();
18 -                       Mojo.Dom.get('date').show();
19 +                       Mojo.Dom.get('date').hide();
20                         this.deviceLocked = true;
21                 }
22                 else {
23 @@ -690,8 +690,8 @@ handlePowerQueryNotifications: function(payload){
24                                 this.updateRSSIIcon("flight-mode");
25                         }
26                         else {
27 -                               this.carrierText = $L("Phone offline");
28 -                               this.currentCarrierText = "Phone offline";
29 +                               this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
30 +                               this.currentCarrierText = this.carrierText;
31                                 Mojo.Dom.get('carrier').innerHTML = this.carrierText;
32                         }                                                       
33                         Mojo.Dom.get('roaming').hide();
34 @@ -722,8 +722,8 @@ handleNetworkStatusQueryNotification: function(payload) {
35                                 this.currentCarrierText = "Palm";
36                         }
37                         else {
38 -                               this.carrierText = $L(payload.extended.networkName.escapeHTML());
39 -                               this.currentCarrierText = payload.extended.networkName.escapeHTML();
40 +                               this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
41 +                               this.currentCarrierText = this.carrierText;
42                         }
43                         Mojo.Dom.get('carrier').innerHTML = this.carrierText;           
44                         if(payload.extended.registration == 'home') {                   
45 @@ -1136,8 +1136,8 @@ handletelephonyNotifications: function(payload) {
46                                 this.updateRSSIIcon("flight-mode");
47                         }
48                         else {
49 -                               this.carrierText = $L("Phone offline");
50 -                               this.currentCarrierText = "Phone offline";
51 +                               this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
52 +                               this.currentCarrierText = this.carrierText;
53                                 Mojo.Dom.get('carrier').innerHTML = this.carrierText;
54                         }
55                         Mojo.Dom.get('datanet').className = 'off';
56 @@ -1162,8 +1162,8 @@ handletelephonyNotifications: function(payload) {
57                                         this.currentCarrierText = "Palm";
58                                 }
59                                 else {
60 -                                       this.carrierText = $L(networkMsg.networkName.escapeHTML());
61 -                                       this.currentCarrierText = networkMsg.networkName.escapeHTML();
62 +                                       this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
63 +                                       this.currentCarrierText = this.carrierText;
64                                 }
65                                 Mojo.Dom.get('carrier').innerHTML = this.carrierText;
66                                 this.simlocked = false;
67 @@ -2983,6 +2983,8 @@ updateClockEveryMinute: function() {
68         
69         Mojo.Log.error("UpdateClockEveryMinute " + date);
70         
71 +       this.carrierText = new Date().toDateString().substring(0, new Date().toDateString().lastIndexOf(" "));
72 +       Mojo.Dom.get('carrier').innerHTML = this.carrierText;
73         if(Mojo.Format.using12HrTime()) 
74                 format = Mojo.Format.getFormatHash()['shortTime12'];
75         else