Files
fulpstation/code/js/menus.dm
panurgomatic 6564fec7e3 - Fixed bug with destructive analyzer being stuck in busy state after canceling item destruction.
- Fixed bug with mechs not reading ID permissions from PDA.
- Updated H.O.N.K menu code.
- There should be no delay in updating mech equipment info in exosuit stats window.
- Added armor booster sprites.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1510 316c924e-a436-60f5-8080-3fe189b3f50e
2011-04-30 16:00:40 +00:00

37 lines
1.5 KiB
Plaintext

var/const/js_dropdowns = {"
function dropdowns() {
var divs = document.getElementsByTagName('div');
var headers = new Array();
var links = new Array();
for(var i=0;i<divs.length;i++){
if(divs\[i\].className=='header') {
divs\[i\].className='header closed';
divs\[i\].innerHTML = divs\[i\].innerHTML+' +';
headers.push(divs\[i\]);
}
if(divs\[i\].className=='links') {
divs\[i\].className='links hidden';
links.push(divs\[i\]);
}
}
for(var i=0;i<headers.length;i++){
if(typeof(links\[i\])!== 'undefined' && links\[i\]!=null) {
headers\[i\].onclick = (function(elem) {
return function() {
if(elem.className.search('visible')>=0) {
elem.className = elem.className.replace('visible','hidden');
this.className = this.className.replace('open','closed');
this.innerHTML = this.innerHTML.replace('-','+');
}
else {
elem.className = elem.className.replace('hidden','visible');
this.className = this.className.replace('closed','open');
this.innerHTML = this.innerHTML.replace('+','-');
}
return false;
}
})(links\[i\]);
}
}
}
"}