]> git.wh0rd.org Git - tt-rss.git/commitdiff
notify window close button
authorAndrew Dolgov <fox@bah.spb.su>
Mon, 5 Sep 2005 15:49:39 +0000 (16:49 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Mon, 5 Sep 2005 15:49:39 +0000 (16:49 +0100)
backend.php
functions.js
images/close.png [new file with mode: 0644]
images/close.svg [new file with mode: 0644]
prefs.php
tt-rss.css
tt-rss.js
tt-rss.php
viewfeed.js

index b7249f1a4214e39b90c858dd70a27aac8267c501..77bd9b21581f447a95227ab16708a8750ecefb6f 100644 (file)
                        print "<html><head>
                                <title>Tiny Tiny RSS : Article $id</title>
                                <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
+                               <script type=\"text/javascript\" src=\"functions.js\"></script>
                                <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
                                </head><body>";
                }
 
                }
 
+/*             print "<script type=\"text/javascript\">
+                       p_notify(''); -- FLICKER
+               </script>"; */
+
                if ($addheader) {
                        print "</body></html>";
                }
                        } else if ($unread <= 0) {      
                                        feedr.className = feedr.className.replace(\"Unread\", \"\");
                        }       
+
+                       //p_notify('');
                </script>";
 
                if ($addheader) {
index f0d76769d9a2663cf7d96ac481bb3e168dbe410f..90245a19282207377ad87a0b93716ad6c6368c14 100644 (file)
@@ -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 (file)
index 0000000..046c4a7
Binary files /dev/null and b/images/close.png differ
diff --git a/images/close.svg b/images/close.svg
new file mode 100644 (file)
index 0000000..88685ed
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="12.800000pt"
+   height="12.800000pt"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.42.2"
+   sodipodi:docbase="/naboo/home/fox/public_html/testbox/tt-rss/images"
+   sodipodi:docname="close.svg"
+   inkscape:export-filename="/naboo/home/fox/public_html/testbox/tt-rss/images/close.png"
+   inkscape:export-xdpi="81.168785"
+   inkscape:export-ydpi="81.168785">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="44.800000"
+     inkscape:cx="10.272172"
+     inkscape:cy="7.9274987"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     inkscape:window-width="1600"
+     inkscape:window-height="1131"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     showgrid="true"
+     gridempspacing="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <path
+       sodipodi:type="arc"
+       style="opacity:1.0000000;fill:none;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#000000;stroke-width:2.7248328;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       id="path1312"
+       sodipodi:cx="-7.7678571"
+       sodipodi:cy="3.3214285"
+       sodipodi:rx="18.276009"
+       sodipodi:ry="18.276009"
+       d="M 10.508152 3.3214285 A 18.276009 18.276009 0 1 1  -26.043866,3.3214285 A 18.276009 18.276009 0 1 1  10.508152 3.3214285 z"
+       transform="matrix(0.366995,0.000000,0.000000,0.366995,10.85076,6.781052)" />
+    <path
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.5000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none"
+       d="M 5.0000000,11.000000 C 11.000000,5.0000000 11.000000,5.0000000 11.000000,5.0000000"
+       id="path1417" />
+    <path
+       style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.5000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
+       d="M 11.000000,11.000000 C 5.0000004,5.0000000 5.0000004,5.0000000 5.0000004,5.0000000"
+       id="path2146" />
+  </g>
+</svg>
index 974101b1c8cd552abb0454abe232387c07a66e51..80270fe7566dc959e5ae3a5f692736d58dd87760 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -20,7 +20,9 @@
 </tr>
 <tr>
        <td class="toolbar" valign="middle">
-                <div id="notify">&nbsp;</div>
+               <table id="notify"><tr><td width="100%" id="notify_body">&nbsp;</td>
+               <td><img onclick="javascript:notify('')" alt="Close" 
+                       src="images/close.png"></td></table>            
        </td>
        <td class="toolbar" valign="middle" colspan="2" align="right">  
                <a href="tt-rss.php" class="button">Return to main</a>
index c53571361a380c9c05c777ba07dcb8cb5cd0a560..879e021bc07b279978e0585de7bbd70926ecfd7d 100644 (file)
@@ -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;
 }
 
index b2adeb1ced75630078a6c9155dfdc216f715b314..37150ba7a5df6e1c2fe182a520bc959a3d9fc0f4 100644 (file)
--- 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("");
 
 }
 
index 385ea487e3238b66a283dad96658b05b160a29f9..bd43dacd6ba74d0ee9afd530d5c5af886974c2d6 100644 (file)
 <tr>
        <td class="toolbar" colspan="2">
                <table width="100%" cellspacing="0" cellpadding="0">
-               <td valign="middle"> <div id="notify">&nbsp;</div></td>
+               <td valign="middle">
+                       <table id="notify"><tr><td width="100%" id="notify_body">&nbsp;</td>
+                       <td><img onclick="javascript:notify('')" alt="Close" 
+                               src="images/close.png"></td></table>            
+               </td>
                <td class="toolbar" valign="middle" align="right">
                        <a href="prefs.php" class="button">Preferences</a></td>
                </tr></table>
index 6866c278cf02d646d5896b1b8f2b5e5df3cfb616..6d73da8869363119d81594cdf97d64c41a65d73b 100644 (file)
@@ -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();