• Nick Stenning's avatar
    Add temporary timestamps to new annotations (for sorting) · 3b8ea633
    Nick Stenning authored
    Brand new annotations (and page notes) are currently displayed as editor
    widgets in the sidebar alongside all the existing annotation cards. This
    means they need to be sortable.
    
    Sorting by location isn't a problem, because the annotation already
    carries the document location information by the time it gets to
    `addAnnotations`, but sorting by the updated date is, because currently
    the `created` and `updated` fields are only provided when the server
    sends back the saved annotation.
    
    This commit changes that by adding temporary `created` and `updated`
    timestamps to new annotations (those without an ID). These will be
    ignored entirely by the server, and overwritten when the annotation is
    saved.
    
    If for whatever reason `addAnnotations` is called with a new annotation
    that already has these fields, they will not be overwritten.
    
    Fixes (the rest of) #96.
    3b8ea633
Name
Last commit
Last update
..
images/icons Loading commit data...
scripts Loading commit data...
styles Loading commit data...