Commit 8aaeaf4017c5d82ee3c55f6df4b98b80d53c0fef
- Diff rendering mode:
- inline
- side by side
|   | |||
| 1 | This patch adds clean timestamps to all messages and gets rid of the divider bar unless transport is changed. | ||
| 2 | Index: /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); | ||
| 47 | Index: /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; |
|   | |||
| 1 | This patch adds clean timestamps to all messages and gets rid of the divider bar unless transport is changed. | ||
| 2 | Index: /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); | ||
| 47 | Index: /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; |
|   | |||
| 1 | This patch adds clean timestamps to all messages and gets rid of the divider bar unless transport is changed. | ||
| 1 | 2 | Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js | |
| 2 | 3 | =================================================================== | |
| 3 | 4 | --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js | |
| 4 | 5 | +++ /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({ | ||
| 7 | 7 | d.setTime(msg.deviceTimeStamp); | |
| 8 | 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 | ||
| 9 | |||
| 10 | + // timestamp hack - enables timestamps on all messages (clean-messenger); | ||
| 11 | 11 | + var ts = new Date(); | |
| 12 | 12 | + ts.setTime(msg.deviceTimeStamp); | |
| 13 | 13 | + msg.timeStampText = Mojo.Format.formatDate(ts,'short'); | |
| 14 | |||
| 14 | + | ||
| 15 | 15 | // divider hack - round to the nearest 5 minutes | |
| 16 | 16 | // 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 | ||
| 18 | 18 | var deviceTimeStampMinutes = d.getMinutes(); | |
| 19 | 19 | d.setMinutes((deviceTimeStampMinutes - (deviceTimeStampMinutes % 5))); | |
| 20 | 20 | d.setSeconds(0); | |
| 21 | 21 | - 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); | ||
| 23 | 24 | ||
| 24 | 25 | // if the INCOMING message was sent longer than 10 minutes before it arrived on device, | |
| 25 | 26 | // add sent date to indicate that this delay happened | |
| 26 | 27 | - 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)) { | ||
| 28 | 29 | var d = new Date(); | |
| 29 | 30 | var today = d.getTime(); | |
| 30 | 31 | d.setTime(msg.timeStamp); | |
| 31 | @@ -1264,10 +1269,10 @@ var ChatviewAssistant = Class.create({ | ||
| 32 | @@ -1311,10 +1317,10 @@ var ChatviewAssistant = Class.create({ | ||
| 32 | 33 | ||
| 33 | 34 | // Only show the message sent time if it is less than two days old | |
| 34 | 35 | // from when it arrived on device | |
| … | … | ||
| 37 | 37 | - msg.timeStampDeltaMsg = new Template($L("Message Sent: #{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')}); | |
| 38 | 38 | - } | |
| 39 | 39 | - } | |
| 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); } | ||
| 44 | 44 | ||
| 45 | 45 | if (msg.callbackNumber) { | |
| 46 | 46 | msg.callbackNumber = PalmSystem.runTextIndexer(msg.callbackNumber); | |
| … | … | ||
| 48 | 48 | =================================================================== | |
| 49 | 49 | --- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css | |
| 50 | 50 | +++ /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 { | ||
| 52 | 52 | width: 40px; | |
| 53 | 53 | height: 40px; | |
| 54 | 54 | } | |
| 55 | - | ||
| 56 | +/* timestamp formatting */ | ||
| 57 | +.timeStamp { | ||
| 58 | + font-size: 12px; | ||
| 59 | + font-style: italic; | ||
| 60 | + color: #1111ff; | ||
| 61 | + } | ||
| 55 | +/* timestamp formatting (clean-messenger)*/ | ||
| 56 | |||
| 62 | 57 | .message.status-success { | |
| 63 | 58 | color: #000000; | |
| 64 | } |

