Removed the infra_sensor define for noddie.

Integrated the sql and standard admin_rank stuff a little. Still needs some work.
Permissions Panel has a sexy floating search bar. The scripts and stylesheets are external files which will be sent to every client at connect, so they can be used in any panel you wish with no additional overheads.

If there are any bugs with the permissions panel (particularly the search bar) please let me know. thanks.

rights2text now has a seperator argument. It defaults to "", but can be any string, for instance "<br>"

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5080 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-11-15 20:35:37 +00:00
parent 323c527e9d
commit 25b61bae72
12 changed files with 192 additions and 144 deletions

33
html/search.js Normal file
View File

@@ -0,0 +1,33 @@
function selectTextField(){
var filter_text = document.getElementById('filter');
filter_text.focus();
filter_text.select();
}
function updateSearch(){
var input_form = document.getElementById('filter');
var filter = input_form.value.toLowerCase();
input_form.value = filter;
var table = document.getElementById('searchable');
var alt_style = 'norm';
for(var i = 0; i < table.rows.length; i++){
try{
var row = table.rows[i];
if(row.className == 'title') continue;
var found=0;
for(var j = 0; j < row.cells.length; j++){
var cell = row.cells[j];
if(cell.innerText.toLowerCase().indexOf(filter) != -1){
found=1;
break;
}
}
if(found == 0) row.style.display='none';
else{
row.style.display='block';
row.className = alt_style;
if(alt_style == 'alt') alt_style = 'norm';
else alt_style = 'alt';
}
}catch(err) { }
}
}