From 6f3976c9a3a0409b16d1125802b88651213b0aae Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Nov 2010 14:43:43 +0300 Subject: [PATCH] support opening articles in new tab, misc fixes --- feedlist.js | 4 +- functions.js | 10 +++- functions.php | 20 +++++--- tt-rss.css | 17 ++++++- tt-rss.js | 4 +- tt-rss.php | 5 +- viewfeed.js | 127 ++++++++++++++++++++++++++++++++++++++------------ 7 files changed, 140 insertions(+), 47 deletions(-) diff --git a/feedlist.js b/feedlist.js index 4171c633d..bfcb943ab 100644 --- a/feedlist.js +++ b/feedlist.js @@ -793,7 +793,6 @@ function setFeedUnread(feed, is_cat, unread) { function setFeedValue(feed, is_cat, key, value) { try { if (!value) value = ''; - if (!treeModel) return; if (is_cat) treeItem = treeModel.store._itemsByIdentity['CAT:' + feed]; @@ -804,7 +803,8 @@ function setFeedValue(feed, is_cat, key, value) { treeModel.store.setValue(treeItem, key, value); } catch (e) { - exception_error("setFeedValue", e); + console.log(e); + //exception_error("setFeedValue", e); } } diff --git a/functions.js b/functions.js index 362fc9888..7e826ab3e 100644 --- a/functions.js +++ b/functions.js @@ -394,8 +394,9 @@ function closeInfoBox(cleanup) { var dialog = dialogs.pop(); - if (dialog) - dialog.hide(); + if (dialog) { + dialog.destroy(); + } } catch (e) { //exception_error("closeInfoBox", e); @@ -408,6 +409,9 @@ function displayDlg(id, param, callback) { notify_progress("Loading, please wait...", true); + while (dialogs.length > 0) + closeInfoBox(); + var query = "?op=dlg&id=" + param_escape(id) + "¶m=" + param_escape(param); @@ -465,10 +469,12 @@ function infobox_callback2(transport) { style: "width: 600px", onCancel: function() { dialogs.remove(this); + this.destroy(); return true; }, onExecute: function() { dialogs.remove(this); + this.destroy(); return true; }, onClose: function() { diff --git a/functions.php b/functions.php index 63f440999..08d3edfcf 100644 --- a/functions.php +++ b/functions.php @@ -4577,8 +4577,10 @@ "; } + print "
" . + truncate_string(strip_tags($line['title']), 15) . "
"; - print "
"; + print "
"; print "
"; $entry_author = $line["author"]; @@ -4615,7 +4617,7 @@ print "Zoom"; + alt='Zoom' title='".__('Open article in new tab')."'>"; $note_escaped = htmlspecialchars($line['note'], ENT_QUOTES); @@ -4631,6 +4633,11 @@ alt='Zoom' title='".__('Forward by email')."'>"; } + print "Zoom"; + } else { $tags_str = strip_tags($tags_str); print "$tags_str"; @@ -5083,7 +5090,8 @@ onmouseout='postMouseOut($id)'"; print "
"; print "
"; @@ -5108,7 +5116,7 @@ print "$published_pic"; print " ".$line["title"]." @@ -5123,13 +5131,11 @@ $excerpt_hidden = "style=\"display : none\""; print " - $content_preview"; print "
"; print "
"; print "
"; @@ -5220,7 +5226,7 @@ onclick=\"zoomToArticle($id)\" style=\"cursor : pointer\" alt='Zoom' - title='".__('Show article summary in new window')."'>"; + title='".__('Open article in new tab')."'>"; if (DIGEST_ENABLE) { print "
-
+
+
@@ -215,6 +217,7 @@
+