The ActionSender view sends actions to a view's controller when events are triggered. Action names can be specified in templates using an <eventName>Action convention.
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
| // ---- | |
| // Sass (v3.3.6) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| .block { | |
| background-color: black; | |
| &--light { | |
| background-color: white; |
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
| // ---- | |
| // Sass (v3.3.6) | |
| // Compass (v1.0.0.alpha.18) | |
| // ---- | |
| .block { | |
| background-color: black; | |
| &--light { | |
| background-color: white; |
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
| EmberRunPromise = function(resolver, name) { | |
| return new Ember.RSVP.Promise(function(resolve, reject) { | |
| resolver(wrapInRun(resolve), wrapInRun(reject)); | |
| }, name); | |
| } | |
| function wrapInRun(fn) { | |
| return function() { | |
| var context = this; | |
| var args = [].prototype.slice.apply(arguments); |
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
| jQuery.fn.isInView = function(){ | |
| // setup different vars for easier access to these values | |
| var middle = Math.round(this.height() / 2), | |
| winHeight = $(window).height(), | |
| posTop = this.position().top, | |
| scrollTop = $(window).scrollTop(), | |
| middlePos = middle + posTop; | |
| if ( middlePos < scrollTop ) { |
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
| HauteLook.MultiViewHoverMonitor = Ember.Object.extend({ | |
| toleranceInMilliseconds : 500, | |
| init : function(){ | |
| this._super(); | |
| this.set( 'isHovering', false ); | |
| this.onViewsChanged(); | |
| }, |
I would like to create a Oocss.Module view which encapsulates boilerplate markup which is part of stubornella's Object Oriented CSS (https://github.com/stubbornella/oocss/wiki). The boilerplate markup looks like this:
<div class="mod">
<b class="top"><b class="tl"></b><b class="tr"></b></b>
<div class="inner">
<div class="hd">...</div>
<div class="bd">...</div>
<div class="ft">...</div>
</div>This mixin, when applied to an Ember.ContainerView (and, by extension, a CollectionView) creates three new methods on the extended view. These methods are called whenever a contained view raises a willInsertElement, didInsertElement or willDestroyElement event.
HauteLook.ChildViewObserver = Ember.Mixin.create({
childViewsWillChange: function(childViews, start, removeCount, addCount) {
this._super.apply(this, arguments);
for(var i=0; i < removeCount; i++) {
var cv = childViews.objectAt(start + i);
cv.off('willInsertElement', this, this.willInsertChildElement);
cv.off('didInsertElement', this, this.didInsertChildElement);
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
| (function( $ ) { | |
| 'use strict'; | |
| if ( !$.fn.on && $.fn.live && $.fn.bind ) { | |
| $.fn.on = function() { | |
| var args = createObjectFromArgs( arguments ); | |
| if ( args.selector ) { |