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 Controller = { | |
init: function(){ | |
}, | |
didClickButton: function(event){ | |
var data = "something"; | |
$.event.trigger("data:added", [data]); | |
} | |
} | |
var 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
searchView: SC.TextFieldView.design({ | |
layout: { centerX: 470, width: 205, height: 22, top: 40 }, | |
hint: "Search", | |
leftAccessoryView: SC.ImageView.design({ | |
layout: { left: 5, top: 3, width: 15, height: 15 }, | |
//canLoadInBackground: YES, | |
valueIsUrl: YES, | |
value: sc_static('images/search-icon.png') | |
}) | |
}) |
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.prototype.curry = function() { | |
var fn = this, args = Array.prototype.slice.call(arguments); | |
return function() { | |
return fn.apply(this, args.concat( | |
Array.prototype.slice.call(arguments))); | |
}; | |
}; | |
var YES = true, | |
NO = false; |
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.prototype.curry = function() { | |
var fn = this, args = Array.prototype.slice.call(arguments); | |
return function() { | |
return fn.apply(this, args.concat( | |
Array.prototype.slice.call(arguments))); | |
}; | |
}; | |
var YES = true, | |
NO = false; |
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
<script type="text/javascript">String.preferredLanguage = "en";</script> | |
<script type="text/javascript" src="/static/sproutcore/debug/en/current/javascript.js?1282865868"></script> | |
<script type="text/javascript" src="/static/sproutcore/testing/en/current/javascript.js?1282865868"></script> | |
<script type="text/javascript" src="/static/sproutcore/runtime/en/current/javascript.js?1282865868"></script> | |
<script type="text/javascript" src="/static/sproutcore/datastore/en/current/javascript.js?1282865868"></script> | |
<script type="text/javascript" src="/static/sproutcore/en/current/javascript.js?1282865868"></script> | |
<script type="text/javascript" src="/static/sproutcore/empty_theme/en/current/javascript.js?1282864130"></script> | |
<script type="text/javascript" src="/static/sproutcore/ace/en/current/javascript.js?1282864130"></script> | |
<script type="text/javascript" src="/static/sproutcore/jquery/en/current/javascript.js?1282865868"></script> | |
<script type="text/javascript" src="/static/sproutcore/foundat |
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
class MyBinaryTempFile < Tempfile | |
def initialize(name, *args) | |
# ... | |
super(name, :encoding => 'ascii-8bit') | |
# ... | |
end | |
end |
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
module("SC.TreeController - binding_bug", {}); | |
test("observing a bound property in a treecontroller and using it to set its own 'content' property shouldn't cause an infinite loop", function(){ | |
NameSpace = {}; | |
NameSpace.a = SC.ArrayController.create({}); | |
NameSpace.b = SC.TreeController.create({ | |
counter: 0, | |
bar: null, | |
barBinding: 'NameSpace.a.content', |
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
{ | |
"models": [ | |
{ | |
"id": 1, | |
"title": "My Awesome Document", | |
"tags": ["note", "school"] | |
}, | |
{ | |
"id": 2, | |
"title": "My Other Document", |
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
{ | |
"models": [ | |
{ | |
"id": 1, | |
"title": "My Awesome Document", | |
"tags": ["note", "school"] | |
}, | |
{ | |
"id": 2, | |
"title": "My Other Document", |
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
Backbone.sync.parsers({ | |
MyDocumentsModel: { | |
url: "/documents", | |
parse: function(response){ | |
return response.documents; | |
} | |
}, | |
... | |
}); |