From: Andrew Dolgov Date: Tue, 19 Apr 2011 10:54:27 +0000 (+0400) Subject: add tooltip with all article tags X-Git-Tag: 1.5.3~25 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0780f4f4fdb88df7982c179ac581db5fb64aef7f;p=tt-rss.git add tooltip with all article tags --- diff --git a/functions.php b/functions.php index e1c60e15..50228939 100644 --- a/functions.php +++ b/functions.php @@ -4771,7 +4771,11 @@ $rv['content'] .= "
" . $line["title"] . "$entry_author
"; } - $tags_str = format_tags_string(get_article_tags($link, $id), $id); + $tags = get_article_tags($link, $id); + $tags_str = format_tags_string($tags, $id); + $tags_str_full = join(", ", $tags); + + if (!$tags_str_full) $tags_str_full = __("no tags"); if (!$entry_comments) $entry_comments = " "; # placeholder @@ -4784,6 +4788,10 @@ (+)"; + $rv['content'] .= "
$tags_str_full
"; + $rv['content'] .= "delete($obj_id); } - $tags_str = format_tags_string(get_article_tags($link, $id), $id); + $tags = get_article_tags($link, $id); + $tags_str = format_tags_string($tags, $id); + $tags_str_full = join(", ", $tags); + + if (!$tags_str_full) $tags_str_full = __("no tags"); print json_encode(array("tags_str" => array("id" => $id, - "content" => $tags_str))); + "content" => $tags_str, "content_full" => $tags_str_full))); return; } diff --git a/viewfeed.js b/viewfeed.js index a5ca881c..fd188797 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -992,10 +992,10 @@ function editArticleTags(id) { var id = tags_str.id; var tags = $("ATSTR-" + id); + var tooltip = dijit.byId("ATSTRTIP-" + id); - if (tags) { - tags.innerHTML = tags_str.content; - } + if (tags) tags.innerHTML = tags_str.content; + if (tooltip) tooltip.attr('label', tags_str.content_full); cache_invalidate(id); } @@ -1536,6 +1536,9 @@ function zoomToArticle(event, id) { if (!event || !event.shiftKey) return dijit.byId("content-tabs").selectChild(dijit.byId("ATAB-" + id)); + if (dijit.byId("ATSTRTIP-" + id)) + dijit.byId("ATSTRTIP-" + id).destroyRecursive(); + if (cached_article) { //closeArticlePanel();