Commit 5e973f16 authored by Ujvari Gergely's avatar Ujvari Gergely

Draft support for annotation editing and highlight-mode switching

 * Annotation currently being edited are added to the drafts
 * AppController.toggleHighlightingMode() checks for drafts before continuing
 * Fixes #628
parent 200956ef
......@@ -232,6 +232,9 @@ class App
$scope.highlightingMode = false
$scope.toggleHighlightingMode = ->
# Check for drafts
return unless drafts.discard()
# Check login state first
unless plugins.Auth? and plugins.Auth.haveValidToken()
# If we are not logged in, start the auth process
......@@ -642,6 +645,7 @@ class Annotation
$scope.editing = true
$scope.origText = $scope.model.$modelValue.text
$scope.origTags = $scope.model.$modelValue.tags
drafts.add $scope.model.$modelValue
$scope.delete = ->
annotation = $scope.thread.message
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment