app/assets/javascripts/swim.js.coffee in speedo-0.0.7 vs app/assets/javascripts/swim.js.coffee in speedo-0.0.8
- old
+ new
@@ -3,30 +3,23 @@
# For Web-app mode, uncomment this (and the CSS in style.scss) to make the cols fill the browser
# $('.col1, .col2, .col3').css('height',$(window).height() - $('.main_nav').outerHeight() - $('.branding').outerHeight() - 60 + 'px')
# $(window).resize ->
# $('.col1, .col2, .col3').css('height',$(window).height() - $('.main_nav').outerHeight() - $('.branding').outerHeight() - 60 + 'px')
- setTimeAgoInWords = () ->
- $('.ago').each ->
- t = $(this)
- if(t.attr('datetime'))
- date = new Date(t.attr('datetime'))
- t.attr('title', date.toString())
- t.text(date.timeAgoInWords() + ' ago')
- setTimeAgoInWords()
- setInterval(setTimeAgoInWords, 10000)
-
$('.popup').livequery ->
$(this).fancybox
overlayColor: "#fff"
transitionIn:"none"
transitionOut:"none"
titlePosition:"outside"
showCloseButton:false
titleFormat: (title, currentArray, currentIndex, currentOpts) ->
return if title == ''
return '<h3 class="popup-title">' + title + '</h3>'
+
+ $('time.ago').livequery ->
+ $(this).timeago()
$('#fancybox-content .close').live 'click', (e) -> #close_lightbox_from_link(e)
e.preventDefault()
$.fancybox.close()