print "<div class=\"cdmHeader\">";
- print "<div style=\"float : right\">$updated_fmt $id
+ print "<div style=\"float : right\">$updated_fmt
<!-- <a class=\"cdmToggleLink\"
href=\"javascript:toggleUnread($id)\">Toggle unread</a> -->
</div>";
print "<div class=\"cdmContent\">" . $line["content_preview"] . "</div><br clear=\"all\">";
print "<div style=\"float : right\">$marked_pic</div>
- <div lass=\"cdmFooter\">
- <input type=\"checkbox\" onclick=\"toggleSelectRowById(this,
- 'RROW-$id')\" class=\"feedCheckBox\" id=\"RCHK-$id\"></div>";
+ <div class=\"cdmFooter\">";
+
+
+ print "<input type=\"checkbox\" onclick=\"toggleSelectRowById(this,
+ 'RROW-$id')\" class=\"feedCheckBox\" id=\"RCHK-$id\">";
+
+ $tags = get_article_tags($link, $id);
+
+ $tags_str = "";
+
+ foreach ($tags as $tag) {
+ $num_tags++;
+ $tags_str .= "<a href=\"javascript:viewfeed('$tag')\">$tag</a>, ";
+ }
+
+ $tags_str = preg_replace("/, $/", "", $tags_str);
+
+ print " $tags_str <a title=\"Edit tags for this article\"
+ href=\"javascript:editArticleTags($id, $feed_id, true)\">(+)</a>";
+
+ print "</div>";
# print "<div align=\"center\"><a class=\"cdmToggleLink\"
# href=\"javascript:toggleUnread($id)\">
var _tag_active_post_id = false;
var _tag_active_feed_id = false;
+var _tag_active_cdm = false;
-// FIXME: kludge, needs proper implementation
+// FIXME: kludge, to restore scrollTop after tag editor terminates
+var _tag_cdm_scroll = false;
+
+// FIXME: kludges, needs proper implementation
var _reload_feedlist_after_view = false;
var _cdm_wd_timeout = false;
_cdm_wd_vishist = new Array();
}
+ if (_tag_cdm_scroll) {
+ try {
+ document.getElementById("headlinesInnerContainer").scrollTop = _tag_cdm_scroll;
+ _tag_cdm_scroll = false;
+ } catch (e) { }
+ }
+
notify("");
}
}
}
-function editArticleTags(id, feed_id) {
+function editArticleTags(id, feed_id, cdm_enabled) {
_tag_active_post_id = id;
_tag_active_feed_id = feed_id;
+ _tag_active_cdm = cdm_enabled;
+ try {
+ _tag_cdm_scroll = document.getElementById("headlinesInnerContainer").scrollTop;
+ } catch (e) { }
displayDlg('editArticleTags', id);
}
_reload_feedlist_after_view = true;
}
- if (active_post_id == _tag_active_post_id) {
- debug("reloading current article");
- view(_tag_active_post_id, _tag_active_feed_id);
- }
+ if (!_tag_active_cdm) {
+ if (active_post_id == _tag_active_post_id) {
+ debug("reloading current article");
+ view(_tag_active_post_id, _tag_active_feed_id);
+ }
+ } else {
+ debug("reloading current feed");
+ viewCurrentFeed();
+ }
} catch (e) {
exception_error("catchup_callback", e);