Permalink
Browse files

Merge branch 'develop' of github.com:nko2/sf2-boys into develop

  • Loading branch information...
2 parents a08494e + 1490d32 commit a0578b3af3417ebf9a49bf703e88f5ccc926f44e @steves steves committed Aug 28, 2011
Showing with 10 additions and 27 deletions.
  1. +6 −14 public/javascripts/twalks.js
  2. +0 −7 public/stylesheets/style.css
  3. +4 −1 scripts/poller.js
  4. +0 −5 views/frontend.ejs
@@ -7,7 +7,7 @@
// Enable close button on alert messages
$('.alert-message a.close').live('click', function(ev) {
- $(this).parent().remove();
+ $(this).parent().slideUp('fast', function(){ $(this).remove(); });
ev.preventDefault();
});
@@ -334,14 +334,10 @@
this.$navigation = $('#navigation');
this.$secondaryNav = $('.secondary-nav', this.$navigation);
this.eventsListView = new App.Views.EventsList({ collection: eventsCollection });
- this.$errorNotif = $('#error-notification');
this.$searchInput = $('#search-form input');
var self = this
, timeout;
- $('#error-notification .close').click(function() {
- self.$errorNotif.slideUp(200);
- });
this.$searchInput.keyup(function() {
clearTimeout(timeout);
@@ -417,7 +413,7 @@
self.displayContainer(self.eventsListView.render().el);
});
}
- }, error: function(){ this.displayErrorNotification('Events list', 'fetching failed'); } });
+ }, error: function(){ alertMessage('warning', 'We encountered an error fetching your events.'); });
}
, listMy: function() {
this.showProgressBar();
@@ -433,7 +429,7 @@
self.hideAndEmptyContainer(function() {
self.displayContainer(listView.render().el);
});
- }, error: function(){ this.displayErrorNotification('My events', 'fetching failed'); } });
+ }, error: function(){ alertMessage('warning', 'We encountered an error fetching your events.'); });
}
, listCurrent: function() {
this.showProgressBar();
@@ -449,7 +445,7 @@
self.hideAndEmptyContainer(function() {
self.displayContainer(listView.render().el);
});
- }, error: function(){ this.displayErrorNotification('Current events', 'fetching failed'); } });
+ }, error: function(){ alertMessage('warning', 'We encountered an error fetching ongoing events.'); });
}
, listUpcoming: function() {
this.showProgressBar();
@@ -465,7 +461,7 @@
self.hideAndEmptyContainer(function() {
self.displayContainer(listView.render().el);
});
- }, error: function(){ this.displayErrorNotification('Upcoming events', 'fetching failed'); } });
+ }, error: function(){ alertMessage('warning', 'We encountered an error fetching upcoming events.'); });
}
, showEvent: function(id) {
this.showProgressBar();
@@ -486,11 +482,7 @@
self.hideAndEmptyContainer(function(){
self.displayContainer(view.render().el);
});
- }, error: function(){ this.displayErrorNotification('Event', 'fetching failed'); } });
- }
- , displayErrorNotification: function(title, description) {
- this.$errorNotif.find('p').empty().append('<strong>'+title+'</strong> '+description);
- this.$errorNotif.slideDown(300);
+ }, error: function(){ alertMessage('warning', 'We encountered an error fetching this event.'); });
}
, showProgressBar: function() {
$('li.user', this.$secondaryNav).stop().hide();
@@ -23,13 +23,6 @@ body {
text-align:center;
margin-top:250px;
}
-#error-notification {
- margin-top:-3px;
- position:fixed;
- width:910px;
- z-index:5;
- display:none;
-}
#intro .logo h1 {
font-family:Leckerli One;
font-size:128px;
View
@@ -55,8 +55,8 @@ function processEvent(job, collection, event, eventsCollection) {
var poll = poller.createPoller(twit, event.hash);
poll.on('data', function(res) {
- console.log(res);
if (typeof res.results !== "undefined") {
+ console.log(res);
res.results.forEach(function(json) {
var tweet = {
tweetId : json.id_str
@@ -79,6 +79,7 @@ function processEvent(job, collection, event, eventsCollection) {
// don't process existing tweet
if (event.tweets.map(mapper('tweetId')).indexOf(tweet.tweetId) !== -1) {
+ console.log('tweet exists');
return;
}
@@ -88,6 +89,8 @@ function processEvent(job, collection, event, eventsCollection) {
event.tweets.push(tweet);
+ eventsCollection.save(event);
+
var relevantTalks = [];
event.talks.forEach(function(talk) {
View
@@ -51,11 +51,6 @@
<div class="container">
<%- partial('navigation') %>
- <div id="error-notification" class="alert-message error">
- <a class="close" href="javascript:void(0)">×</a>
- <p><strong>Oh snap!</strong> Change this and that and try again.</p>
- </div>
-
<div id="bb-content"></div>
</div>

0 comments on commit a0578b3

Please sign in to comment.