1. 02 Oct, 2015 8 commits
    • Sean Hammond's avatar
      Show all annotations on the stream page · 89f2b668
      Sean Hammond authored
      The stream page was broken - showing only annotations from the group
      that was focused the last time the user was using the sidebar.
      
      Fix it to show annotations from all groups.
      89f2b668
    • Nick Stenning's avatar
      Hide threads that belong to a different group · 381371df
      Nick Stenning authored
      When switching between groups (and reloading the angular view more
      generally) drafts are persisted. But we don't want to display drafts for
      groups other than the one currently focused, because otherwise we'll end
      up in a position where we can see annotations published to another
      group.
      
      This commit adds an additional condition to
      `ThreadController#shouldShow`: if the thread root annotation has a group
      set, and that group doesn't match the focused group id, then the thread
      will be hidden.
      381371df
    • Sean Hammond's avatar
      Always focus public group if groups feature off · 4749864a
      Sean Hammond authored
      Always focus the Public / __world__ group if the groups feature is
      toggled off.
      
      When the groups feature was off a group other than Public might have
      been retrieved from the browser's localStorage (this could only happen
      if the groups feature had previously been on for the user) and the wrong
      annotations would be shown in the sidebar.
      4749864a
    • Sean Hammond's avatar
      Rename several variables to isSidebar · 872cff11
      Sean Hammond authored
      Replace `isSidebar`, `isEmbedded`, `annotation-embedded`, `annotationEmbedded`
      and `embedded` with a single `isSidebar` variable.
      
      - Rename `isEmbedded` in AppController to `isSidebar`.
      
      - Rename `embedded` in AnnotationController to `isSidebar`, it just passes the
      value of `AppController`'s `isSidebar` into `annotation.html`.
      
      - Rename the `annotation-embedded`/`annotationEmbedded` variable that is used
      to pass `isSidebar` (was `isEmbedded`) into `AnnotationController`,
      rename it to `is-sidebar` / `isSidebar`.
      
      - Delete the duplicate `isSidebar` variable from `WidgetController`'s scope,
      `WidgetController`'s templates can simply access `AppController`'s `isSidebar`
      from the scope.
      
      Note that there's another variable, `isStream`, that's actually true when we're
      either in the sidebar or on the stream page, but not when we're on individual
      annotation pages. This is used to show/hide the
      "Sorted by newest, oldest, location" menu which appears in the sidebar or
      stream but not on individual annotation pages (the "location" option in this
      menu only appears when in the sidebar not on the stream).
      
      This commit leaves the `isStream` variable alone.
      
      So the `isSidebar` variable is now used to show/hide the following elements:
      
      - The share dialog (share this page on twitter etc) is shown in the top bar,
      only when in the sidebar (and not on the `/stream` page or on individual
      annotation pages).
      
      - The group list dropdown menu, shown in the top bar only when in the sidebar.
      
      - The "location" entry in the sort menu (sorted by newest, oldest, location)
      shown only when in the sidebar.
      
      - The "citation" on annotations that says which page was annotated
      (the 'on "Example Document" (example.com)' in the annotation's title),
      is shown only when _not_ in the sidebar.
      872cff11
    • Sean Hammond's avatar
      Focus the public group on logout · 389113ad
      Sean Hammond authored
      389113ad
    • Nick Stenning's avatar
      Focus on a group · 4aa56fdd
      Nick Stenning authored
      When a user clicks on a group name in the "scope selector" dropdown
      menu, we want to filter the visible annotations by group. This commit
      implements a rather inefficient but functional approach to this, simply
      reloading the angular view.
      
      In addition, we make sure that the initial annotation load includes a
      filter on the currently-focused group, and we discard non-focused-group
      annotations coming in over the websocket.
      4aa56fdd
    • Sean Hammond's avatar
      Merge pull request #2574 from robertknight/gh2568-safari_missing_urls · 7f1631f6
      Sean Hammond authored
      Avoid String.prototype.startsWith() for compatibility Safari and IE
      7f1631f6
    • Robert Knight's avatar
      Avoid String.prototype.startsWith() for compatibility Safari and IE · 2ec367eb
      Robert Knight authored
      Links to source document URIs were broken under Safari <= 8 and
      other browsers as well due to reliance on the
      String.prototype.startsWith() API
      
      This issue went unnoticed in Karma/PhantomJS tests because
      Karma was primed with the complete set of polyfills from
      the js-polyfills library, including many (all?) ES6 polyfills.
      
      This same set of polyfills was_not_ used in the browser build however.
      
      This commit fixes the original issue by using 'indexOf()' instead of
      'startsWith()' and reduces the likelihood of such problems going
      unnoticed during testing by using a much more minimal set of polyfills
      under PhantomJS.
      
      The alternative approach would be to go in the opposite direction
      and polyfill any ES6 APIs in the browser. However, we need to be
      careful about code bloat, so the approach taken here is the more
      conservative option.
      
      Fixes #2568
      2ec367eb
  2. 01 Oct, 2015 5 commits
  3. 30 Sep, 2015 7 commits
  4. 29 Sep, 2015 7 commits
  5. 28 Sep, 2015 4 commits
  6. 26 Sep, 2015 9 commits