-Session.setDefault "trigger_update", null
+trigger_update = new Deps.Dependency
 
 my_uploader = null # variable local to this script
 uploader_state_changed = new Deps.Dependency

      return

  get_n_selected: ->
    dt = Session.get "trigger_update"

    template = Template.instance()
    if !template.firstNode?
      # The DOM hasn't been rendered yet, can't count selected.

  for image_id in data.current_images
    $('.selectable#'+image_id).addClass('selected')

  trigger_update.changed() # force update

Template.LinkExistingImageDialog.helpers
  friendly_item_name: ->
