# HG changeset patch # User Dan # Date 1227930792 18000 # Node ID 33ae51d7c6858b2f0e90dfa6cd19df5e50d1e6b5 # Parent 8875559bae0ecb2f94882bdac634851b516958b4 Removed Slide-In-Slide-Out-Ala-Digg, replaced with jQuery diff -r 8875559bae0e -r 33ae51d7c685 includes/clientside/static/sliders.js --- a/includes/clientside/static/sliders.js Fri Nov 28 22:52:29 2008 -0500 +++ b/includes/clientside/static/sliders.js Fri Nov 28 22:53:12 2008 -0500 @@ -3,178 +3,90 @@ // our global vars // the delay between the slide in/out, and a little inertia +/* +pseudocode: + oninit(): + i = 0 + for every div with class "slideblock", do + if ( cookie['mdgSliderState_' || i] == 'closed' ) + hide(div) + + div.trigger.addEvent onclick(): + if ( div.hidden ) + div.show() + cookie['mdgSliderState_' || i] = 'open' + else + div.hide() + cookie['mdgSliderState_' || i] = 'closed + + i++ + +*/ + + var sliders_initted = false; var initSliders = function() { - sliders_initted = true; - if ( KILL_SWITCH ) + if ( KILL_SWITCH || IE ) return false; - // detect whether the user has ie or not, how we get the height is different - var useragent = navigator.userAgent.toLowerCase(); - var ie = ((useragent.indexOf('msie') != -1) && (useragent.indexOf('opera') == -1) && (useragent.indexOf('webtv') == -1)); + + var divs = getElementsByClassName(document, "div", "slideblock"); + var divs2 = getElementsByClassName(document, "div", "slideblock2"); + for ( var i = 0; i < divs2.length; i++ ) + { + divs.push(divs2[i]); + } + delete divs2; + + if ( divs.length < 1 ) + return false; + + for ( var i = 0; i < divs.length; i++ ) + { + var div = divs[i]; + // set a unique id for this slider + div.metaid = i; - if(ie) - return; - - var divs = getElementsByClassName(document, "div", "slideblock"); - - for(var i=0; i targetheight) - { - // reduce the height by intertiabase * inertiainc - heightnow -= inertiabase; - - // increase the intertiabase by the amount to keep it changing - inertiabase += inertiainc; - - // it's possible to exceed the height we want so we use a ternary - (condition) ? when true : when false; - block.style.height = (heightnow > 1) ? heightnow + "px" : targetheight + "px"; - } - else - { - // finished, so hide the div properly and kill the interval - clearInterval(slideinterval); - block.style.display = "none"; - } -} - -// this is the function our slideout interval uses, it keeps adding -// to the height till it's fully displayed -function slideout() -{ - block.style.display = 'block'; - if(heightnow < targetheight) - { - // increases the height by the inertia stuff - heightnow += inertiabase; - - // increase the inertia stuff - inertiabase += inertiainc; - - // it's possible to exceed the height we want so we use a ternary - (condition) ? when true : when false; - block.style.height = (heightnow < targetheight) ? heightnow + "px" : targetheight + "px"; - - } - else - { - // finished, so make sure the height is what it's meant to be (inertia can make it off a little) - // then kill the interval - clearInterval(slideinterval); - block.style.height = targetheight + "px"; - } -} - -// returns the height of the div from our array of such things -function divheight(d) -{ - for(var i=0; iUnknown license

For the following libraries, the license was either not formally stated or could not be found.

diff -r 8875559bae0e -r 33ae51d7c685 themes/oxygen/elements.tpl --- a/themes/oxygen/elements.tpl Fri Nov 28 22:52:29 2008 -0500 +++ b/themes/oxygen/elements.tpl Fri Nov 28 22:53:12 2008 -0500 @@ -31,7 +31,7 @@
{ADMIN_START}

- {TITLE} + {TITLE} {ADMIN_END}

@@ -43,7 +43,7 @@
{ADMIN_START}

- {TITLE} + {TITLE} {ADMIN_END}