]> git.wh0rd.org Git - tt-rss.git/commitdiff
debug mode tweaks, remove mouse_handler()
authorAndrew Dolgov <fox@bah.spb.su>
Mon, 19 May 2008 11:28:20 +0000 (12:28 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Mon, 19 May 2008 11:28:20 +0000 (12:28 +0100)
feedlist.js
functions.js
functions.php
prefs.js
prefs.php
tt-rss.css
tt-rss.js
tt-rss.php

index 62bfadb5a8ab98fb6d27049e10bab98accb51451..0020de1795da8a0e3220c3e243bbf0eac2cffb16 100644 (file)
@@ -328,7 +328,6 @@ function feedlist_init() {
                
                hideOrShowFeeds(document, getInitParam("hide_read_feeds") == 1);
                document.onkeydown = hotkey_handler;
-               document.onmousedown = mouse_handler;
                setTimeout("timeout()", 0);
 
 /*             debug("about to remove splash, OMG!");
@@ -468,23 +467,3 @@ function remove_splash() {
                debug("removed splash!");
        }
 }
-
-function feedMouseIn(id) {
-       try {
-               if (feed_under_pointer != id) {
-                       feed_under_pointer = id;
-               }
-
-       } catch (e) {
-               exception_error("feedMouseIn", e);
-       }
-}
-
-function feedMouseOut(id) {
-       try {
-               feed_under_pointer = undefined;
-       } catch (e) {
-               exception_error("feedMouseOut", e);
-       }
-}
-
index 997bcb13bbe72bdf9196408dc77d84294ce0b93c..01de05b22da2b9cd603b7f79c6791445d3d2880b 100644 (file)
@@ -1,5 +1,4 @@
 var hotkeys_enabled = true;
-var debug_mode_enabled = false;
 var xmlhttp_rpc = Ajax.getTransport();
 var notify_silent = false;
 var last_progress_point = 0;
@@ -1384,7 +1383,7 @@ function debug(msg) {
        }
 
        var c = document.getElementById('debug_output');
-       if (c && c.style.display == "block") {
+       if (c && Element.visible(c)) {
                while (c.lastChild != 'undefined' && c.childNodes.length > 100) {
                        c.removeChild(c.lastChild);
                }
index 0c333afc3b7116d02056879a0a34d8ea49ea5f5c..a2d1750c456f6c52f15cbf090c9e8559020834e6 100644 (file)
                $feed = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\" 
                        href=\"javascript:viewfeed('$feed_id', '', false, '', false, 0);\">$feed_title</a>";
 
-               print "<li id=\"FEEDR-$feed_id\" class=\"$class\"
-                       onmouseover='feedMouseIn($feed_id)' onmouseout='feedMouseOut($feed_id)'>";
+               print "<li id=\"FEEDR-$feed_id\" class=\"$class\">";
                if (get_pref($link, 'ENABLE_FEED_ICONS')) {
                        print "$feed_icon";
                }
index 698bc71632ba4e418fdbeacff91defef00f0cc00..41b4d76884a1001cfee3019803d3bfff4051f0a2 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -1447,7 +1447,7 @@ function init() {
                arguments.callee.done = true;           
 
                if (getURLParam('debug')) {
-                       document.getElementById('debug_output').style.display = 'block';
+                       Element.show("debug_output");
                        debug('debug mode activated');
                }
 
@@ -1743,14 +1743,12 @@ function pref_hotkey_handler(e) {
                if (!hotkey_prefix) {
 
                        if (keycode == 68 && shift_key) { // d
-                               if (!debug_mode_enabled) {
-                                       document.getElementById('debug_output').style.display = 'block';
+                               if (!Element.visible("debug_output")) {
+                                       Element.show("debug_output");
                                        debug('debug mode activated');
                                } else {
-                                       document.getElementById('debug_output').style.display = 'none';
+                                       Element.hide("debug_output");
                                }
-       
-                               debug_mode_enabled = !debug_mode_enabled;
                                return;
                        }
        
index 288a5f2bede18eab700b716f096cc16729bd9971..d411a3704697e0e15ffdbaba46ea2fd73cfe8ff7 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -84,7 +84,7 @@ if (document.addEventListener) {
 window.onload = init;
 </script>
 
-<ul id="debug_output"></ul>
+<ul id="debug_output" style='display : none'></ul>
 
 <div id="fatal_error"><div id="fatal_error_inner">
        <h1>Fatal Error</h1>
index b92e8f9aa485b2783df11b7b6afddfb7a75c38f1..32517c511c29841d74542ff377f001e2b6a9ccb8 100644 (file)
@@ -1208,7 +1208,6 @@ a.cdmToggleLink:hover {
        bottom : 20px;
        z-index : 999;
        background-color : white;
-       display : none;
        border : 1px solid #c0c0c0;
        overflow : auto;
        margin : 0px;
index 5c13ca57a14c936f0e81205e18196858b1a624a8..482ddabf8cc6184ab4263a85ec4e67c2bb513df2 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -338,7 +338,7 @@ function init() {
                        return;
 
                if (getURLParam('debug')) {
-                       document.getElementById('debug_output').style.display = 'block';
+                       Element.show("debug_output");
                        debug('debug mode activated');
                }
 
@@ -967,11 +967,11 @@ function hotkey_handler(e) {
                if (!hotkey_prefix) {
 
                        if (keycode == 68 && shift_key) { // d
-                               if (!debug_mode_enabled) {
-                                       document.getElementById('debug_output').style.display = 'block';
+                               if (!Element.visible("debug_output")) {
+                                       Element.show("debug_output");
                                        debug('debug mode activated');
                                } else {
-                                       document.getElementById('debug_output').style.display = 'none';
+                                       Element.hide("debug_output");
                                }
        
                                return;
@@ -1407,18 +1407,3 @@ function hotkey_handler(e) {
                exception_error("hotkey_handler", e);
        }
 }
-
-function mouse_handler(e) {
-       try {
-               var r_mouse = false;
-
-               if (window.event) {
-                       r_mouse = window.event.button == 2;
-               } else if (e) {
-                       r_mouse = e.which == 3;
-               }
-
-       } catch (e) {
-               exception_error("mouse_handler", e);
-       }
-}
index c2ef53ce0bab7f513901045f12dfd1dc5ef633f6..1de9ce87a40f9b3e18778fb87cdc8febc962e849 100644 (file)
@@ -109,7 +109,7 @@ if (document.addEventListener) {
 window.onload = init;
 </script>
 
-<ul id="debug_output"></ul>
+<ul id="debug_output" style='display : none'></ul>
 
 <div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>