Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 129 lines (92 sloc) 4.12 KB
<!DOCTYPE html>
<html>
<head>
<title>Facebook Connect</title>
<link rel="stylesheet" href="style/jquery.mobile-1.0.css" />
<link rel="stylesheet" href="style/style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="js/vendor/jquery.mobile-1.0.min.js"></script>v
<script type="text/javascript" src="http://static.stackmob.com/js/json2-min.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/underscore-1.3.3-min.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/backbone-0.9.2-min.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/2.5.3-crypto-sha1-hmac.js"></script>
<script type="text/javascript" src="http://static.stackmob.com/js/stackmob-js-0.5.1-min.js"></script>
<script src="js/vendor/backbone-localstorage.js"></script>
<!-- App specific scripts -->
<script src="js/app.js"></script>
<script type="text/template" id="veggie-list-item-template">
<li data-split-theme="a">
<a href="#"><%= total %> <%= name %></a>
<a href='#' data-theme="c" data-icon="share" data-id="<%= veggies_id %>" id="shareVeggie">Share on Facebook</a>
</li>
</script>
<!-- maximum scale added to stop zoom on select controls -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '459807940711896', // App ID
channelUrl : 'dev.connectstackmob.stackmob339.stackmobapp.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<!-- LIST -->
<div data-role="page" id="list">
<div data-role="header" id="listHeader">
<a href="#home" data-rel="back" data-icon="back" data-iconpos="notext">home</a>
<h1>Gardens</h1>
<a href="#" data-role="button" data-icon="add" id="addBtn" >Add</a>
</div>
<div data-role="content">
<a href="#" id="share" data-role="button">share</a>
<!-- the contents of the list view will be rendered via the backbone view -->
<ul id="veggies-list" data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e">
<li>Error Loading</li>
</ul>
</div>
</div>
<!-- ADD -->
<div data-role="page" id="addPage">
<div data-role="header" >
<a href="#home" data-rel="back" data-icon="back" data-iconpos="notext">home</a>
<h1>Add Veggie</h1>
</div>
<div data-role="content">
<form name="addForm" id="addForm" method="post" >
<input type="text" name="name" id="name" value="apples">
<input type="text" name="total" id="total" value="10">
<input type="button" id="addVeggie" value="add">
</form>
<!-- the contents of the list view will be rendered via the backbone view -->
</div>
</div>
<div data-role="dialog" id="fb">
<div data-role="header">
<a href="#home" data-rel="back" data-icon="back" data-iconpos="notext">home</a>
<h1>Facebook</h1>
</div>
<div data-role="content">
<form name="addForm" id="addForm" method="post" >
<input type="button" id="fbLogin" value="Login">
<input type="button" id="fbLogout" value="Logout">
</form>
<!-- the contents of the list view will be rendered via the backbone view -->
</div>
</div>
</body>
</html>