Skip to content
Browse files

switched to using guide data instead of cat data)

  • Loading branch information...
1 parent 9b9e0d2 commit d1480ac2fdc6b1e96994d8308923f3b10817d92f @aldeka committed
Showing with 7 additions and 12 deletions.
  1. +2 −2 index2.html
  2. +5 −10 js/stuff.js
View
4 index2.html
@@ -27,9 +27,9 @@
</ul>
</script>
<script type="text/template" id="step-template">
- <%= rank %>
- <%= votes %>
+ <%= number %>
<%= name %>
+ <%= description %>
</script>
</body>
</html>
View
15 js/stuff.js
@@ -83,16 +83,11 @@ MyApp.addInitializer(function(options){
});
$(document).ready(function(){
- var cats = new Steps([
- new Step ({ name: 'Wet Cat', image_path: 'assets/images/cat2.jpg'}),
- new Step ({ name: 'Bitey', image_path: 'assets/images/cat1.jpg'}),
- new Step ({ name: 'Ceiling Cat', image_path: 'assets/images/cat3.jpg'})
- ]);
+ var cats = new Steps([]);
+
+ _.each(data.objects, function(stepData){
+ cats.add(new Step (stepData));
+ });
MyApp.start({ cats: cats });
- cats.add(new Step({
- name: 'Cranky Cat',
- image_path: 'assets/images/cat4.jpg',
- rank: cats.size() + 1
- }));
});

0 comments on commit d1480ac

Please sign in to comment.
Something went wrong with that request. Please try again.