Permalink
Browse files

better navigation handling

  • Loading branch information...
1 parent 988c01a commit 07706f58088f298f32d6e3285bc1f7f79ab8b23b @benbalter committed Mar 1, 2013
Showing with 7 additions and 11 deletions.
  1. +6 −10 _cs/application.coffee
  2. +1 −1 _includes/js/application.js
View
@@ -150,7 +150,6 @@ class Application.Views.Post extends Backbone.View
@loadDisqus()
loadDisqus: ->
- jQuery('#content').infinitescroll 'destory'
window.disqus_shortname = Application.disqus.name
window.disqus_identifier = @model.get 'id'
window.disqus_url = Application.url + '/' + @model.get 'id'
@@ -191,7 +190,6 @@ class Application.Views.Page extends Backbone.View
template: JST.page
render: =>
- jQuery('#content').infinitescroll 'destory'
@$el.html @template @model.toJSON()
if DISQUS?
DISQUS.reset()
@@ -208,8 +206,6 @@ class Application.Views.Single extends Backbone.View
@model.on 'change', @render
render: =>
- jQuery('#content').infinitescroll 'destory'
-
@$el.html @template @model.toJSON()
if @model.get('layout') is "post"
@@ -224,6 +220,8 @@ class Application.Views.Single extends Backbone.View
scrollTarget: ".title"
offset: -60
+ jQuery('#content').infinitescroll 'destory'
+
class Application.Views.Index extends Backbone.View
el: "#content"
@@ -241,10 +239,6 @@ class Application.Views.Index extends Backbone.View
tweets = new Application.Collections.Tweets
view = new Application.Views.TweetView collection: tweets
tweets.fetch()
- jQuery('#content').infinitescroll
- navSelector: "nav.pagination"
- nextSelector: "nav.pagination #next"
- itemSelector: "article.post"
class Application.Views.CommentView extends Backbone.View
el: "#recentcomments"
@@ -271,22 +265,24 @@ class Application.Views.Tag extends Backbone.View
template: JST.tag
render: ->
- jQuery('#content').infinitescroll 'destory'
@$el.html @template({ tag: @model.toJSON() })
$.smoothScroll
scrollTarget: ".title"
offset: -60
+ jQuery('#content').infinitescroll 'destory'
+ document.title = "Posts categorized '" + @model.get('id') + "'' » " + Application.name
class Application.Views.Category extends Backbone.View
el: "#content"
template: JST.category
render: ->
- jQuery('#content').infinitescroll 'destory'
@$el.html @template({ category: @model.toJSON() })
$.smoothScroll
scrollTarget: ".title"
offset: -60
+ jQuery('#content').infinitescroll 'destory'
+ document.title = "Posts tagged '" + @model.get('id') + "'' » " + Application.name
# Router
Oops, something went wrong.

0 comments on commit 07706f5

Please sign in to comment.