Permalink
Browse files

step-1 static phone list

  • Loading branch information...
204NoContent committed Apr 9, 2014
1 parent 546199d commit 24ec7c36574daa78e64d766b0a1ec272fcb6275e
@@ -1 +1,8 @@
window.JST = {};
window.JST["phones/index"] = function(obj){
var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
with(obj||{}){
__p+='<ul>\n <li>\n <span>Nexus S</span>\n <p>\n Fast just got faster with Nexus S.\n </p>\n </li>\n <li>\n <span>Motorola XOOM™ with Wi-Fi</span>\n <p>\n The Next, Next Generation tablet.\n </p>\n </li>\n</ul>';
}
return __p;
};
@@ -1,5 +1,10 @@
Router = Backbone.Router.extend({
routes: {
'': 'phonesIndex',
},
phonesIndex: function () {
new PhonesIndexView({ el: 'section#main' });
}
});
@@ -0,0 +1,14 @@
<ul>
<li>
<span>Nexus S</span>
<p>
Fast just got faster with Nexus S.
</p>
</li>
<li>
<span>Motorola XOOM™ with Wi-Fi</span>
<p>
The Next, Next Generation tablet.
</p>
</li>
</ul>
@@ -0,0 +1,10 @@
PhonesIndexView = Backbone.View.extend({
initialize: function () {
this.render();
},
render: function () {
this.$el.html(JST['phones/index']());
}
});
@@ -1 +1,6 @@
/* app css stylesheet */
body {
padding-top: 20px;
}
View
@@ -12,12 +12,13 @@
<script src="/javascripts/lib/backbone.js"></script>
<script src="/javascripts/jst.js"></script>
<script src="/javascripts/views/phones/index_view.js"></script>
<script src="/javascripts/router.js"></script>
<script src="/javascripts/init.js"></script>
</head>
<body>
<section id='main'>
Nothing here yet!
</section>
</body>
</html>

0 comments on commit 24ec7c3

Please sign in to comment.