From a37ac8f2f36353bba26ccd2631bf1c85ae6e02da Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 16 Jun 2013 00:03:22 -0700 Subject: flag taggable connections in acl selector --- js/acl.js | 4 ++-- mod/acl.php | 20 +++++++++++--------- version.inc | 2 +- view/theme/redbasic/css/style.css | 4 ++++ view/tpl/acl_selector.tpl | 5 ----- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/js/acl.js b/js/acl.js index 629a55447..591c9c467 100644 --- a/js/acl.js +++ b/js/acl.js @@ -247,8 +247,8 @@ ACL.prototype.populate = function(data){ var height = Math.ceil(data.tot / that.nw) * 42; that.list_content.height(height); $(data.items).each(function(){ - html = "
"+that.item_tpl+"
"; - html = html.format( this.photo, this.name, this.type, this.xid, '', this.network, this.link ); + html = "
"+that.item_tpl+"
"; + html = html.format( this.photo, this.name, this.type, this.xid, '', this.network, this.link, this.taggable ); if (this.uids!=undefined) that.group_uids[this.id] = this.uids; //console.log(html); that.list_content.append(html); diff --git a/mod/acl.php b/mod/acl.php index dea0047f2..df6de13b2 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -123,7 +123,7 @@ function acl_init(&$a){ } if ($type=='' || $type=='c') { - $r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick + $r = q("SELECT abook_id as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, abook_their_perms FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND not ( abook_flags & %d ) $sql_extra2 order by xchan_name asc" , intval(local_user()), @@ -142,7 +142,7 @@ function acl_init(&$a){ ); } elseif($type == 'a') { - $r = q("SELECT abook_id as id, xchan_name as name, xchan_addr as nick, xchan_photo_s as micro, xchan_network as network, xchan_url as url, xchan_addr as attag FROM abook left join xchan on abook_xchan = xchan_hash + $r = q("SELECT abook_id as id, xchan_name as name, xchan_hash as hash, xchan_addr as nick, xchan_photo_s as micro, xchan_network as network, xchan_url as url, xchan_addr as attag , abook_their_perms FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d $sql_extra3 ORDER BY xchan_name ASC ", @@ -196,13 +196,15 @@ function acl_init(&$a){ if(count($r)) { foreach($r as $g){ $contacts[] = array( - "type" => "c", - "photo" => $g['micro'], - "name" => $g['name'], - "id" => $g['id'], - "xid" => $g['hash'], - "link" => $g['nick'], - "nick" => substr($g['nick'],0,strpos($g['nick'],'@')) + "type" => "c", + "photo" => $g['micro'], + "name" => $g['name'], + "id" => $g['id'], + "xid" => $g['hash'], + "link" => $g['nick'], + "nick" => substr($g['nick'],0,strpos($g['nick'],'@')), + "network" => '', + "taggable" => (($g['abook_their_perms'] & PERMS_W_TAGWALL) ? 'taggable' : '') ); } } diff --git a/version.inc b/version.inc index 52a82faff..b47f8837e 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-06-15.345 +2013-06-16.346 diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 5fb4e8b36..416e79dd5 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -3739,6 +3739,10 @@ ul.menu-popup { float: left; margin: 4px; } +.acl-list-item.taggable { + background-color: #ccccff; +} + .acl-list-item p { height: 12px; font-size: 10px; margin: 0px; padding: 2px 0px 1px; overflow: hidden;} .acl-list-item a { font-size: 8px; diff --git a/view/tpl/acl_selector.tpl b/view/tpl/acl_selector.tpl index aebef71ee..d21073b56 100755 --- a/view/tpl/acl_selector.tpl +++ b/view/tpl/acl_selector.tpl @@ -1,8 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}}
{{$showall}} -- cgit v1.2.3