Commit 8aaeaf4017c5d82ee3c55f6df4b98b80d53c0fef

  • avatar
  • dBsooner <daniel.beames @dbt…nk.com>
  • Thu Oct 08 04:56:19 CEST 2009
For acydlord: removed improperly formatted title patch. Overwrote messaging-timestamps-clean with his new version.
  
1This patch adds clean timestamps to all messages and gets rid of the divider bar unless transport is changed.
2Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
3===================================================================
4--- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
5+++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
6@@ -1293,17 +1293,23 @@ var ChatviewAssistant = Class.create({
7 d.setTime(msg.deviceTimeStamp);
8 msg.niceDate = BucketDateFormatter.getDateBucket(d,true,true); // this used to use msg.timeStamp - changed 2008-11-05
9
10+ // timestamp hack - enables timestamps on all messages (clean-messenger);
11+ var ts = new Date();
12+ ts.setTime(msg.deviceTimeStamp);
13+ msg.timeStampText = Mojo.Format.formatDate(ts,'short');
14+
15 // divider hack - round to the nearest 5 minutes
16 // we have to do this because the list divider implementation does not allow a divider
17 // to have knowledge about other dividers
18 var deviceTimeStampMinutes = d.getMinutes();
19 d.setMinutes((deviceTimeStampMinutes - (deviceTimeStampMinutes % 5)));
20 d.setSeconds(0);
21- msg.dividerText = msg.transportClass + BucketDateFormatter.getDateBucket(d,true,true);
22+ msg.dividerText = msg.transportClass; // + BucketDateFormatter.getDateBucket(d,true,true);
23+ // comment in previous line kills ~5min timed divider (clean-messenger);
24
25 // if the INCOMING message was sent longer than 10 minutes before it arrived on device,
26 // add sent date to indicate that this delay happened
27- if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) {
28+ // (clean-messenger); if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) {
29 var d = new Date();
30 var today = d.getTime();
31 d.setTime(msg.timeStamp);
32@@ -1311,10 +1317,10 @@ var ChatviewAssistant = Class.create({
33
34 // Only show the message sent time if it is less than two days old
35 // from when it arrived on device
36- if(today-msg.timeStamp <= (1000*60*60*24*2)) {
37- msg.timeStampDeltaMsg = new Template($L("Message Sent: #{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')});
38- }
39- }
40+ // (clean-messenger); if(today-msg.timeStamp <= (1000*60*60*24*2)) {
41+ msg.timeStampDeltaMsg = new Template($L("#{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')});
42+ // (clean-messenger); }
43+ // (clean-messenger); }
44
45 if (msg.callbackNumber) {
46 msg.callbackNumber = PalmSystem.runTextIndexer(msg.callbackNumber);
47Index: /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
48===================================================================
49--- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
50+++ /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
51@@ -681,6 +681,7 @@ img.avatar-overlay {
52 width: 40px;
53 height: 40px;
54 }
55+/* timestamp formatting (clean-messenger)*/
56
57 .message.status-success {
58 color: #000000;
  
1This patch adds clean timestamps to all messages and gets rid of the divider bar unless transport is changed.
2Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
3===================================================================
4--- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
5+++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
6@@ -1293,17 +1293,23 @@ var ChatviewAssistant = Class.create({
7 d.setTime(msg.deviceTimeStamp);
8 msg.niceDate = BucketDateFormatter.getDateBucket(d,true,true); // this used to use msg.timeStamp - changed 2008-11-05
9
10+ // timestamp hack - enables timestamps on all messages (clean-messenger);
11+ var ts = new Date();
12+ ts.setTime(msg.deviceTimeStamp);
13+ msg.timeStampText = Mojo.Format.formatDate(ts,'short');
14+
15 // divider hack - round to the nearest 5 minutes
16 // we have to do this because the list divider implementation does not allow a divider
17 // to have knowledge about other dividers
18 var deviceTimeStampMinutes = d.getMinutes();
19 d.setMinutes((deviceTimeStampMinutes - (deviceTimeStampMinutes % 5)));
20 d.setSeconds(0);
21- msg.dividerText = msg.transportClass + BucketDateFormatter.getDateBucket(d,true,true);
22+ msg.dividerText = msg.transportClass; // + BucketDateFormatter.getDateBucket(d,true,true);
23+ // comment in previous line kills ~5min timed divider (clean-messenger);
24
25 // if the INCOMING message was sent longer than 10 minutes before it arrived on device,
26 // add sent date to indicate that this delay happened
27- if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) {
28+ // (clean-messenger); if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) {
29 var d = new Date();
30 var today = d.getTime();
31 d.setTime(msg.timeStamp);
32@@ -1311,10 +1317,10 @@ var ChatviewAssistant = Class.create({
33
34 // Only show the message sent time if it is less than two days old
35 // from when it arrived on device
36- if(today-msg.timeStamp <= (1000*60*60*24*2)) {
37- msg.timeStampDeltaMsg = new Template($L("Message Sent: #{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')});
38- }
39- }
40+ // (clean-messenger); if(today-msg.timeStamp <= (1000*60*60*24*2)) {
41+ msg.timeStampDeltaMsg = new Template($L("#{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')});
42+ // (clean-messenger); }
43+ // (clean-messenger); }
44
45 if (msg.callbackNumber) {
46 msg.callbackNumber = PalmSystem.runTextIndexer(msg.callbackNumber);
47Index: /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
48===================================================================
49--- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
50+++ /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
51@@ -681,6 +681,7 @@ img.avatar-overlay {
52 width: 40px;
53 height: 40px;
54 }
55+/* timestamp formatting (clean-messenger)*/
56
57 .message.status-success {
58 color: #000000;
  
1This patch adds clean timestamps to all messages and gets rid of the divider bar unless transport is changed.
12Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
23===================================================================
34--- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
45+++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
5@@ -1245,6 +1245,11 @@ var ChatviewAssistant = Class.create({
6 var d = new Date();
6@@ -1293,17 +1293,23 @@ var ChatviewAssistant = Class.create({
77 d.setTime(msg.deviceTimeStamp);
88 msg.niceDate = BucketDateFormatter.getDateBucket(d,true,true); // this used to use msg.timeStamp - changed 2008-11-05
9+
10+ // timestamp hack - enables timestamps on all messages
9
10+ // timestamp hack - enables timestamps on all messages (clean-messenger);
1111+ var ts = new Date();
1212+ ts.setTime(msg.deviceTimeStamp);
1313+ msg.timeStampText = Mojo.Format.formatDate(ts,'short');
14
14+
1515 // divider hack - round to the nearest 5 minutes
1616 // we have to do this because the list divider implementation does not allow a divider
17@@ -1252,11 +1257,11 @@ var ChatviewAssistant = Class.create({
17 // to have knowledge about other dividers
1818 var deviceTimeStampMinutes = d.getMinutes();
1919 d.setMinutes((deviceTimeStampMinutes - (deviceTimeStampMinutes % 5)));
2020 d.setSeconds(0);
2121- msg.dividerText = msg.transportClass + BucketDateFormatter.getDateBucket(d,true,true);
22+ msg.dividerText = msg.transportClass; // + BucketDateFormatter.getDateBucket(d,true,true);
22+ msg.dividerText = msg.transportClass; // + BucketDateFormatter.getDateBucket(d,true,true);
23+ // comment in previous line kills ~5min timed divider (clean-messenger);
2324
2425 // if the INCOMING message was sent longer than 10 minutes before it arrived on device,
2526 // add sent date to indicate that this delay happened
2627- if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) {
27+ // if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) { // timestamp fix var d = new Date();
28+ // (clean-messenger); if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) {
2829 var d = new Date();
2930 var today = d.getTime();
3031 d.setTime(msg.timeStamp);
31@@ -1264,10 +1269,10 @@ var ChatviewAssistant = Class.create({
32@@ -1311,10 +1317,10 @@ var ChatviewAssistant = Class.create({
3233
3334 // Only show the message sent time if it is less than two days old
3435 // from when it arrived on device
3737- msg.timeStampDeltaMsg = new Template($L("Message Sent: #{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')});
3838- }
3939- }
40+ // if(today-msg.timeStamp <= (1000*60*60*24*2)) { // timestamp fix
41+ msg.timeStampDeltaMsg = new Template($L("#{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')});
42+ // } // timestamp fix
43+ // } // timestamp fix
40+ // (clean-messenger); if(today-msg.timeStamp <= (1000*60*60*24*2)) {
41+ msg.timeStampDeltaMsg = new Template($L("#{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')});
42+ // (clean-messenger); }
43+ // (clean-messenger); }
4444
4545 if (msg.callbackNumber) {
4646 msg.callbackNumber = PalmSystem.runTextIndexer(msg.callbackNumber);
4848===================================================================
4949--- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
5050+++ /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
51@@ -681,7 +681,12 @@ img.avatar-overlay {
51@@ -681,6 +681,7 @@ img.avatar-overlay {
5252 width: 40px;
5353 height: 40px;
5454 }
55-
56+/* timestamp formatting */
57+.timeStamp {
58+ font-size: 12px;
59+ font-style: italic;
60+ color: #1111ff;
61+ }
55+/* timestamp formatting (clean-messenger)*/
56
6257 .message.status-success {
6358 color: #000000;
64 }