Skip to content

Commit

Permalink
[nickfilter] various UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Feb 9, 2011
1 parent 6dfdfc6 commit 6f15281
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion cgi/nickfilter.js
Expand Up @@ -38,7 +38,7 @@ $(document).ready(function() {
/** Create filter panel/box thingy and add nicks */
try {
var filterbox = document.createElement("div");
$(filterbox).hide().css("position", "fixed"); /* don't move onscroll */
$(filterbox).hide().css("position", "absolute");
$(filterbox).attr("id", filterbox_id);

// Add to body element
Expand All @@ -50,6 +50,7 @@ $(document).ready(function() {
+ '<p id="show_hide_all">'
+ ' <a href="javascript:show_all()">Show All</a>'
+ ' <a href="javascript:hide_all()">Hide All</a>'
+ ' <a href="javascript:hide_nick_filter()">(hide this window)</a> '
+ '</p>'

+ '<div id="shown_nicks">'
Expand Down Expand Up @@ -257,6 +258,10 @@ function filtering_on() {
render_nicklists();
}

function hide_nick_filter() {
$('#filterbox').hide();
}

function filtering_off() {
// Could do a reset here by removing all properties from
// hidden_nicks / shown_nicks, but I think it's a feature we don't -
Expand Down
2 changes: 1 addition & 1 deletion cgi/style.css
Expand Up @@ -154,7 +154,7 @@ abbr { cursor: help; }

/* position: fixed; set in JS */
#filterbox {
width: 25%;
width: 24em;
top: 50px;
right: 1%;
padding: 10px;
Expand Down

0 comments on commit 6f15281

Please sign in to comment.