Created
November 2, 2011 03:30
-
-
Save justinpeterman/1332778 to your computer and use it in GitHub Desktop.
select events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new joContainer([ | |
new joLandingImg(landingTiles).selectEvent.subscribe(function (id, list) { | |
var card = joCache.get("videoCard"); | |
card.setVidMeta(list.getNodeData(id)); | |
App.stack.push(card); | |
}) | |
]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var joLandingImg = function (data) { | |
joList.apply(this, arguments); | |
}; | |
joLandingImg.extend(joList, { | |
tagName: 'jogallery', | |
itemTagName: 'img', | |
formatItem: function (item, index) { | |
var div = joDOM.create("div", "landing-img-container row"); | |
var asidePanel = joDOM.create("div", "panel hide-on-phones"); | |
var aside = joDOM.create("div", "aside four columns"); | |
var header = joDOM.create('h3', "landing-img-title"); | |
var p = joDOM.create('p'); | |
var button = joDOM.create('button', 'nice radius blue button'); | |
var span = joDOM.create('span'); | |
var container = joDOM.create("div", "eight columns"); | |
var imgPanel = joDOM.create("div", "panel"); | |
var image = joDOM.create(this.itemTagName); | |
if (typeof item === "object") { | |
if (item.file) { | |
image.setAttribute("src", item.thumb); | |
image.setAttribute("index", index); | |
imgPanel.appendChild(image); | |
container.appendChild(imgPanel); | |
if (item.title) { | |
span.appendChild(document.createTextNode(item.title)); | |
header.appendChild(span); | |
asidePanel.appendChild(header); | |
} | |
if (item.description) { | |
p.appendChild(document.createTextNode(item.description)); | |
asidePanel.appendChild(p); | |
} | |
button.appendChild(document.createTextNode('Learn More')); | |
asidePanel.appendChild(button); | |
aside.appendChild(asidePanel); | |
div.appendChild(container); | |
div.appendChild(aside); | |
} | |
} | |
return div; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment