rework entry display for prefs, filters, labels and users

This commit is contained in:
Andrew Dolgov 2008-05-17 16:36:35 +01:00
parent c239b26b3a
commit a95da1368e
6 changed files with 68 additions and 82 deletions

View File

@ -1052,8 +1052,10 @@
print "<td class='feedSelect'><input onclick='toggleSelectPrefRow(this, \"feed\");'
type=\"checkbox\" id=\"FRCHK-".$line["id"]."\"></td>";
$onclick = "onclick='editFeed($feed_id)' title='".__('Click to edit')."'";
if (get_pref($link, 'ENABLE_FEED_ICONS')) {
print "<td class='feedIcon'>$feed_icon</td>";
print "<td $onclick class='feedIcon'>$feed_icon</td>";
}
if ($hidden) {
@ -1074,16 +1076,14 @@
$parent_title)</span>";
}
print "<td><a href=\"javascript:editFeed($feed_id);\">" .
"$edit_title $parent_title" . "</a></td>";
print "<td $onclick>" . "$edit_title $parent_title" . "</td>";
if ($show_last_article_info) {
print "<td align='right'><a href=\"javascript:editFeed($feed_id);\">" .
"$last_article</a></td>";
print "<td align='right' $onclick>" .
"$last_article</td>";
}
print "<td align='right'><a href=\"javascript:editFeed($feed_id);\">" .
"$last_updated</a></td>";
print "<td $onclick align='right'>$last_updated</td>";
print "</tr>";

View File

@ -370,12 +370,12 @@
$line["action_param"] = "<span class=\"insensitive\">" .
$line["action_param"] . "</span>";
}
$onclick = "onclick='editFilter($filter_id)' title='".__('Click to edit')."'";
print "<td $onclick>" . $line["reg_exp"] . "</td>";
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
$line["reg_exp"] . "</td>";
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
$line["feed_title"] . "</td>";
print "<td $onclick>" . $line["feed_title"] . "</td>";
$inverse_label = "";
@ -383,14 +383,12 @@
$inverse_label = " <span class='insensitive'>".__('(Inverse)')."</span>";
}
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
$line["filter_type_descr"] . "$inverse_label</td>";
print "<td $onclick>" . $line["filter_type_descr"] . "$inverse_label</td>";
/* print "<td><a href=\"javascript:editFilter($filter_id);\">" .
$line["action_description"]."</td>"; */
print "<td><a href=\"javascript:editFilter($filter_id);\">" .
$line["action_param"] . "</td>";
print "<td $onclick>" . $line["action_param"] . "</td>";
print "</tr>";

View File

@ -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 "<td align='center'><input onclick='toggleSelectPrefRow(this, \"label\");'
type=\"checkbox\" id=\"LICHK-".$line["id"]."\"></td>";
print "<td><a href=\"javascript:editLabel($label_id);\">" .
$line["description"] . "</td>";
print "<td><a href=\"javascript:editLabel($label_id);\">" .
$line["sql_exp"] . "</td>";
print "<td $onclick>" . $line["description"] . "</td>";
print "<td $onclick>" . $line["sql_exp"] . "</td>";
print "</tr>";

View File

@ -287,60 +287,18 @@
strtotime($line["created"]));
}
// if (!$edit_uid || $subop != "edit") {
print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"user\");'
print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"user\");'
type=\"checkbox\" id=\"UMCHK-$uid\"></td>";
print "<td><a href=\"javascript:editUser($uid);\">" .
$line["login"] . "</td>";
$onclick = "onclick='editUser($uid) title='".__('Click to edit')."''";
if (!$line["email"]) $line["email"] = "&nbsp;";
print "<td $onclick>" . $line["login"] . "</td>";
print "<td><a href=\"javascript:editUser($uid);\">" .
$access_level_names[$line["access_level"]] . "</td>";
if (!$line["email"]) $line["email"] = "&nbsp;";
/* } else if ($uid != $edit_uid) {
if (!$line["email"]) $line["email"] = "&nbsp;";
print "<td align='center'><input disabled=\"true\" type=\"checkbox\"
id=\"UMCHK-".$line["id"]."\"></td>";
print "<td>".$line["login"]."</td>";
print "<td>".$line["email"]."</td>";
print "<td>".$access_level_names[$line["access_level"]]."</td>";
} else {
print "<td align='center'>
<input disabled=\"true\" type=\"checkbox\" checked></td>";
print "<td><input id=\"iedit_ulogin\" value=\"".$line["login"].
"\"></td>";
print "<td><input id=\"iedit_email\" value=\"".$line["email"].
"\"></td>";
print "<td>";
print "<select id=\"iedit_ulevel\">";
foreach (array_keys($access_level_names) as $al) {
if ($al == $line["access_level"]) {
$selected = "selected";
} else {
$selected = "";
}
print "<option $selected id=\"$al\">" .
$access_level_names[$al] . "</option>";
}
print "</select>";
print "</td>";
} */
print "<td>".$line["created"]."</td>";
print "<td>".$line["last_login"]."</td>";
print "<td $onclick>" . $access_level_names[$line["access_level"]] . "</td>";
print "<td $onclick>" . $line["created"] . "</td>";
print "<td $onclick>" . $line["last_login"] . "</td>";
print "</tr>";

View File

@ -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() {
}

View File

@ -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;
}