From 049a37aa0e7d37cafd979e7d470c7649700b5010 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 1 Dec 2018 17:05:28 +0300 Subject: [PATCH] WIP reshuffling of JS global context into separate logical objects --- classes/article.php | 2 +- classes/dlg.php | 2 +- classes/feeds.php | 16 +- classes/pref/feeds.php | 6 +- js/FeedTree.js | 2 +- js/feedlist.js | 697 ++++++++++++++----------- js/functions.js | 178 ++++--- js/prefs.js | 26 +- js/tt-rss.js | 635 +++++++++------------- js/viewfeed.js | 842 ++++++++++++++---------------- plugins/af_psql_trgm/init.php | 2 +- plugins/close_button/init.php | 2 +- plugins/embed_original/init.js | 6 +- plugins/no_title_counters/init.js | 2 +- plugins/toggle_sidebar/init.php | 2 +- 15 files changed, 1151 insertions(+), 1269 deletions(-) diff --git a/classes/article.php b/classes/article.php index 50a61a019..bc2e76537 100755 --- a/classes/article.php +++ b/classes/article.php @@ -877,7 +877,7 @@ class Article extends Handler_Protected { $tags_str = ""; for ($i = 0; $i < $maxtags; $i++) { - $tags_str .= "" . $tags[$i] . ", "; + $tags_str .= "" . $tags[$i] . ", "; } $tags_str = mb_substr($tags_str, 0, mb_strlen($tags_str)-2); diff --git a/classes/dlg.php b/classes/dlg.php index 9ac5cd12f..d73a53618 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -139,7 +139,7 @@ class Dlg extends Handler_Protected { $key_escaped = str_replace("'", "\\'", $key); - echo "' . $key . ' '; } diff --git a/classes/feeds.php b/classes/feeds.php index b548205ed..93e44e3bb 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -51,7 +51,7 @@ class Feeds extends Handler_Protected { $reply .= " + onclick=\"Utils.displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\"> "; @@ -137,7 +137,7 @@ class Feeds extends Handler_Protected { //$reply .= ""; - $reply .= ""; + $reply .= ""; $reply .= ""; @@ -392,7 +392,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= "
". "
$feed_icon_img
". - "". + "". $line["feed_title"]." $vf_catchup_link
"; @@ -434,7 +434,7 @@ class Feeds extends Handler_Protected { if (@$line["feed_title"]) { $rgba = @$rgba_cache[$feed_id]; - $reply['content'] .= "". + $reply['content'] .= "". truncate_string($line["feed_title"],30).""; } } @@ -451,7 +451,7 @@ class Feeds extends Handler_Protected { if ($line["feed_title"] && !$vfeed_group_enabled) { - $reply['content'] .= " $feed_icon_img"; @@ -488,7 +488,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= "
". "
$feed_icon_img
". - "". + "". $line["feed_title"]." $vf_catchup_link
"; } @@ -547,7 +547,7 @@ class Feeds extends Handler_Protected { $tmp_content .= ""; } @@ -561,7 +561,7 @@ class Feeds extends Handler_Protected { if (!get_pref("VFEED_GROUP_BY_FEED") && $line["feed_title"]) { $tmp_content .= "$feed_icon_img"; + onclick=\"Feeds.viewfeed({feed:$feed_id})\">$feed_icon_img
"; } $tmp_content .= ""; //score wrapper2 diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 43570c740..23e9baee9 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1174,7 +1174,7 @@ class Pref_Feeds extends Handler_Protected { print "
-
"; @@ -1306,7 +1306,7 @@ class Pref_Feeds extends Handler_Protected { print_warning("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds."); - print " "; PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, @@ -1323,7 +1323,7 @@ class Pref_Feeds extends Handler_Protected { print "

"; - print " "; print "