function importFile() {
    var modalInstance = $modal.open({
      template:    require('raw!./dropbox-modal.directive.html'),
      controller:  'DropboxModal as modal',
      windowClass: 'modal--dillinger',
      resolve: {
        items: function() {
          return dropboxService.fetchFiles();
        }
      }
    });

    return modalInstance.result.then(function() {

      documentsService.setCurrentDocumentTitle(dropboxService.fetched.fileName);
      documentsService.setCurrentDocumentBody(dropboxService.fetched.file);

      // tell other services
      $rootScope.$emit('document.refresh');
      $rootScope.$emit('autosave');

      return false;
    }, function() {
      modalInstance.dismiss('cancel');
    });
  }
Opens the Bootstrap Modal and returns a Promise which will then
   update the current document.