This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AmpersandModel = require('ampersand-model'); | |
var get = require('lodash/get'); | |
var includes = require('lodash/includes'); | |
AmpersandModel.extend({ | |
session: { | |
fetched: 'boolean', | |
saved: 'boolean', | |
destroyed: 'boolean' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = require('ampersand-app'); | |
var baseView = require('../_core/base'); | |
var CollectionView = require('ampersand-collection-view') | |
var collectionView = require('../gameobject/recipe-view'); | |
var GameObjectMenu = require('../gameobjects/gameobjectmenu-view'); | |
var templates = require('../../templates'); | |
module.exports = baseView.extend({ | |
pageTitle: 'Recipes', | |
template: templates.pages.gameobjects.recipes, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var View = require('ampersand-view'); // you can use ampersand-model/ampersand-state here too | |
var _ = require('lodash'); | |
module.exports = View.extend({ | |
fetchChildren: function(options) { | |
_.chain(this._children) | |
.keys() | |
.each(function(key) { | |
if(_.isFunction(this[key].url) && _.isFunction(this[key].fetch) { | |
this[key].fetch(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Model = require('ampersand-model'); | |
var _ = require('lodash'); | |
module.exports = Model.extend({ | |
constructor: function(){ | |
Model.apply(this, arguments); | |
_.bindAll(this, 'onSync'); | |
this.on('sync', this.onSync); | |
}, | |
isNew: function(){ |