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; |
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
Ember.ArrayUtils.indexOf = function (obj) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
return obj.indexOf ? obj.indexOf.apply(obj, args) : arrayIndexOf.apply(obj, args); | |
} | |
Ember.ArrayUtils.indexOf = function (obj, value, start) { | |
return obj.indexOf ? obj.indexOf.call(obj, value, start) : arrayIndexOf.call(obj, value, start); | |
} |
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
//current standalone | |
Ember.get = function(obj, key) { | |
//... use obj | |
} | |
// standalone case | |
get = Ember.get; | |
get(obj, 'foo'); |
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 () { | |
function createDisplayNames(obj, path) { | |
var val, key; | |
if (typeof obj === 'string') { | |
path = obj; | |
obj = Ember.getPath(path); | |
} | |
for (key in obj) { | |
// skip contructor | |
if (key === 'contructor') continue; |
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
{ | |
"application_id":"YOUR_APP_ID", | |
"src":"http://www.yapp.us/splash/0f3fca7a-1ab0-490a-b456-53ccadf2be0f", | |
"src_type":"screen_shot_url", | |
"src_data": { "viewport" : "640x920"}, | |
"functions":[ | |
{ | |
"name":"no_op", | |
"save":{ | |
"image_identifier":"external_sample_1", |
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
InsightArticleView: Em.ContainerView.extend | |
tagName: 'article' | |
childViews: ['toolbar'] | |
toolbar: Core.EditorToolbarView |
OlderNewer