add tooltip with all article tags
This commit is contained in:
parent
e4f7c97622
commit
0780f4f4fd
|
@ -4771,7 +4771,11 @@
|
||||||
$rv['content'] .= "<div clear='both'>" . $line["title"] . "$entry_author</div>";
|
$rv['content'] .= "<div clear='both'>" . $line["title"] . "$entry_author</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$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
|
if (!$entry_comments) $entry_comments = " "; # placeholder
|
||||||
|
|
||||||
|
@ -4784,6 +4788,10 @@
|
||||||
<a title=\"".__('Edit tags for this article')."\"
|
<a title=\"".__('Edit tags for this article')."\"
|
||||||
href=\"#\" onclick=\"editArticleTags($id, $feed_id)\">(+)</a>";
|
href=\"#\" onclick=\"editArticleTags($id, $feed_id)\">(+)</a>";
|
||||||
|
|
||||||
|
$rv['content'] .= "<div dojoType=\"dijit.Tooltip\"
|
||||||
|
id=\"ATSTRTIP-$id\" connectId=\"ATSTR-$id\"
|
||||||
|
position=\"below\">$tags_str_full</div>";
|
||||||
|
|
||||||
$rv['content'] .= "<img src=\"".theme_image($link, 'images/art-zoom.png')."\"
|
$rv['content'] .= "<img src=\"".theme_image($link, 'images/art-zoom.png')."\"
|
||||||
class='tagsPic' style=\"cursor : pointer\"
|
class='tagsPic' style=\"cursor : pointer\"
|
||||||
onclick=\"postOpenInNewTab(event, $id)\"
|
onclick=\"postOpenInNewTab(event, $id)\"
|
||||||
|
|
|
@ -359,7 +359,7 @@
|
||||||
|
|
||||||
/* update tag cache */
|
/* update tag cache */
|
||||||
|
|
||||||
$tags_str = join(",", $tags_to_cache);
|
$tags_str = asort(join(",", $tags_to_cache));
|
||||||
|
|
||||||
db_query($link, "UPDATE ttrss_user_entries
|
db_query($link, "UPDATE ttrss_user_entries
|
||||||
SET tag_cache = '$tags_str' WHERE ref_id = '$id'
|
SET tag_cache = '$tags_str' WHERE ref_id = '$id'
|
||||||
|
@ -373,10 +373,14 @@
|
||||||
$memcache->delete($obj_id);
|
$memcache->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,
|
print json_encode(array("tags_str" => array("id" => $id,
|
||||||
"content" => $tags_str)));
|
"content" => $tags_str, "content_full" => $tags_str_full)));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -992,10 +992,10 @@ function editArticleTags(id) {
|
||||||
var id = tags_str.id;
|
var id = tags_str.id;
|
||||||
|
|
||||||
var tags = $("ATSTR-" + id);
|
var tags = $("ATSTR-" + id);
|
||||||
|
var tooltip = dijit.byId("ATSTRTIP-" + id);
|
||||||
|
|
||||||
if (tags) {
|
if (tags) tags.innerHTML = tags_str.content;
|
||||||
tags.innerHTML = tags_str.content;
|
if (tooltip) tooltip.attr('label', tags_str.content_full);
|
||||||
}
|
|
||||||
|
|
||||||
cache_invalidate(id);
|
cache_invalidate(id);
|
||||||
}
|
}
|
||||||
|
@ -1536,6 +1536,9 @@ function zoomToArticle(event, id) {
|
||||||
if (!event || !event.shiftKey)
|
if (!event || !event.shiftKey)
|
||||||
return dijit.byId("content-tabs").selectChild(dijit.byId("ATAB-" + id));
|
return dijit.byId("content-tabs").selectChild(dijit.byId("ATAB-" + id));
|
||||||
|
|
||||||
|
if (dijit.byId("ATSTRTIP-" + id))
|
||||||
|
dijit.byId("ATSTRTIP-" + id).destroyRecursive();
|
||||||
|
|
||||||
if (cached_article) {
|
if (cached_article) {
|
||||||
//closeArticlePanel();
|
//closeArticlePanel();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue