• Robert Knight's avatar
    Prevent double-posting of new annotations · f407141a
    Robert Knight authored
    When the user clicks the 'Post' button to create an annotation,
    optimistically switch the card back to View mode but display
    a 'Saving...' indicator in place of the Reply/Edit/Delete links.
    
    This makes the UI appear more responsive when the user clicks
    the Post button and also prevents an issue where the user could
    click 'Post' multiple times during the save and create multiple
    annotations.
    
     * Fix a possible inconsistency between the 'Post' button's enabled
       state and whether or not the save() function can succeed.
    
       The hasContent() and isShared() methods also already have tests,
       so this lets us remove several redundant tests.
    
     * Fix inconsistency in the return type of the save() function -
       always return a promise.
    
     * Treat negative status values as network errors as well as 0.
       If the server is unreachable, the real status value may be -1.
    
    Fixes #2864
    f407141a
Name
Last commit
Last update
..
annotator Loading commit data...
config Loading commit data...
directive Loading commit data...
filter Loading commit data...
test Loading commit data...
vendor Loading commit data...
annotation-mapper.js Loading commit data...
annotation-sync.coffee Loading commit data...
annotation-ui-controller.coffee Loading commit data...
annotation-ui-sync.coffee Loading commit data...
annotation-ui.coffee Loading commit data...
annotation-viewer-controller.coffee Loading commit data...
app-controller.coffee Loading commit data...
app.coffee Loading commit data...
auth.js Loading commit data...
bridge.coffee Loading commit data...
create-group-form.js Loading commit data...
cross-frame.coffee Loading commit data...
date-util.js Loading commit data...
discovery.coffee Loading commit data...
drafts.js Loading commit data...
dropdown-menu.js Loading commit data...
events.js Loading commit data...
features.js Loading commit data...
flash.coffee Loading commit data...
form-respond.coffee Loading commit data...
frame-rpc.js Loading commit data...
groups.js Loading commit data...
host.coffee Loading commit data...
identity.coffee Loading commit data...
installer-controller.js Loading commit data...
karma-phantomjs-polyfill.js Loading commit data...
karma.config.js Loading commit data...
local-storage.coffee Loading commit data...
media-embedder.js Loading commit data...
permissions.coffee Loading commit data...
query-parser.coffee Loading commit data...
raven.js Loading commit data...
render.coffee Loading commit data...
search-filter.coffee Loading commit data...
session.js Loading commit data...
settings.js Loading commit data...
share-group-form.js Loading commit data...
site.js Loading commit data...
store.js Loading commit data...
stream-controller.coffee Loading commit data...
stream-filter.coffee Loading commit data...
streamer.js Loading commit data...
tags.coffee Loading commit data...
threading.coffee Loading commit data...
time.coffee Loading commit data...
ua-detect.js Loading commit data...
unicode.coffee Loading commit data...
view-filter.coffee Loading commit data...
websocket.js Loading commit data...
widget-controller.coffee Loading commit data...