mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
Use fake tristate checkbox on IE < 9 only
This commit is contained in:
parent
92cc8f7211
commit
fa706b24be
@ -275,7 +275,7 @@ a.propButton img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Tri-state checkbox */
|
/* Tri-state checkbox */
|
||||||
a.tristate {
|
label.tristate {
|
||||||
background: url(../images/3-state-checkbox.gif) 0 0 no-repeat;
|
background: url(../images/3-state-checkbox.gif) 0 0 no-repeat;
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
@ -285,8 +285,8 @@ a.tristate {
|
|||||||
text-indent: -999em;
|
text-indent: -999em;
|
||||||
width: 13px;
|
width: 13px;
|
||||||
}
|
}
|
||||||
a.checked { background-position: 0 -13px; }
|
label.checked { background-position: 0 -13px; }
|
||||||
a.partial { background-position: 0 -26px; }
|
label.partial { background-position: 0 -26px; }
|
||||||
|
|
||||||
fieldset.settings {
|
fieldset.settings {
|
||||||
border: solid 1px black;
|
border: solid 1px black;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<table class="torrentTable" cellpadding="0" cellspacing="0" style="width: 100%">
|
<table class="torrentTable" cellpadding="0" cellspacing="0" style="width: 100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 30px"><a id="all_files_cb" style="margin-right: 2px;" class="tristate" onclick="javascript:switchCBState()"></a></th>
|
<th style="width: 30px"><input type="checkbox" id="tristate_cb" style="display: none;" onclick="javascript:switchCBState()" /><label id="all_files_cb" class="tristate" for="tristate_cb"></label></th>
|
||||||
<th>_(Name)</th>
|
<th>_(Name)</th>
|
||||||
<th>_(Size)</th>
|
<th>_(Size)</th>
|
||||||
<th style="width: 90px;">_(Progress)</th>
|
<th style="width: 90px;">_(Progress)</th>
|
||||||
@ -18,23 +18,42 @@
|
|||||||
var is_seed = true;
|
var is_seed = true;
|
||||||
var current_hash = "";
|
var current_hash = "";
|
||||||
|
|
||||||
var setCBState = function(state) {
|
if (!(Browser.name == "ie" && Browser.version < 9)) {
|
||||||
if(state == "partial") {
|
$("all_files_cb").removeClass("tristate");
|
||||||
if(!$("all_files_cb").hasClass("partial")) {
|
|
||||||
$("all_files_cb").removeClass("checked");
|
|
||||||
$("all_files_cb").addClass("partial");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(state == "checked") {
|
|
||||||
if(!$("all_files_cb").hasClass("checked")) {
|
|
||||||
$("all_files_cb").removeClass("partial");
|
$("all_files_cb").removeClass("partial");
|
||||||
$("all_files_cb").addClass("checked");
|
$("all_files_cb").removeClass("checked");
|
||||||
|
$("tristate_cb").style.display = "inline";
|
||||||
|
}
|
||||||
|
|
||||||
|
var setCBState = function(state) {
|
||||||
|
if (Browser.name == "ie" && Browser.version < 9) {
|
||||||
|
if (state == "partial") {
|
||||||
|
if (!$("all_files_cb").hasClass("partial")) {
|
||||||
|
$("all_files_cb").removeClass("checked");
|
||||||
|
$("all_files_cb").addClass("partial");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (state == "checked") {
|
||||||
|
if(!$("all_files_cb").hasClass("checked")) {
|
||||||
|
$("all_files_cb").removeClass("partial");
|
||||||
|
$("all_files_cb").addClass("checked");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$("all_files_cb").removeClass("partial");
|
||||||
|
$("all_files_cb").removeClass("checked");
|
||||||
|
} else {
|
||||||
|
if (state == "partial") {
|
||||||
|
$("tristate_cb").indeterminate = true;
|
||||||
|
} else if (state == "checked") {
|
||||||
|
$("tristate_cb").indeterminate = false;
|
||||||
|
$("tristate_cb").checked = true;
|
||||||
|
} else {
|
||||||
|
$("tristate_cb").indeterminate = false;
|
||||||
|
$("tristate_cb").checked = false;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
$("all_files_cb").removeClass("partial");
|
|
||||||
$("all_files_cb").removeClass("checked");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var switchCBState = function() {
|
var switchCBState = function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user