|
Post by Wormopolis on Sept 7, 2009 2:29:59 GMT -8
Browser Tested: IE and FF placement: board or global footer merges all the option checkboxes below the posting area into 1 line for a more compact page. includes CSS for styling the labels. You can also completely hide an option by using the hide() function. code:
<style type="text/css"> #options font {font-size:10; color:0055FF;} </style>
<script type="text/javascript"> <!-- // posting page checkboxes merge // by Wormopolis - wormocodes.proboards.com // tunescool request. // keep header intact - do not repost
if (document.postForm) { placehold=document.postForm.counter.parentNode.parentNode; nwrw=placehold.parentNode.insertRow(placehold.rowIndex+1); var nwcl=nwrw.insertCell(0); nwcl.appendChild(document.createElement('font')); nwcl.firstChild.size=2; nwcl.className="windowbg2"; nwcl.firstChild.appendChild(document.createTextNode('Options:')); nwcl=nwrw.insertCell(-1); nwcl.id="options"; nwcl.className="windowbg2"; spacer=document.createTextNode(" ");
function comp(vict) { vict.id=vict.name+'orig'; cls=vict.parentNode; nwbx=document.createElement('input'); nwbx.type="checkbox"; nwbx.id=vict.name; nwbx.style.verticalAlign="middle"; if(document.getElementById(vict.id).checked) nwbx.defaultChecked=true; nwbx.onclick= function () {v=this.id+'orig'; document.getElementById(v).checked=this.checked;}; desc=cls.parentNode.firstChild.cloneNode(true); desc.innerHTML=desc.innerHTML.replace(/\:/,''); nwcl.appendChild(nwbx); nwcl.appendChild(desc.firstChild); nwcl.appendChild(spacer.cloneNode(true)); cls.parentNode.style.display="none"; }
function hide(vict) { cls=vict.parentNode; cls.parentNode.style.display="none"; }
// use hide() to hide option, use comp() to compact it
if (document.postForm.notify) comp(document.postForm.notify); if (document.postForm.nosmiles) hide(document.postForm.nosmiles); if (document.postForm.lock) comp(document.postForm.lock); if (document.postForm.sticky) comp(document.postForm.sticky); if (document.postForm.announcements) comp(document.postForm.announcements);
} // --> </script>
preview: wormocodes.proboards.com/index.cgi?action=display&board=codereqs&thread=260
|
|