Skip to content

Instantly share code, notes, and snippets.

(function(global) {
var get = Ember.get, set = Ember.set, doc = document;
global.FastSelectComponent = Ember.Component.extend({
items: null,
valuePath: 'value',
labelPath: 'label',
value: null,
selected: null,
App = require 'app'
require 'models/provider'
require 'stores/provider'
# Sample test case
describe 'Provider', ->
describe '#create()', ->
# essentially this is testing that our configuration is working
# so somewhat of a redundant test
it 'should return a new Provider record matching input', ->
App.Router.map ->
@route "a"
@route "b"
@route "ab"
@route "ba"
App.ARoute = Em.Route.extend
events:
animateToB: ->
@transitionTo('ab')
<script type="text/x-handlebars" data-template-name="blog-post">
{{view Blog.EditFormView contentBinding="content" classBinding="content.isEditing:editing-form"}}
{{view Blog.PostDisplayView contentBinding="content" classBinding="content.isEditing:editing-display"}}
{{#if showComments}}
<div id="disqus_thread"></div>
{{#view contentBinding="content" tagName="script" type="text/javascript"}}
var disqus_shortname = 'ideafreemonoid';
var disqus_identifier = '{{content.slug}}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
@ebryn
ebryn / output.html
Created June 25, 2011 18:12 — forked from gmoeck/output.html
table_example.handlebars
<table>
<tbody tabindex="-1" id="sc201" class="">
<tr tabindex="-1" id="sc210" class="" style="">
<td tabindex="-1" id="sc214" class="" style=""><span tabindex="-1" id="sc216" class="" style="">something</span></td>
<td tabindex="-1" id="sc220" class="" style=""><span tabindex="-1" id="sc221" class="" style="">new</span></td>
</tr>
<tr tabindex="-1" id="sc225" class="" style="">
<td tabindex="-1" id="sc228" class="" style=""><span tabindex="-1" id="sc229" class="" style="">something</span></td>
<td tabindex="-1" id="sc232" class="" style=""><span tabindex="-1" id="sc233" class="" style="">else</span></td>
</tr>
@ebryn
ebryn / mainpage.js
Created June 23, 2011 02:18 — forked from tritchey/mainpage.js
multicolumn template
ListviewTest.testController = SC.ArrayController.create({
content: [ { 'name': 'Item 1', 'description': 'This is item 1' },
{ 'name': 'Item 2', 'description': 'This is item 2' } ],
});
ListviewTest.mainPage = SC.Page.design({
// The main pane is made visible on screen as soon as your app is loaded.
// Add childViews to this pane for views to display immediately on page