Skip to content

Commit

Permalink
well, this was just a massive, unproductive mess of confusion and des…
Browse files Browse the repository at this point in the history
…pair
  • Loading branch information
danielna committed Jun 5, 2013
1 parent 54cb567 commit 9435604
Show file tree
Hide file tree
Showing 14 changed files with 735 additions and 69 deletions.
29 changes: 29 additions & 0 deletions assets/js/collections/foodmap.MapItemList.js
@@ -0,0 +1,29 @@

var foodmap = foodmap || {};

var MapItemList = Backbone.Collections.extend({

model: foodmap.MapItem,

url: "/assets/resources/eateries2.json",

// demo funcs
list_cost_low: function() {
return this.filter(function(mapItem){
return mapItem.get("price") === "low";
});
},
list_cost_med: function() {
return this.filter(function(mapItem){
return mapItem.get("price") === "med";
});
},
list_cost_high: function() {
return this.filter(function(mapItem){
return mapItem.get("price") === "high";
});
}

});

foodmap.list = new MapItemList();
1 change: 1 addition & 0 deletions assets/js/lib/backbone.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions assets/js/lib/jquery-1.10.1.min.js

Large diffs are not rendered by default.

File renamed without changes.
19 changes: 19 additions & 0 deletions assets/js/models/foodmap.MapItem.js
@@ -0,0 +1,19 @@

var foodmap = foodmap || {};

foodmap.MapItem = Backbone.Model.extend({

initialize: function(){
console.log('INIT foodmap.MapItem');
},

defaults: {
"name": "Default MapItem",
"description": "",
"price": "",
"ethnicity": "",
"tags": "",
"coordinates": ""
}

});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions assets/js_orig/vendor/underscore.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9435604

Please sign in to comment.