This file contains hidden or 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
| <?php | |
| /** | |
| * @file views-view-grid.tpl.php | |
| * Default simple view template to display a rows in a grid. | |
| * | |
| * - $rows contains a nested array of rows. Each row contains an array of | |
| * columns. | |
| * | |
| * @ingroup views_templates | |
| */ |
This file contains hidden or 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 State = require('ampersand-state'), | |
| moment = require('moment'); | |
| /* | |
| * Example of being able to use anything as type without warning. | |
| */ | |
| var TestState = State.extend({ | |
| props: { |
This file contains hidden or 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 Model = AmpersandModel.extend({ | |
| urlRoot: '/api/model', | |
| props: { | |
| url: { type: 'string' }, | |
| } | |
| }); | |
| var model = new Model(); |
This file contains hidden or 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'), | |
| domReady = require('domready'); | |
| var MyView = View.extend({ | |
| el: document.body, | |
| template: "<div><div data-hook='last-clicked'></div><a data-hook='test1'>Test 1</a><a data-hook='test2'>Test 2</a></div>", | |
| events: { | |
| 'click [data-hook=test1]': 'testOne', | |
| 'click [data-hook=test2]': 'testTwo', | |
| }, |
This file contains hidden or 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 Router = require('ampersand-router'); | |
| module.exports = Router.extend({ | |
| routes: { | |
| 'home': 'auto', | |
| 'about': 'auto', | |
| 'signup': 'auto', | |
| 'login': 'auto', | |
| 'blog': 'blogIndex', | |
| 'blog/new': 'blogAddArticle', |
This file contains hidden or 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'), | |
| Collection = require('ampersand-collection'); | |
| var ImageModel = Model.extend({ | |
| props: { | |
| id: { type: 'number' }, | |
| path: { type: 'string' } | |
| } | |
| }); |
This file contains hidden or 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'), | |
| Collection = require('ampersand-collection'); | |
| var SubSubSubModel = Model.extend({ | |
| props: { | |
| text: { type: 'string' } | |
| } | |
| }); | |
| var SubSubModel = Model.extend({ |
This file contains hidden or 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').extend(), | |
| Router = require('ampersand-router').extend(), | |
| View = require('ampersand-view').extend(), | |
| RestCollection = require('ampersand-rest-collection').extend(), | |
| reserved = []; | |
| getReservedNames(new Router()); | |
| getReservedNames(new Model()); | |
| getReservedNames(new View()); | |
| getReservedNames(new RestCollection()); |
This file contains hidden or 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 Collection = require('ampersand-collection'), | |
| Model = require('ampersand-state'), | |
| View = require('ampersand-view'); | |
| var Person = Model.extend({ | |
| props: { | |
| id: { type: 'number' }, | |
| name: { type: 'string' } | |
| } | |
| }); |
This file contains hidden or 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'), | |
| Collection = require('ampersand-collection'); | |
| var Picture = Model.extend({ | |
| urlRoot: '/picture', | |
| props: { | |
| path: { type: 'string' } | |
| }, | |
| derived: { | |
| hasPath: { |
OlderNewer