From c05608c26e8b65736cc9db0ab3a2ceb08eba85d9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 5 Sep 2005 16:49:39 +0100 Subject: [PATCH] notify window close button --- backend.php | 7 +++++ functions.js | 22 ++++++++++++-- images/close.png | Bin 0 -> 260 bytes images/close.svg | 75 +++++++++++++++++++++++++++++++++++++++++++++++ prefs.php | 4 ++- tt-rss.css | 2 +- tt-rss.js | 4 ++- tt-rss.php | 6 +++- viewfeed.js | 5 ++-- 9 files changed, 117 insertions(+), 8 deletions(-) create mode 100644 images/close.png create mode 100644 images/close.svg diff --git a/backend.php b/backend.php index b7249f1a..77bd9b21 100644 --- a/backend.php +++ b/backend.php @@ -197,6 +197,7 @@ print " Tiny Tiny RSS : Article $id + "; } @@ -233,6 +234,10 @@ } +/* print ""; */ + if ($addheader) { print ""; } @@ -417,6 +422,8 @@ } else if ($unread <= 0) { feedr.className = feedr.className.replace(\"Unread\", \"\"); } + + //p_notify(''); "; if ($addheader) { diff --git a/functions.js b/functions.js index f0d76769..90245a19 100644 --- a/functions.js +++ b/functions.js @@ -50,13 +50,31 @@ function delay(gap) { } } +function p_notify(msg) { + + var n = parent.document.getElementById("notify"); + var nb = parent.document.getElementById("notify_body"); + + if (!n || !nb) return; + + nb.innerHTML = msg; + + if (msg.length == 0) { + n.style.display = "none"; + } else { + n.style.display = "block"; + } + +} + function notify(msg) { var n = document.getElementById("notify"); + var nb = document.getElementById("notify_body"); - if (!n) return; + if (!n || !nb) return; - n.innerHTML = msg; + nb.innerHTML = msg; if (msg.length == 0) { n.style.display = "none"; diff --git a/images/close.png b/images/close.png new file mode 100644 index 0000000000000000000000000000000000000000..046c4a7e2d567934f40f8b6eefb04fd729d6488b GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2?f#ZI0f96(URk>vaU%>W*5KKgvqIHYR-+%(%%1zo-602xvrJd+Rj3_+^0U~ft>Wd8HS6z z=S;qT;kvK%J&CO2Sxt&xb#I9*XVll(-lqCf@s5h|dC`CkZtE|4f04Pzp8T|?(LHy< zEs1-b@60Y;Ex7Y3_Q$rlv(A0_^KI6>l|S8W{#M&N=-m-H`YWUf=t2fhS3j3^P6 + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/prefs.php b/prefs.php index 974101b1..80270fe7 100644 --- a/prefs.php +++ b/prefs.php @@ -20,7 +20,9 @@ -
 
+ +
 Close
Return to main diff --git a/tt-rss.css b/tt-rss.css index c5357136..879e021b 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -116,7 +116,7 @@ table.main td.toolbar { display : none; background : white; -moz-border-radius : 5px; - padding : 3px 10px 3px 10px; + padding : 2px 5px 2px 5px; width : 300px; } diff --git a/tt-rss.js b/tt-rss.js index b2adeb1c..37150ba7 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -209,6 +209,8 @@ function viewCurrentFeed(skip, subop) { function viewfeed(feed, skip, subop) { +// notify("Loading headlines..."); + enableHotkeys(); var searchbox = document.getElementById("searchbox"); @@ -290,7 +292,7 @@ function viewfeed(feed, skip, subop) { ftitle_d.innerHTML = ftitle_s.innerHTML; - notify(""); +// notify(""); } diff --git a/tt-rss.php b/tt-rss.php index 385ea487..bd43dacd 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -21,7 +21,11 @@ - +
 
+ +
 Close
+
Preferences
diff --git a/viewfeed.js b/viewfeed.js index 6866c278..6d73da88 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -25,6 +25,8 @@ if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') { function view(id, feed_id) { +// p_notify("Loading article..."); + enableHotkeys(); var crow = document.getElementById("RROW-" + id); @@ -71,9 +73,8 @@ function view(id, feed_id) { } } -function toggleMark(id, toggle) { -// notify("Toggle mark: " + id + ", " + toggle); +function toggleMark(id, toggle) { if (!xmlhttp_ready(xmlhttp_rpc)) { printLockingError(); -- 2.39.5