1. 27 Jul, 2015 2 commits
  2. 24 Jul, 2015 6 commits
    • Nick Stenning's avatar
      Roll xsrf value into session service · 3ed424cb
      Nick Stenning authored
      Rather than using a separate named value to keep track of the current
      CSRF token, simply treat this as part of the session state.
      3ed424cb
    • Nick Stenning's avatar
      Consolidate session service and session helpers · ed44cb77
      Nick Stenning authored
      This commit does three things. In order of importance:
      
      - wraps the ngResource for managing session state in a service, which
        allows us to expose current session state as `session.state` on that
        instance. This means that components of the application that don't
        want to alter or explicitly fetch session state, but wish to display
        some part of it (such as the current authenticated userid, etc.) can
        do so more easily.
      - moves configuration of the session resources into the session service
        rather than requiring configuration from outside via a
        sessionProvider.
      - translates the session service to JavaScript from CoffeeScript.
      ed44cb77
    • Sean Hammond's avatar
      Merge pull request #2401 from hypothesis/features-client-check-pending · b29c9bac
      Sean Hammond authored
      Fix infinite digest cycle caused by feature flag client
      b29c9bac
    • Nick Stenning's avatar
      Only make one request for features data at once · 726ecc0b
      Nick Stenning authored
      This was a fun bug. If multiple feature checks are done in rapid
      succession when the features cache is empty (such as, for example,
      during the first digest cycle at application boot time) then the
      features client would keep kicking off HTTP requests until the first one
      returned.
      
      This would clearly be a misfeature, but wouldn't actually have caused
      any problems but for the fact that the spinner in
      `h/directives/simple-search.coffee` does this to determine whether to
      spin:
      
          scope.$watch (-> $http.pendingRequests.length), (pending) ->
            scope.loading = (pending > 0)
      
      This means that kicking off dozens of requests at a time keeps
      invalidating the digest cycle (because the value of
      `$http.pendingRequests.length` keeps changing), so it never ends. The
      result is the ever-horrible `infdig` (infinite digest cycle) error from
      Angular: https://docs.angularjs.org/error/$rootScope/infdig.
      726ecc0b
    • Nick Stenning's avatar
      Be strict about request counting in tests · e003383b
      Nick Stenning authored
      The angular $httpBackend mocking service supports two primary means of
      usage:
      
         .expect(...).respond(...)
      
      and
      
         .when(...).respond(...)
      
      The latter pattern allows a single handler to respond to multiple
      requests, in any order. The latter is precise -- one .expect() must be
      matched by one request, in the correct order.
      
      This commit changes the tests for the "features" service to use this
      more precise form of testing.
      e003383b
    • Randall Leeds's avatar
      Bump dom-anchor-text-quote version · ed0e1dfd
      Randall Leeds authored
      ed0e1dfd
  3. 23 Jul, 2015 1 commit
    • Randall Leeds's avatar
      Support relative URLs from document info plugins · 8513fb6d
      Randall Leeds authored
      PDF usages might want to specify relative URLs to get around proxy
      restrictions with a custom viewer. Even link tags support relative
      URLs for rel=canonical though it's probably a bad idea as a publisher.
      In any case, we should clearly just do this.
      8513fb6d
  4. 22 Jul, 2015 4 commits
  5. 21 Jul, 2015 12 commits
  6. 20 Jul, 2015 10 commits
  7. 19 Jul, 2015 4 commits
  8. 17 Jul, 2015 1 commit