From 049a37aa0e7d37cafd979e7d470c7649700b5010 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 1 Dec 2018 17:05:28 +0300 Subject: WIP reshuffling of JS global context into separate logical objects --- plugins/af_psql_trgm/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/af_psql_trgm') diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php index fe5b1a959..ff11c1201 100644 --- a/plugins/af_psql_trgm/init.php +++ b/plugins/af_psql_trgm/init.php @@ -93,7 +93,7 @@ class Af_Psql_Trgm extends Plugin { print " ". $line["title"].""; - print " (". + print " (". htmlspecialchars($line["feed_title"]).")"; print " ($sm)"; -- cgit v1.2.3-54-g00ecf From 1e2d4410d320fcee644add76293f229741a163cb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 1 Dec 2018 22:39:29 +0300 Subject: move some more shared stuff to CommonDialogs, Filters, and Utils --- classes/dlg.php | 2 +- classes/pref/feeds.php | 8 +- classes/pref/filters.php | 4 +- js/FeedTree.js | 2 +- js/PrefFeedTree.js | 4 +- js/functions.js | 877 ++++++++++++++++++++-------------------- js/prefs.js | 6 +- js/tt-rss.js | 8 +- js/viewfeed.js | 2 +- plugins/af_psql_trgm/init.php | 2 +- plugins/af_readability/init.php | 2 +- tests/functional/BasicTest.php | 2 +- 12 files changed, 463 insertions(+), 456 deletions(-) (limited to 'plugins/af_psql_trgm') diff --git a/classes/dlg.php b/classes/dlg.php index 50cbd12dd..02249ea96 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -174,7 +174,7 @@ class Dlg extends Handler_Protected { print "
"; - print " "; print ""; print "
"; @@ -1247,7 +1247,7 @@ class Pref_Feeds extends Handler_Protected { var bare_id = id.substr(id.indexOf(':')+1); if (id.match('FEED:')) { - editFeed(bare_id); + CommonDialogs.editFeed(bare_id); } else if (id.match('CAT:')) { editCat(bare_id, item); } @@ -1441,7 +1441,7 @@ class Pref_Feeds extends Handler_Protected { print "". + "onclick=\"CommonDialogs.editFeed(".$line["id"].")\">". htmlspecialchars($line["title"]).""; print ""; @@ -1506,7 +1506,7 @@ class Pref_Feeds extends Handler_Protected { print "". + "onclick=\"CommonDialogs.editFeed(".$line["id"].")\">". htmlspecialchars($line["title"]).": "; print ""; diff --git a/classes/pref/filters.php b/classes/pref/filters.php index e3503d545..e60628f8f 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -797,7 +797,7 @@ class Pref_Filters extends Handler_Protected { dojoType=\"dijit.MenuItem\">".__('None').""; print ""; - print " "; print " "; print " -- cgit v1.2.3-54-g00ecf From d9c5c93cef313127b9b5010fbe279fdbddedadec Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 2 Dec 2018 20:07:57 +0300 Subject: move some more stuff out of common.js rework client-side cookie functions a bit limit dojo cachebust based on server scripts modification time remove param_escape() --- classes/dlg.php | 10 ++-- classes/pref/feeds.php | 4 +- include/functions.php | 12 +++++ index.php | 2 +- js/Article.js | 2 +- js/CommonDialogs.js | 34 ++++++++++++ js/CommonFilters.js | 4 +- js/Feeds.js | 2 +- js/PrefFilterTree.js | 2 +- js/PrefLabelTree.js | 2 +- js/PrefUsers.js | 2 +- js/Utils.js | 2 +- js/common.js | 126 ++++++++++--------------------------------- js/tt-rss.js | 32 +++++------ plugins/af_psql_trgm/init.js | 2 +- plugins/mail/mail.js | 2 +- plugins/mailto/init.js | 2 +- plugins/note/note.js | 2 +- plugins/share/share.js | 2 +- prefs.php | 2 +- 20 files changed, 111 insertions(+), 137 deletions(-) (limited to 'plugins/af_psql_trgm') diff --git a/classes/dlg.php b/classes/dlg.php index 7e66c4b5e..32c41ee34 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -52,7 +52,7 @@ class Dlg extends Handler_Protected { print " "; - print ""; print ""; @@ -85,7 +85,7 @@ class Dlg extends Handler_Protected { print "
"; - print ""; print "
"; @@ -150,7 +150,7 @@ class Dlg extends Handler_Protected { print "
"; print ""; print "
"; @@ -179,7 +179,7 @@ class Dlg extends Handler_Protected { print " "; - print ""; print ""; @@ -195,7 +195,7 @@ class Dlg extends Handler_Protected { print " "; print ""; print ""; } diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 3b949073c..7ae7a04c1 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -745,9 +745,9 @@ class Pref_Feeds extends Handler_Protected { - - "; diff --git a/include/functions.php b/include/functions.php index baed6fb20..dcb2e7518 100755 --- a/include/functions.php +++ b/include/functions.php @@ -2566,3 +2566,15 @@ function arr_qmarks($arr) { return str_repeat('?,', count($arr) - 1) . '?'; } + + function get_scripts_timestamp() { + $files = glob("js/*.js"); + $ts = 0; + + foreach ($files as $file) { + $file_ts = filemtime($file); + if ($file_ts > $ts) $ts = $file_ts; + } + + return $ts; + } \ No newline at end of file diff --git a/index.php b/index.php index 4a85ff236..6035ac186 100644 --- a/index.php +++ b/index.php @@ -91,7 +91,7 @@