Skip to content

Commit

Permalink
tabs? how did they get in
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Apr 30, 2011
1 parent 85c0465 commit bb7da4c
Showing 1 changed file with 34 additions and 19 deletions.
53 changes: 34 additions & 19 deletions static/js/boot.js
Expand Up @@ -85,6 +85,11 @@
* A small user collection
*/
var PotentialFriends = Backbone.Collection.extend({
/**
* The Backbone.Model that this collection is using, instead of creating
* a variable for it, I just add it directly in the extend function because
* all models will be generated by the `collection.add` method.
*/
model: Backbone.Model.extend({
url: function(){
return '/user/' + this.get('nickname');
Expand Down Expand Up @@ -118,7 +123,16 @@
$('#user_' + friend.attributes.slug).remove();
})
}
, url: '/users/'
/**
* The `url` property is required, no clue why, because we are not using it anyways
* @type {String}
*/
, url: '/users/'

/**
*
*
*/
, join: function(details){
// create a id attribute if it doesn't exist so we can
// find them this user back
Expand All @@ -129,6 +143,7 @@

return friend;
}

});

/**
Expand Down Expand Up @@ -353,14 +368,14 @@
*/
announce: function(data){
var announcement = $(render('announcement', data))
.prependTo('div.boxed-btm form')
.css({right:1000}) // hide it
.animate({right:0}, {
duration: 300
, complete: function(){
announcement.addClass('announced')
}
});
.prependTo('div.boxed-btm form')
.css({right:1000}) // hide it
.animate({right:0}, {
duration: 300
, complete: function(){
announcement.addClass('announced')
}
});

// remove the annoucement again after x amount of milliseconds
setTimeout(function(){announcement.remove()}, data.timeout || 5000);
Expand Down Expand Up @@ -436,11 +451,11 @@

// Add the canvas timer:
$('#thefinalcountdown').pietimer({
seconds: data.timeleft / 1000,
colour: 'rgba(184, 217, 108, 1)',
height: 55,
width: 55
});
seconds: data.timeleft / 1000,
colour: 'rgba(184, 217, 108, 1)',
height: 55,
width: 55
});

// Initialize status so we start polling for idle activity
Status.initialize();
Expand Down Expand Up @@ -633,11 +648,11 @@

// update the timer
$('#thefinalcountdown').pietimer({
seconds: data.timeleft / 1000,
colour: 'rgba(184, 217, 108, 1)',
height: 55,
width: 55
});
seconds: data.timeleft / 1000,
colour: 'rgba(184, 217, 108, 1)',
height: 55,
width: 55
});
}

// display the actual message from the server
Expand Down

0 comments on commit bb7da4c

Please sign in to comment.