Created
          January 12, 2012 17:01 
        
      - 
      
- 
        Save sgharms/1601725 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Timesheet.Views.DateScrollView extends Backbone.View | |
| el: '.DateScrollPane' | |
| template: JST['tasks/date_scroll_view'] | |
| initialize: -> | |
| @collection.bind 'reset', @render | |
| ... | |
| @model.bind 'change:completed_on', @refreshSelection | |
| ... | |
| render: => | |
| completedOn = Date.parse @model.get('completed_on') | |
| $(@el).html @template(tasks: @lastWeekdays(completedOn)) | |
| $(@el).find('.date').filter(':last').addClass 'selected' | |
| isCurrentWeek = Date.today().compareTo(@range.end) is 0 | |
| if isCurrentWeek | |
| $('#next', @el).remove() | |
| @ | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment