   s2Defaults = width: 300
   s2Multi = _.extend {}, s2Defaults, minimumInputLength: 2
 
-
   # Lookup because select2 only allows string values
   # but we need to keep the name and the id for each user
   users = {}
+
+  # Store authors in a Backbone Collection since Select2 does not
+  # allow storing more than an id on a tag, but we need to send
+  # the full author object on save
+  authorsCollection = new Backbone.Collection()
 
   return class MetadataView extends FooterTabView
     template: template

define (require) ->
  settings = require('settings')
  subjects = require('cs!collections/subjects')
  FooterTabView = require('cs!modules/media/footer/inherits/tab/tab')

                q: term # search term

              results: (data, page) -> # parse the results into the format expected by Select2.
                authorsCollection.add(data.users)
                return {
                  results: _.map data.users, (item) ->
                    user = {id: item.id, text: item.fullname or item.id}
                    users["#{user.id}"] = user
                    return user
                }

        setValue: (property, value, options) ->
          authors = []

          _.each value, (author) ->
            authors.push(authorsCollection.get(author).toJSON())

          return authors

    initialize: () ->
      super()
