<commit_before>Task = require '../../models/task'
List = require '../../models/list'
ListItem = require './item'

class ListAll extends ListItem

  constructor: ->
    super

    @bind $ '.all.list'

    Task.on 'change', @updateCount

    @updateCount()


  click: =>
    List.trigger 'select:model',
      name: 'All Tasks'
      id: 'all'
      disabled: yes
      permanent: yes
      tasks: Task.active()

    @select()

  updateCount: =>
    @count.text Task.active().length

module.exports = ListAll<commit_msg>Update 'all tasks' count when a task is completed<commit_after>Task = require '../../models/task'
List = require '../../models/list'
ListItem = require './item'

class ListAll extends ListItem

  constructor: ->
    super

    @bind $ '.all.list'

    Task.on 'change change:completed:model', @updateCount

    @updateCount()


  click: =>
    List.trigger 'select:model',
      name: 'All Tasks'
      id: 'all'
      disabled: yes
      permanent: yes
      tasks: Task.active()

    @select()

  updateCount: =>
    @count.text Task.active().length

module.exports = ListAll
{'fraction_non_alphanumeric': 0.14794520547945206, 'fraction_numerical': 0.0, 'mean_word_length': 2.581699346405229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '804755', 'n_tokens_mistral': 343, 'n_tokens_neox': 333, 'n_words': 90}