1
0

show if filter is active

This commit is contained in:
adrido 2014-09-03 10:07:10 +02:00
parent cf396b17e1
commit 7d69416013
3 changed files with 31 additions and 2 deletions

8
.gitignore vendored
View File

@ -3,3 +3,11 @@
connectsql.php
pChart2.1.3
graph
testpages.html
js/newpages.js
img/TropicalSunnyDay/TropicalSunnyDayBack2048.png
img/TropicalSunnyDay/TropicalSunnyDayDown2048.png
img/TropicalSunnyDay/TropicalSunnyDayFront2048.png
img/TropicalSunnyDay/TropicalSunnyDayLeft2048.png
img/TropicalSunnyDay/TropicalSunnyDayRight2048.png
img/TropicalSunnyDay/TropicalSunnyDayUp2048.png

View File

@ -60,8 +60,8 @@
?
</output>
&nbsp; | &nbsp;
<button class="toolbarelem" onclick="showfilter()">
Filter / Search
<button id="schowfilter" class="toolbarelem" onclick="showfilter()">
Filter / Search <b id="filterstate"></b>
</button>
<button title="Settings" onclick="settings.showHide()"><img src="/img/configure.png">
</button>

View File

@ -570,6 +570,11 @@ function anchor() {
oldhash = newhash;
//URIHash.load();
getSkins(URIHash.get('page','1'));
document.getElementById("ids").value = URIHash.get('id','');
document.getElementById("name").value = URIHash.get('name','');
document.getElementById("license").value = URIHash.get('license','');
document.getElementById("author").value = URIHash.get('author','');
refreshFilterState();
};
checkAnchor = setTimeout(anchor, 500);
};
@ -628,6 +633,22 @@ function changeFilter(form){
if(author !="") load.author = author;
if(license !="") load.license = license;
URIHash.load(load);
refreshFilterState();
}
function isFilterActive(){
return location.hash.length >= 8;//must be improved
}
function refreshFilterState(){
var elem = document.getElementById("filterstate");
if(isFilterActive()){
elem.style.color = "red";
elem.innerHTML= "active";
}
else{
elem.style.color = "green";
elem.innerHTML = "inactive";
}
}
/* ==========================================================================