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
// User ID | |
var _id; | |
// Facebook ready | |
window.fbAsyncInit = function() { | |
FB.init({ appId: 'XXX' }); | |
// Do we have a user? | |
FB.getLoginStatus(function(response) { | |
if('connected' === response.status) { |
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
// User ID | |
var _id; | |
// Facebook ready | |
window.fbAsyncInit = function() { | |
FB.init({ appId: 'XXX' }); | |
// Do we have a user? | |
FB.getLoginStatus(function(response) { | |
if('connected' === response.status) { |
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
// User ID | |
var _id; | |
// Dependency handlers | |
var dep = []; | |
var depDone = (function() { | |
var i = 0;//# dependencies | |
return function() { | |
i += 1; | |
if(dep.length === i) {//all dependencies are done |
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
// User ID | |
var _id; | |
// Handler to be executed when all dependencies are done | |
document.addEventListener('appready', function() { | |
kinvey.user.fetch(_id, function(user) { | |
// User found, go ahead and render page | |
}); | |
}, false); |
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
public class UploadVideoActivity extends Activity { | |
private KCSClient sharedClient; | |
/** Called when the activity is first created. */ | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
// Get the shared instance of the Kinvey Service client | |
sharedClient = ((KinveyVidUploadApp) getApplication()).getKinveyService(); |
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
// We use a separate function rather than defining this | |
// twice: once for the Model, and once for the Collection | |
kinveyAuthenticatedSync = (method, model, options) -> | |
// Before we send the request ... | |
options.beforeSend = (jqXHR) -> | |
// Add the Basic Authentication header | |
jqXHR.setRequestHeader( | |
'Authorization', |
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
filterOnEnter: (e) -> | |
if e.keyCode is 13 | |
Todos.filterString = @$("#filter-string").val() | |
Todos.fetch() |
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
addAll: => | |
// make sure to clear the list first! | |
@$("#todo-list").empty() | |
Todos.each(@addOne) |
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
idAttribute: '_id' |
OlderNewer