Improve behavior

This commit is contained in:
calzoneman 2013-11-16 00:00:03 -06:00
parent 45ad9e44a3
commit b077f3f206
2 changed files with 12 additions and 13 deletions

View File

@ -214,16 +214,15 @@
"#filter_channelsettings",
"#filter_joinquit"
];
$("#filter_all").change(function () {
var checked = $("#filter_all").prop("checked");
logfilters.forEach(function (f) {
$(f).attr("disabled", checked);
});
});
logfilters.unshift("#filter_all");
logfilters.forEach(function (f) {
$(f).change(filterChannelLog);
$(f).change(function () {
if (f !== "#filter_all") {
$("#filter_all").prop("checked", false);
}
filterChannelLog();
});
});
logfilters.shift();
})();

View File

@ -236,22 +236,22 @@
<input type="checkbox" id="filter_all" checked="checked">
</label>
<label class="checkbox" for="filter_chat">Chat
<input type="checkbox" id="filter_chat" disabled="true">
<input type="checkbox" id="filter_chat">
</label>
<label class="checkbox" for="filter_polls">Polls
<input type="checkbox" id="filter_polls" disabled="true">
<input type="checkbox" id="filter_polls">
</label>
<label class="checkbox" for="filter_queue">Playlist actions
<input type="checkbox" id="filter_queue" disabled="true">
<input type="checkbox" id="filter_queue">
</label>
<label class="checkbox" for="filter_bans">Bans
<input type="checkbox" id="filter_bans" disabled="true">
<input type="checkbox" id="filter_bans">
</label>
<label class="checkbox" for="filter_channelsettings">Channel settings
<input type="checkbox" id="filter_channelsettings" disabled="true">
<input type="checkbox" id="filter_channelsettings">
</label>
<label class="checkbox" for="filter_joinquit">Join/Quit Messages
<input type="checkbox" id="filter_joinquit" disabled="true">
<input type="checkbox" id="filter_joinquit">
</label>
</form>
<pre id="chanlog_contents" style="max-height: 400px; overflow-y: scroll"></pre>