From: Jon Buckley Date: Mon, 29 Aug 2011 15:13:07 +0000 (-0400) Subject: Add suggested default values and extended manifest types [#461] X-Git-Tag: v0.8^2~7 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=ad03cb54d06f1b455766f3ce1611732b5df63294;p=popcorn-js.git Add suggested default values and extended manifest types [#461] Conflicts: plugins/timeline/popcorn.timeline.js --- ad03cb54d06f1b455766f3ce1611732b5df63294 diff --cc plugins/timeline/popcorn.timeline.js index c263d7a,3cee6b2..c8638b2 --- a/plugins/timeline/popcorn.timeline.js +++ b/plugins/timeline/popcorn.timeline.js @@@ -56,22 -45,25 +56,24 @@@ // Default to up if options.direction is non-existant or not up or down options.direction = options.direction || "up"; - if ( options.direction.toLowerCase() !== "up" || options.direction.toLowerCase() !== "down" ) { - options.direction = "up"; - } + if ( options.direction.toLowerCase() === "down" ) { - if ( target ) { - - target.style.width = "400px"; - target.style.height = "200px"; - target.style.overflow = "auto"; - target.appendChild( newdiv ); + goingUp = false; + } + if ( target && container ) { // if this isnt the first div added to the target div - if( options.direction.length === 2 ){ + if( goingUp ){ // insert the current div before the previous div inserted - target.insertBefore( newdiv, document.getElementById( "timelineDiv" + ( i - 1 ) ) ); + container.insertBefore( contentDiv, container.firstChild ); + } + else { + + container.appendChild( contentDiv ); } + } else if ( Popcorn.plugin.debug ) { + throw new Error( "target container doesn't exist" ); } i++;