Permalink
Browse files

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

  • Loading branch information...
2 parents 1330958 + d3faaa0 commit ad2f6735b906a23ca32c40721596b289660bad03 @avalanche123 avalanche123 committed Aug 28, 2011
Showing with 25 additions and 13 deletions.
  1. +11 −7 public/javascripts/twalks.js
  2. +4 −0 public/stylesheets/style.css
  3. +2 −5 server.js
  4. +8 −0 views/backbone/_events.ejs
  5. +0 −1 views/frontend.ejs
@@ -211,15 +211,19 @@
this.collection.bind('reset', this.render);
}
, render: function() {
- var $list;
+ if (this.collection.length > 0) {
+ var $list;
- $(this.el).html(this.template({}));
- $list = this.$('.list');
+ $(this.el).html(this.template({}));
+ $list = this.$('.list');
- this.collection.each(function(event) {
- var view = new App.Views.EventsListEvent({ model: event });
- $list.append(view.render().el);
- });
+ this.collection.each(function(event) {
+ var view = new App.Views.EventsListEvent({ model: event });
+ $list.append(view.render().el);
+ });
+ } else {
+ $(this.el).html($('#events-list-empty-template').html());
+ }
return this;
}
@@ -541,6 +541,10 @@ body {
-moz-border-radius:10px;
}
+div.input {
+ position: relative;
+}
+
#flash {
margin-top:20px;
}
View
@@ -132,10 +132,7 @@ app.configure('production', function(){
// Routes
app.get('/', function(req, res){
- res.render('frontend', {
- flash: req.flash()
- , layout: false
- });
+ res.render('frontend', { layout: false });
});
function andRequireUser(req, res, next) {
@@ -357,7 +354,7 @@ app.get('/events/:id/tweets.json', function(req, res) {
if (aTime === bTime) {
return 0;
}
- return aTime > bTime ? 1 : -1
+ return aTime < bTime ? 1 : -1
}), 200);
});
});
@@ -46,6 +46,14 @@
</div>
</script>
+<script type="text/template" id="events-list-empty-template">
+ <div id="events-list" class="row">
+ <section class="span16 columns list">
+ No Events Found
+ </section>
+ </div>
+</script>
+
<script type="text/template" id="events-list-event-template">
<header class="map">
<span class="time">
View
@@ -50,7 +50,6 @@
<body>
<div class="container">
<%- partial('navigation') %>
- <%- partial('flash') %>
<div id="error-notification" class="alert-message error">
<a class="close" href="javascript:void(0)">×</a>

0 comments on commit ad2f673

Please sign in to comment.