aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-13 13:05:14 -0800
committerfriendica <info@friendica.com>2015-02-13 13:05:14 -0800
commit46eda6e72371fd5fb9e6810fd9ef68b659ffb308 (patch)
treeaf6beb422bb70edf399b0f66103f88fae92bc3bf
parent7bb2e25ea030b7c32d35766631d85ac24b192f11 (diff)
parentf0fe81df7983dbe5901c53b3c24fd30d35e0bcc7 (diff)
downloadvolse-hubzilla-46eda6e72371fd5fb9e6810fd9ef68b659ffb308.tar.gz
volse-hubzilla-46eda6e72371fd5fb9e6810fd9ef68b659ffb308.tar.bz2
volse-hubzilla-46eda6e72371fd5fb9e6810fd9ef68b659ffb308.zip
Merge https://github.com/friendica/red into pending_merge
-rw-r--r--include/attach.php1
-rwxr-xr-xinclude/items.php4
-rw-r--r--install/update.php2
-rw-r--r--view/css/conversation.css7
-rw-r--r--view/theme/redbasic/css/style.css4
-rwxr-xr-xview/tpl/conv_item.tpl50
-rwxr-xr-xview/tpl/conv_list.tpl73
7 files changed, 73 insertions, 68 deletions
diff --git a/include/attach.php b/include/attach.php
index 3350a591e..f973102e8 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1082,6 +1082,7 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
$arr['mid'] = $mid;
$arr['parent_mid'] = $mid;
$arr['item_flags'] = $item_flags;
+ $arr['item_unseen'] = 1;
$arr['author_xchan'] = $poster['xchan_hash'];
$arr['owner_xchan'] = $poster['xchan_hash'];
$arr['title'] = '';
diff --git a/include/items.php b/include/items.php
index 717a4bf71..18ce149ed 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2861,7 +2861,7 @@ function tag_deliver($uid,$item_id) {
if(preg_match($pattern,$body,$matches))
$tagged = true;
- $pattern = '/@\!?\[zrl\=(.*?)\](.*?)\+\[\/zrl\]/';
+ $pattern = '/@\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\+\[\/zrl\]/';
if(preg_match_all($pattern,$body,$matches,PREG_SET_ORDER)) {
$max_forums = get_config('system','max_tagged_forums');
@@ -3022,7 +3022,7 @@ function tgroup_check($uid,$item) {
// $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'] . '+','/') . '\[\/zrl\]/';
- $pattern = '/@\!?\[zrl\=(.*?)\](.*?)\+\[\/zrl\]/';
+ $pattern = '/@\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\+\[\/zrl\]/';
$found = false;
diff --git a/install/update.php b/install/update.php
index d2f1ead3c..86731e165 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1560,7 +1560,7 @@ function update_r1135() {
}
function update_r1136() {
- $r1 = q("alter table item add item_unseen smallint(1) not null default '0' ");
+ $r1 = q("alter table item add item_unseen smallint not null default '0' ");
$r2 = q("create index item_unseen on item ( item_unseen ) ");
$r3 = q("update item set item_unseen = 1 where ( item_flags & 2 ) > 0 ");
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 8bc71bb6d..591a4e767 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -261,7 +261,12 @@ a.wall-item-name-link {
cursor: default;
}
+.item-verified {
+ color: darkgreen;
+ font-size: 1em !important;
+}
+
.item-forged {
color: #FF0000;
- font-size: 1.5em !important;
+ font-size: 1em !important;
}
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index b62136427..6a46d7429 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1907,10 +1907,6 @@ img.mail-list-sender-photo {
box-shadow: $shadowpx $shadowpx $shadowpx 0 #444444;
}
-.wall-item-ago .icon-ok {
- color: darkgreen;
-}
-
.wall-item-ago {
color: #777;
font-size: 0.833em;
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 4791d5bae..a575df554 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -28,7 +28,7 @@
<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}}&nbsp;{{$item.via}}&nbsp;<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}}
</div>
<div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">
- {{if $item.verified}}<i class="icon-ok item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="icon-remove item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="icon-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
+ {{if $item.verified}}<i class="icon-ok item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="icon-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="icon-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
</div>
<div class="wall-item-content" id="wall-item-content-{{$item.id}}">
<div class="wall-item-title-end"></div>
@@ -67,10 +67,10 @@
{{/if}}
{{if $item.isevent}}
<button type="button" title="{{$item.attend.0}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
- <i class="icon-ok-circle" ></i>
+ <i class="icon-ok" ></i>
</button>
<button type="button" title="{{$item.attend.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'attendno'); return false;">
- <i class="icon-remove-circle" ></i>
+ <i class="icon-remove" ></i>
</button>
<button type="button" title="{{$item.attend.2}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
<i class="icon-question" ></i>
@@ -79,10 +79,10 @@
{{if $item.canvote}}
<button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
- <i class="icon-ok-circle" ></i>
+ <i class="icon-ok" ></i>
</button>
<button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
- <i class="icon-remove-circle" ></i>
+ <i class="icon-remove" ></i>
</button>
<button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
<i class="icon-question" ></i>
@@ -123,7 +123,7 @@
{{/if}}
{{if $item.drop.dropping}}
<li role="presentation" class="divider"></li>
- <li role="presentation"><a role="menuitem" href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" ><i class="icon-remove"></i> {{$item.drop.delete}}</a></li>
+ <li role="presentation"><a role="menuitem" href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" ><i class="icon-trash"></i> {{$item.drop.delete}}</a></li>
{{/if}}
</ul>
</div>
@@ -140,31 +140,29 @@
{{else}}
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-{{$verb}}-{{$item.id}}">{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
{{/if}}
+ {{if $response.list_part}}
+ <div class="modal" id="{{$verb}}Modal-{{$item.id}}">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title">{{$response.title}}</h4>
+ </div>
+ <div class="modal-body">
+ <ul>{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
+ </div>
+ <div class="modal-footer clear">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{$item.modal_dismiss}}</button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+ </div><!-- /.modal -->
+ {{/if}}
</div>
{{/if}}
-
- {{if $response.list_part}}
- <div class="modal" id="{{$verb}}Modal-{{$item.id}}">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">{{$response.title}}</h4>
- </div>
- <div class="modal-body">
- <ul>{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
- </div>
- <div class="modal-footer clear">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{$item.modal_dismiss}}</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
- {{/if}}
{{/foreach}}
</div>
{{/if}}
-
</div>
<div class="clear"></div>
</div>
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index caa4ef45e..818517c46 100755
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -28,7 +28,7 @@
<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}}&nbsp;{{$item.via}}&nbsp;<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}}
</div>
<div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">
- {{if $item.verified}}<i class="icon-ok item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="icon-remove item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="icon-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
+ {{if $item.verified}}<i class="icon-ok item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="icon-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}">{{$item.localtime}}{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="icon-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
</div>
<div class="wall-item-content conv-list-mode" id="wall-item-content-{{$item.id}}">
<div class="wall-item-title-end"></div>
@@ -68,10 +68,10 @@
{{if $item.isevent}}
<button type="button" title="{{$item.attend.0}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
- <i class="icon-ok-circle" ></i>
+ <i class="icon-ok" ></i>
</button>
<button type="button" title="{{$item.attend.1}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendno'); return false;">
- <i class="icon-remove-circle" ></i>
+ <i class="icon-remove" ></i>
</button>
<button type="button" title="{{$item.attend.2}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
<i class="icon-question" ></i>
@@ -80,10 +80,10 @@
{{if $item.canvote}}
<button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
- <i class="icon-ok-circle" ></i>
+ <i class="icon-ok" ></i>
</button>
<button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
- <i class="icon-remove-circle" ></i>
+ <i class="icon-remove" ></i>
</button>
<button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
<i class="icon-question" ></i>
@@ -124,20 +124,27 @@
{{/if}}
{{if $item.drop.dropping}}
<li role="presentation" class="divider"></li>
- <li role="presentation"><a role="menuitem" href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" ><i class="icon-remove"></i> {{$item.drop.delete}}</a></li>
+ <li role="presentation"><a role="menuitem" href="item/drop/{{$item.id}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}" ><i class="icon-trash"></i> {{$item.drop.delete}}</a></li>
{{/if}}
</ul>
</div>
<div id="like-rotator-{{$item.id}}" class="like-rotator"></div>
<div class="wall-item-tools-left{{if $item.unseen_comments || $item.like_count || $item.dislike_count}} btn-group{{/if}}">
+ <div class="wall-item-list-comments btn-group">
+ <button class="btn btn-default btn-sm" onclick="window.location.href='{{$item.viewthread}}'; return false;">
+ {{$item.comment_count_txt}}{{if $item.unseen_comments}}<span class="unseen-wall-indicator-{{$item.id}}">, {{$item.list_unseen_txt}}</span>{{/if}}
+ </button>
+ </div>
+ {{if $item.unseen_comments}}
+ <div class="unseen-wall-indicator-{{$item.id}} btn-group">
+ <button class="btn btn-default btn-sm" title="{{$item.markseen}}" onclick="markItemRead({{$item.id}}); return false;">
+ <i class="icon-check"></i>
+ </button>
+ </div>
+ {{/if}}
-
- <div class="wall-item-list-comments btn-group"><button class="btn btn-default btn-sm" onclick="window.location.href='{{$item.viewthread}}'; return false;">{{$item.comment_count_txt}}{{if $item.unseen_comments}}
-<span class="unseen-wall-indicator-{{$item.id}}">, {{$item.list_unseen_txt}}{{/if}}</span></button></div>{{if $item.unseen_comments}}<div class="unseen-wall-indicator-{{$item.id}} btn-group"><button class="btn btn-default btn-sm" title="{{$item.markseen}}" onclick="markItemRead({{$item.id}}); return false;"><i class="icon-check"></i></div>{{/if}}
-
- {{if $item.responses }}
- <div class="wall-item-tools-left{{if $item.responses.count > 1}} btn-group{{/if}}">
- {{foreach $item.responses as $verb=>$response}}
+ {{if $item.responses }}
+ {{foreach $item.responses as $verb=>$response}}
{{if $response.count}}
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.count}} {{$response.button}}</button>
@@ -146,31 +153,29 @@
{{else}}
<ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-{{$verb}}-{{$item.id}}">{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
{{/if}}
+ {{if $response.list_part}}
+ <div class="modal" id="{{$verb}}Modal-{{$item.id}}">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title">{{$response.title}}</h4>
+ </div>
+ <div class="modal-body">
+ <ul>{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
+ </div>
+ <div class="modal-footer clear">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{$item.modal_dismiss}}</button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+ </div><!-- /.modal -->
+ {{/if}}
</div>
{{/if}}
-
- {{if $response.list_part}}
- <div class="modal" id="{{$verb}}Modal-{{$item.id}}">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
- <h4 class="modal-title">{{$response.title}}</h4>
- </div>
- <div class="modal-body">
- <ul>{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
- </div>
- <div class="modal-footer clear">
- <button type="button" class="btn btn-default" data-dismiss="modal">{{$item.modal_dismiss}}</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal-dialog -->
- </div><!-- /.modal -->
+ {{/foreach}}
{{/if}}
- {{/foreach}}
</div>
- {{/if}}
- </div>
</div>
<div class="clear"></div>
</div>