aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-10-30 17:33:10 -0700
committerfriendica <info@friendica.com>2013-10-30 17:33:10 -0700
commita5693df07fdf6fdf31247bfe0700d4c8096d4fbf (patch)
treecf604e95a2b10639f281a1c20fa3caa0a601bb84
parent2035a5dd763f7524cdc1a678b0e8dbca94f270f5 (diff)
downloadvolse-hubzilla-a5693df07fdf6fdf31247bfe0700d4c8096d4fbf.tar.gz
volse-hubzilla-a5693df07fdf6fdf31247bfe0700d4c8096d4fbf.tar.bz2
volse-hubzilla-a5693df07fdf6fdf31247bfe0700d4c8096d4fbf.zip
issue #189 - show post edited time on relative date hovertip
-rw-r--r--include/ItemObject.php1
-rw-r--r--include/conversation.php1
-rw-r--r--js/main.js11
-rwxr-xr-xview/tpl/conv_item.tpl2
-rwxr-xr-xview/tpl/search_item.tpl3
5 files changed, 15 insertions, 3 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 59b4538df..818f8c0b2 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -216,6 +216,7 @@ class Item extends BaseObject {
'str_app' => sprintf( t(' from %s'), $item['app']),
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
+ 'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''),
'lock' => $lock,
'verified' => $verified,
'unverified' => $unverified,
diff --git a/include/conversation.php b/include/conversation.php
index 831a00519..e8b41e775 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -685,6 +685,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
'str_app' => sprintf( t(' from %s'), $item['app']),
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
+ 'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''),
'location' => $location,
'indent' => '',
'owner_name' => $owner_name,
diff --git a/js/main.js b/js/main.js
index f4599e20c..a9e670da5 100644
--- a/js/main.js
+++ b/js/main.js
@@ -580,6 +580,17 @@ function updateConvItems(mode,data) {
updateConvItems(update_mode,data);
$("#page-spinner").spin(false);
$("#profile-jot-text-loading").spin(false);
+
+ // FIXME - the following lines were added so that almost
+ // immediately after we update the posts on the page, we
+ // re-check and update the notification counts.
+ // As it turns out this causes a bit of an inefficiency
+ // as we're pinging twice for every update, once before
+ // and once after. A btter way to do this is to rewrite
+ // NavUpdate and perhpas LiveUpdate so that we check for
+ // post updates first and only call the notification ping
+ // once.
+
updateCountsOnly = true;
if(timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,10);
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 095bd0df3..6927eb9e4 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -39,7 +39,7 @@
<div class="wall-item-author">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.via}} <a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}<br />
- <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">{{if $item.verified}}<i class="icon-ok" title="{{$item.verified}}"></i>&nbsp;{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}</span>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div>
+ <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">{{if $item.verified}}<i class="icon-ok" title="{{$item.verified}}"></i>&nbsp;{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}</span>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div>
</div>
<div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
<div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl
index 5953522dc..853bbfdcd 100755
--- a/view/tpl/search_item.tpl
+++ b/view/tpl/search_item.tpl
@@ -24,8 +24,7 @@
</div>
<div class="wall-item-author">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a><br />
- <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">{{if $item.verified}}<i class="icon-ok" title="{{$item.verified}}"></i>&nbsp;{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}</span>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div>
-
+ <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">{{if $item.verified}}<i class="icon-ok" title="{{$item.verified}}"></i>&nbsp;{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}</span>{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}</div>
</div>
<div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
<div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>