From a95da1368ec6ed8e7a6e26c831cf160b71440766 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 17 May 2008 16:36:35 +0100 Subject: [PATCH] rework entry display for prefs, filters, labels and users --- modules/pref-feeds.php | 14 +++++----- modules/pref-filters.php | 16 +++++------- modules/pref-labels.php | 11 ++++---- modules/pref-users.php | 56 +++++----------------------------------- prefs.js | 11 -------- tt-rss.css | 42 ++++++++++++++++++++++++++++++ 6 files changed, 68 insertions(+), 82 deletions(-) diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index e52e54c8..e4f6b60d 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1052,8 +1052,10 @@ print ""; + $onclick = "onclick='editFeed($feed_id)' title='".__('Click to edit')."'"; + if (get_pref($link, 'ENABLE_FEED_ICONS')) { - print "$feed_icon"; + print "$feed_icon"; } if ($hidden) { @@ -1074,16 +1076,14 @@ $parent_title)"; } - print "" . - "$edit_title $parent_title" . ""; + print "" . "$edit_title $parent_title" . ""; if ($show_last_article_info) { - print "" . - "$last_article"; + print "" . + "$last_article"; } - print "" . - "$last_updated"; + print "$last_updated"; print ""; diff --git a/modules/pref-filters.php b/modules/pref-filters.php index 7975e129..4fb59d4a 100644 --- a/modules/pref-filters.php +++ b/modules/pref-filters.php @@ -370,12 +370,12 @@ $line["action_param"] = "" . $line["action_param"] . ""; } + + $onclick = "onclick='editFilter($filter_id)' title='".__('Click to edit')."'"; + + print "" . $line["reg_exp"] . ""; - print "" . - $line["reg_exp"] . ""; - - print "" . - $line["feed_title"] . ""; + print "" . $line["feed_title"] . ""; $inverse_label = ""; @@ -383,14 +383,12 @@ $inverse_label = " ".__('(Inverse)').""; } - print "" . - $line["filter_type_descr"] . "$inverse_label"; + print "" . $line["filter_type_descr"] . "$inverse_label"; /* print "" . $line["action_description"].""; */ - print "" . - $line["action_param"] . ""; + print "" . $line["action_param"] . ""; print ""; diff --git a/modules/pref-labels.php b/modules/pref-labels.php index ce326bf0..fda73ecf 100644 --- a/modules/pref-labels.php +++ b/modules/pref-labels.php @@ -299,16 +299,15 @@ $line["sql_exp"] = htmlspecialchars($line["sql_exp"]); $line["description"] = htmlspecialchars($line["description"]); - if (!$line["description"]) $line["description"] = "[No caption]"; + if (!$line["description"]) $line["description"] = __("[No caption]"); + + $onclick = "onclick='editLabel($label_id)' title='".__('Click to edit')."'"; print ""; - print "" . - $line["description"] . ""; - - print "" . - $line["sql_exp"] . ""; + print "" . $line["description"] . ""; + print "" . $line["sql_exp"] . ""; print ""; diff --git a/modules/pref-users.php b/modules/pref-users.php index 2e9eff75..961e314f 100644 --- a/modules/pref-users.php +++ b/modules/pref-users.php @@ -287,60 +287,18 @@ strtotime($line["created"])); } -// if (!$edit_uid || $subop != "edit") { - - print ""; - print "" . - $line["login"] . ""; - - if (!$line["email"]) $line["email"] = " "; - - print "" . - $access_level_names[$line["access_level"]] . ""; - -/* } else if ($uid != $edit_uid) { + $onclick = "onclick='editUser($uid) title='".__('Click to edit')."''"; - if (!$line["email"]) $line["email"] = " "; - - print ""; - - print "".$line["login"].""; - print "".$line["email"].""; - print "".$access_level_names[$line["access_level"]].""; - - } else { + print "" . $line["login"] . ""; - print " - "; + if (!$line["email"]) $line["email"] = " "; - print ""; - - print ""; - - print ""; - print ""; - print ""; - - } */ - - - print "".$line["created"].""; - print "".$line["last_login"].""; + print "" . $access_level_names[$line["access_level"]] . ""; + print "" . $line["created"] . ""; + print "" . $line["last_login"] . ""; print ""; diff --git a/prefs.js b/prefs.js index 6889b7a6..ad64f481 100644 --- a/prefs.js +++ b/prefs.js @@ -1772,7 +1772,6 @@ function pref_hotkey_handler(e) { return focus_element(search_boxes[i]); } } - } } @@ -1805,10 +1804,6 @@ function pref_hotkey_handler(e) { return browseFeeds(); } - if (keycode == 69) { // e - return editCurrentEntryDispatcher(); - } - } /* Prefix g */ @@ -2139,9 +2134,3 @@ function rescore_all_feeds() { xmlhttp.send(null); } } - -function editCurrentEntryDispatcher() { - - - -} diff --git a/tt-rss.css b/tt-rss.css index 57f311ce..4746a2e7 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -446,6 +446,48 @@ table.prefFilterList td.filterEditCat { padding-top : 0.5em; } +/* oh for the love of... */ + +table.prefFilterList tr.even, +table.prefFilterList tr.odd, +table.prefFilterList tr.evenSelected, +table.prefFilterList tr.oddSelected, +table.prefLabelList tr.even, +table.prefLabelList tr.odd, +table.prefLabelList tr.evenSelected, +table.prefLabelList tr.oddSelected, +table.prefUserList tr.even, +table.prefUserList tr.odd, +table.prefUserList tr.evenSelected, +table.prefUserList tr.oddSelected, +table.prefFeedList tr.even, +table.prefFeedList tr.odd, +table.prefFeedList tr.evenSelected, +table.prefFeedList tr.oddSelected +{ + cursor : pointer; +} + +table.prefFilterList tr.even:hover td, +table.prefFilterList tr.odd:hover td, +table.prefFilterList tr.evenSelected:hover td, +table.prefFilterList tr.oddSelected:hover td +table.prefLabelList tr.even:hover td, +table.prefLabelList tr.odd:hover td, +table.prefLabelList tr.evenSelected:hover td, +table.prefLabelList tr.oddSelected:hover td, +table.prefUserList tr.even:hover td, +table.prefUserList tr.odd:hover td, +table.prefUserList tr.evenSelected:hover td, +table.prefUserList tr.oddSelected:hover td, +table.prefFeedList tr.even:hover td, +table.prefFeedList tr.odd:hover td, +table.prefFeedList tr.evenSelected:hover td, +table.prefFeedList tr.oddSelected:hover td +{ + color : #88b0f0; +} + table.prefFeedList td.feedIcon { text-align : center; } -- 2.39.5