Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: aad650f99a
Fetching contributors…

Cannot retrieve contributors at this time

92 lines (90 sloc) 3.328 kb
<!DOCTYPE html>
<html>
<head>
<title>jQuery Conference 2011 Mobile Schedule</title>
<link rel="stylesheet" href="includes/jquery.mobile-1.0a4.1.min.css" />
<script src="includes/jquery-1.5.2.min.js"></script>
<script src="includes/jquery.mobile-1.0a4.1.min.js"></script>
<script src="includes/jquery.tmpl.min.js"></script>
<script>
var sch;
$(".loadSchedule").live("pagecreate",function(event){
var page = $(this),
day = page.attr("id"),
start = 0,
startAt = "09:00a";
$.template("session",
"<li class=\"ui-li ui-li-static ui-body-${$item.alternate()}\">${$item.getStart()} - ${end} : {{html $item.getName()}}</li>"
);
$.get(day+".json",function(schedule){
$.tmpl(
"session",
schedule,
{
alternate : function(){
return start++ % 2 == 0 ? "a" : "b";
},
getName : function(){
if(this.data.talks){
var links = [
this.data.talks[0]["sid"] ? "http://events.jquery.org/m/talks/talk.php?id="+this.data.talks[0]["sid"] : "#",
this.data.talks[1]["sid"] ? "http://events.jquery.org/m/talks/talk.php?id="+this.data.talks[1]["sid"] : "#"
],
spkr = [
this.data.talks[0]["spkr"] ? "http://events.jquery.org/m/speakers/speaker.php?id="+this.data.talks[0]["spkr"] : "#",
this.data.talks[1]["spkr"] ? "http://events.jquery.org/m/speakers/speaker.php?id="+this.data.talks[1]["spkr"] : "#"
];
return "<div data-role=\"controlgroup\">"
+"<a data-theme=\"b\" data-role=\"button\" href=\""+links[0]+"\">"
+this.data.talks[0].title
+"</a>"
+"<a data-theme=\"c\" data-role=\"button\" href=\""+spkr[0]+"\">"
+this.data.talks[0].who
+"</a>"
+"</div>"
+"<div data-role=\"controlgroup\">"
+"<a data-rel=\"dialog\" data-theme=\"b\" data-role=\"button\" href=\""+links[1]+"\">"
+this.data.talks[1].title
+"</a>"
+"<a data-rel=\"dialog\" data-theme=\"c\" data-role=\"button\" href=\""+spkr[1]+"\">"
+this.data.talks[1].who
+"</a>"
+"</div>";
}else{
return this.data.name;
}
},
getStart : function(){
var s = startAt;
startAt = this.data.end;
return s;
}
}
).appendTo("#schedule");
$("#"+day).removeClass('loadSchedule').page('destroy').page();
},"json");
});
$("#dialog").live("pageshow", function() {
$('#title').html('title');
$('#desc').html('desc');
});
</script>
<link rel="shortcut icon" href="http://static.jquery.com/favicon.ico" type="image/x-icon"/>
</head>
<body>
<div data-role="page" id="home">
<div data-role="header">
<h1>jQuery Conference 2011 - Mobile Schedule</h2>
</div>
<div data-role="content">
<ul data-role="listview">
<li><a href="saturday.html">Saturday</a></li>
<li><a href="sunday.html">Sunday</a></li>
</ul>
</div>
<div data-role="footer">
<h4><a href="http://twitter.com/#!/search/%23jqcon">#jqcon</a> schedule<br />by <a href="http://twitter.com/aknosis">@aknosis</a></h4>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.