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
/** | |
This component suggests items in a drop-down list as the user types. | |
If an item is selected, the input box is populated, potentially with multiple entries. | |
Very similar to the Facebook geo targeting UI. Also listens for up and down keystrokes | |
to navigate the list. | |
new cotweet.components.AutoSuggest($element, options) | |
options = { | |
data: array of { } // Pre-loaded data |
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
//v13 © 2010 Tynt | |
var Tynt = Tynt || []; | |
if (typeof Tynt.TIL == "undefined") { | |
(function () { | |
var Ka = function () { | |
var i = document, | |
m = i.body, | |
p = i.documentElement, | |
aa = eval("/*@cc_on!@*/false"), | |
ba = function (a, b) { |
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 doesSomething(array){ | |
var result = []; | |
for (var i = 0, l = array.length; i < l; i++){ | |
var type = Object.prototype.toString.call(array[i]).split(' ').pop().split(']').shift().toLowerCase(); | |
if (type) { flat = flat.concat(/^(array|collection|arguments|object)$/.test(type) ? doesSomething(array[i]) : array[i]); } | |
} | |
return result; | |
} |
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
# SOME DESCRIPTIVE TITLE. | |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
# This file is distributed under the same license as the PACKAGE package. | |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
# | |
#: public/javascripts/cotweet/core/0_TimelineItem.js:18 | |
#, fuzzy | |
msgid "" | |
msgstr "" | |
"Project-Id-Version: PACKAGE VERSION\n" |
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
$('.pagination a').livequery(function() { | |
$(this).attr('data-remote', 'true') | |
}); |
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
$.ajax({ | |
url: 'ajax/test.html', | |
success: function(data) { | |
$('.result').html(data); | |
alert('Load was performed.'); | |
}, | |
failure: function(data){ | |
} | |
}); |
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
<% if flash[:error].present? %> | |
<h3><%= flash[:error] %></h3> | |
<% else %> | |
<div id="fb-root"></div> | |
<div id="error-message"></div> | |
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript"> | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : "<%= Facebook::CONFIG['app_id'] %>", |
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
@facebook_me_response = {"id" => "222222"} | |
@facebook_page_response = {"id" => Factory.next(:medium_id).to_s, "name" => Factory.next(:medium_username), "fan_count" => 22.to_s} | |
@facebook_accounts_response = [{"id" => @facebook_page_response['id'], "access_token" => "tokenz"}] | |
Koala::Facebook::OAuth.any_instance.stubs('get_access_token_info').returns({'access_token' => 'token'}) | |
Koala::Facebook::GraphAPI.any_instance.stubs('get_object').with('me').returns(@facebook_me_response) | |
Koala::Facebook::GraphAPI.any_instance.stubs('get_object').with(@facebook_page_response['id']).returns(@facebook_page_response) | |
Koala::Facebook::GraphAPI.any_instance.stubs('get_connections').with('me', 'accounts').returns(@facebook_accounts_response) |