Skip to content
Browse files

fixed issue with timestamp not being a date

  • Loading branch information...
1 parent 62c9dd6 commit 07a435b99784622d5fe20a5c620e1d010db615f9 @ahsteele ahsteele committed
Showing with 5 additions and 2 deletions.
  1. +5 −1 geocamTalk/templates/geocamTalk/base.html
  2. +0 −1 geocamTalk/templates/geocamTalk/message_list.html
View
6 geocamTalk/templates/geocamTalk/base.html
@@ -44,7 +44,6 @@
var msg = data['ms'][i];
var pk = msg['messageId'];
var content = msg['content'];
- var content_timestamp = msg['contentTimestamp']; // TODO: convert this to a string
var has_geolocation = msg['hasGeolocation'];
var authorUsername = msg['authorUsername'];
var authorFullname = msg['authorFullname'];
@@ -52,6 +51,11 @@
authorFullname = '<a href="{% url geocamTalk.views.message_list recipient.username %}/' +authorUsername+ '">' +authorFullname+ '</a>' ;
{% endif %}
+ var msgDate = new Date (msg['contentTimestamp']);
+ var content_timestamp =
+ msgDate.getDate() + "/" + msgDate.getMonth() + "/" + msgDate.getFullYear()
+ + " " + msgDate.getHours() + ":" + msgDate.getMinutes();
+
html_str += '<li id="message_'+pk+'"><p id="message_'+pk+'_header">';
html_str += 'On '+content_timestamp+' '+authorFullname+' said';
if (has_geolocation == true) {
View
1 geocamTalk/templates/geocamTalk/message_list.html
@@ -43,7 +43,6 @@
{% else %}
{{ m.get_author_string}}
{% endif %}
- said
{% if m.has_geolocation %}<a data-rel="dialog" data-transition="pop" data-inline="true" data-role="button" data-icon="geoCam-map" data-iconpos="notext">Map Info</a>{%endif%}
{% if m.has_audio %}
<a class="media" href="{{m.audio_file.url}}"></a>

0 comments on commit 07a435b

Please sign in to comment.
Something went wrong with that request. Please try again.