1. 03 Dec, 2015 5 commits
    • Sean Hammond's avatar
      Move "Save on Ctrl+Enter" into AnnotationController · 07af0116
      Sean Hammond authored
      Move the DOM event listener function that saves an annotation on
      Ctrl+Enter into AnnotationController. This is just for the sake of
      keeping all the code in one place (in AnnotationController, not in the
      directive's link function) and putting code where it can be tested more
      easily.
      
      Note that the controller's save() function was previously called with
      scope.$evalAsync() and we're now just calling it synchronously. This
      seems to be fine.
      07af0116
    • Sean Hammond's avatar
      Remove vm.preview · 34d21546
      Sean Hammond authored
      Remove AnnotationController's vm.preview as it doesn't appear to be
      used.
      34d21546
    • Sean Hammond's avatar
      Replace editing with editing() · 2b2e02db
      Sean Hammond authored
      Replace AnnotationController's vm.editing boolean with a vm.editing()
      method.
      
      This removes some duplicated state, as both vm.editing and vm.action
      were recording whether or not the annotation was being edited.
      2b2e02db
    • Sean Hammond's avatar
      Move share() into AnnotationController · 967b3929
      Sean Hammond authored
      Move scope.share() from the annotation directive to vm.share() in
      the AnnotationController. Just trying to move as much as possible out of
      the directive's scope and link function into the controller, if we're
      gonna use a directive controller here try to just use it instead of
      randomly using the link function and scope for some things and the
      controller for others.
      967b3929
    • Sean Hammond's avatar
      Just pass isSidebar into AnnotationController normally · 5de7bf86
      Sean Hammond authored
      It does not change after directive linking, there's no reason to
      $observe() it.
      5de7bf86
  2. 02 Dec, 2015 26 commits
  3. 01 Dec, 2015 2 commits
  4. 30 Nov, 2015 7 commits