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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions: { | |
sayHello: function () { | |
console.log('hello'); | |
} | |
} | |
}); |
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
function Module(dir) { | |
this.dir = dir; | |
this.exports = {}; | |
} | |
function loadModule(dirname, filename) { | |
var i = Realm.create(); | |
Realm.eval(i, '__dirname = '+ JSON.stringify(dirname)); | |
Realm.eval(i, '__filename = '+ JSON.stringify(filename)); | |
Realm.eval(i, 'module = new Realm.shared.Module(__dirname)'); |
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
require('TransformJS'); | |
require('jquery-easing'); | |
Y$.DialogTransitions = SC.Mixin.create({ | |
easing: 'easeInOutQuint', | |
prepareForDialogAnimateIn: function() { | |
return this.$().animate({ | |
translateY: "+=" + Y$.viewport.height | |
}, 0); | |
}, | |
dialogAnimateIn: function() { |
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
App.ajax = (url, settings)-> | |
deferred = $.Deferred() | |
settings.xhr = -> | |
xhr = $.ajaxSettings.xhr() | |
if 'onprogress' of xhr | |
context = this | |
xhr.onprogress = (e)-> | |
Ember.run(deferred, deferred.notifyWith, context, [e.loaded/e.total]) | |
xhr | |
jqXHR = $.ajax(url, settings) |
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
testBoth("bindings should do the right thing when binding is in prototype", function(get, set) { | |
var obj, proto, a, b, selectionChanged; | |
Ember.run(function() { | |
obj = { | |
selection: null | |
}; | |
selectionChanged = 0; | |
Ember.addObserver(obj, 'selection', function () { |
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
Flame.DisclosureView = Flame.LabelView.extend({ | |
classNames: ['flame-disclosure-view'], | |
buttonExpanded: Flame.image('disclosure_triangle_down.png'), | |
buttonCollapsed: Flame.image('disclosure_triangle_left.png'), | |
button: function () { | |
this.get('visibilityTarget') ? this.get('buttonExpanded') : this.get('buttonCollapsed'); | |
}.property('visibilityTarget', 'buttonExpanded', 'buttonCollapsed'), | |
handlebars: '<img {{bindAttr src="button"}}> {{value}}', | |
action: function() { | |
var value = this.getPath('visibilityTarget'); |
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
#import "YappPhoneGapLocalURLProtocol.h" | |
#ifdef PHONEGAP_FRAMEWORK | |
#import <PhoneGap/PhoneGapDelegate.h> | |
#else | |
#import "PhoneGapDelegate.h" | |
#endif | |
@interface YappPhoneGapLocalURLProtocol () <NSURLConnectionDelegate, NSURLConnectionDataDelegate> | |
@property (nonatomic, retain) NSURLConnection *connection; |