WIP Overhaul view and sort behavior

Big changes to view, sort, routing, filtering, etc, etc, etc...

Todo
-------
- [ ] stream search -- race between $scope.updater and stream controller, need to send the filter
- [ ] forced login -- a comment about ideas for that [here](https://github.com/hypothesis/h/issues/1020#issuecomment-53400218)
- [x] page search -- simple matter of fixing the ugly ng-show conditions at the bottom of the viewer template perhaps with more verbose, obvious variables, or scope/controller functions to abstract the route details from the template a bit
- [ ] Check on https://github.com/hypothesis/h/pull/1436#discussion_r16705832
- [ ] Restore "no results for “query”" message.

Its deleted in initStore, so it's set on the first chunk of loaded
annotations after any reset. It doesn't need to be set after that because
the annotationCreated hook and the threading plugin will attach further
ones where they belong.
On Aug 26, 2014 10:07 AM, "Aron Carroll" <notifications@github.com> wrote:

> In h/static/scripts/controllers.coffee:
>
> > +        $scope.threadRoot.addChild annotation.thread
> > +
> > +      if annotation is $scope.ongoingEdit
> > +        delete $scope.ongoingEdit
> > +        for p in providers
> > +          p.channel.notify method: 'onEditorSubmit'
> > +          p.channel.notify method: 'onEditorHide'
> > +
> > +    annotator.subscribe 'annotationDeleted', (annotation) ->
> > +      if annotation is $scope.ongoingEdit
> > +        delete $scope.ongoingEdit
> > +        for p in providers
> > +          p.channel.notify method: 'onEditorHide'
> > +
> > +    annotator.subscribe 'annotationsLoaded', (annotations) ->
> > +      $scope.threadRoot ?= annotator.threading.thread(annotations)
>
> This looks like it will only ever set threadRoot the first time this
> runs. Need to check, as currently the stream search doesn't update.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hypothesis/h/pull/1436/files#r16727044>.
>