   ).property('model.body')
 
   statusMessage: ( ->
-    @get('processingMessage') || @get('userEditingMessage') || @get('saveState')
-  ).property('processingMessage', 'userEditingMessage', 'saveState')
+    @get('processingMessage') || @get('userEditingMessage') || @get('saveStateMessage')
+  ).property('processingMessage', 'userEditingMessage', 'saveStateMessage')
 
   processingMessage: (->
     if @get('status') is "processing"

#= require controllers/base_paper_controller
ETahi.PaperEditController = ETahi.BasePaperController.extend
  visualEditor: null

  setupVisualEditor: (->
    @set('visualEditor', ETahi.VisualEditorService.create())


  defaultBody: 'Type your manuscript here'

  saveStateDidChange: (->
    if @get('saveState')
      @setProperties
        saveStateMessage: "Saved"
        savedAt: new Date()
    else
      @setProperties
        saveStateMessage: null
        savedAt: null
  ).observes('saveState')

  actions:
    toggleEditing: ->
      if @get('lockedBy') #unlocking
        @set('body', @get('visualEditor.bodyHtml'))
        @set('lockedBy', null)
        @send('stopEditing')
        @get('model').save().then (paper) =>
          @set('saveState', true)
      else #locking
        @set('lockedBy', @getCurrentUser())
        @get('model').save().then (paper) =>
          @send('startEditing')
          @set('saveState', false)

    savePaper: ->
      return unless @get('model.editable')
      @get('model').save().then (paper) =>
        @set('saveState', true)

    updateDocumentBody: (content) ->
      @set('body', content)
