From bf3c98384d5de2f319ef19f934fc324eb33f399a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 Jan 2009 18:46:21 +0100 Subject: [PATCH] rework subtoolbar actions dropdown --- feedlist.js | 19 ++++++++- functions.php | 91 +++++++++++++++++++++++++----------------- images/down_arrow.png | Bin 208 -> 135 bytes tt-rss.css | 36 +++++++++++++++++ viewfeed.js | 19 +++++++++ 5 files changed, 128 insertions(+), 37 deletions(-) diff --git a/feedlist.js b/feedlist.js index 68c93e4c..177f057c 100644 --- a/feedlist.js +++ b/feedlist.js @@ -8,6 +8,7 @@ var mouse_y = 0; var mouse_x = 0; var resize_enabled = false; +var selection_disabled = false; var counters_last_request = 0; function toggle_sortable_feedlist(enabled) { @@ -552,6 +553,10 @@ function mouse_move_handler(e) { } } +function enable_selection(b) { + disable_selection = !b; +} + function enable_resize(b) { resize_enabled = b; } @@ -569,6 +574,12 @@ function mouse_down_handler(e) { document.onselectstart = function() { return false; }; return false; } + + if (selection_disabled) { + document.onselectstart = function() { return false; }; + return false; + } + } catch (e) { exception_error("mouse_move_handler", e); } @@ -577,7 +588,13 @@ function mouse_down_handler(e) { function mouse_up_handler(e) { try { mouse_is_down = false; - document.onselectstart = null; + + if (!disable_selection) { + document.onselectstart = null; + var e = document.getElementById("headlineActionsBody"); + if (e) Element.hide(e); + } + } catch (e) { exception_error("mouse_move_handler", e); } diff --git a/functions.php b/functions.php index 50374dc1..be793c49 100644 --- a/functions.php +++ b/functions.php @@ -3978,10 +3978,10 @@ } - if (strpos($_SESSION["client.userAgent"], "MSIE") === false) { + print ""; - print " - "; - print ""; - - } else { - // old style subtoolbar: - - print "". - __('Select:')." - ".__('All').", - ".__('Unread').", - ".__('None')." -   ". - __('Toggle:')." ".__('Unread').", - ".__('Starred')." -   ". - __('Mark as read:')." - ".__('Page').", - ".__('Feed').""; - - print ""; - + print ""; */ + + print __('Select:')." + ".__('All').", + ".__('Unread').", + ".__('Invert').", + ".__('None').""; + + print "  "; + + print "". + __("Actions...") . "   + "; + + print ""; + + print ""; + print ""; print "F z;usERLtr1^oEor4WXUT+mw2U2WF-tI08|3PrU-sO`g zDoWI|mw5WRvR`Ku<211lXSuEfR3%&D8d2h$pPQSSSHj?2l$uzQnxasiS(2d;l98(5 z?&%xwK1DSTsL;gI#W6(Ua&p1~1_PzyXXoetpFg4P$PpK}HM2M+8`cP}PK#k%kbPvO m