forked from I2P_Developers/i2p.i2p
i2psnark: More search CSS and js
This commit is contained in:
@@ -11,17 +11,30 @@ function initSearch()
|
||||
var sch = document.getElementById("search");
|
||||
if (sch != null) {
|
||||
var box = document.getElementById("searchbox");
|
||||
var cxl = document.getElementById("searchcancel");
|
||||
sch.addEventListener("reset", function(event) {
|
||||
if (box.value !== "") {
|
||||
box.value = "";
|
||||
requestAjax2(-1);
|
||||
}
|
||||
cxl.classList.add("disabled");
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
box.addEventListener("input", function(event) {
|
||||
if (box.value !== "") {
|
||||
cxl.classList.remove("disabled");
|
||||
} else {
|
||||
cxl.classList.add("disabled");
|
||||
}
|
||||
requestAjax2(-1);
|
||||
});
|
||||
|
||||
if (box.value !== "") {
|
||||
cxl.classList.remove("disabled");
|
||||
} else {
|
||||
cxl.classList.add("disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -249,10 +249,10 @@ button::-moz-focus-inner, input::-moz-focus-inner {
|
||||
|
||||
#searchcancel {
|
||||
background: url(images/delete.png) 0px center no-repeat;
|
||||
margin: 2px 4px 2px -28px;
|
||||
margin: 2px 4px 2px 4px;
|
||||
color: transparent;
|
||||
border: none;
|
||||
width: 12px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
/* end top nav */
|
||||
|
||||
Reference in New Issue
Block a user