   )
   $modal.find('.document-modal-next').on('click', -> initDocumentModal(nextFileCard($fileCard)))
   $modal.find('.document-modal-prev').on('click', -> initDocumentModal(prevFileCard($fileCard)))
-  createPreview($modal.find('.document-modal-content'), filename, url)
+  createPreview($modal.find('.document-modal-content'), title, filename, url)
   findOrCreateDocumentModal().replaceWith($modal)
   $('body').addClass('no-scroll')
 

    <div class="document-modal-header">
      <div class="document-modal-title left white-text">
        <%= MTL.fileIcon(filename, { class: 'left' }) %>
        <%- filename %>
      </div>
      <div class="document-modal-toolbar right">
        <a href="<%- url %>" target="_blank">


initDocumentModal = ($fileCard) ->
  filename = $fileCard.data('mtl-document-name')
  title = $fileCard.prop('title')
  url = $fileCard.prop('href')
  $modal = $(
    MTL.renderTemplate(
      'document_modal',
      filename: filename,
      title: title,
      url: url,
      hasNext: hasNextFileCard($fileCard),
      hasPrev: hasPrevFileCard($fileCard)
