• Sean Hammond's avatar
    Don't change model.group on group change · 2f5b8bc1
    Sean Hammond authored
    Don't change model.group in AnnotationController when the currently focused
    group changes.
    
    model is supposed to be a read-only domain model, change vm.annotation instead.
    
    Changes to vm.annotation are copied over to model before saving model to the
    server.
    
    To make this work vm.group() should return the current group of the annotation,
    accounting for any changes made to vm.annotation but not saved to model or to
    the server yet. It should return vm.annotation.group not model.group.
    
    Similarly vm.isShared() should be based on vm.annotation not on model.
    
    Also remove some code in thread.coffee that was deliberately hiding new
    annotations that don't belong to the focused group (see commit
    272b2432c48a2d6bf890daa863e92f3a678b27b5). This is no longer the desired
    behaviour - when changing groups any new annotations move to the new group with
    us (and the GROUP_FOCUSED listener in AnnotationController will update
    vm.annotation.group to match).
    2f5b8bc1
Name
Last commit
Last update
..
annotation-test.js Loading commit data...
excerpt-test.js Loading commit data...
form-input-test.coffee Loading commit data...
form-validate-test.coffee Loading commit data...
group-list-test.js Loading commit data...
publish-annotation-btn-test.js Loading commit data...
search-status-bar-test.js Loading commit data...
share-dialog-test.coffee Loading commit data...
simple-search-test.coffee Loading commit data...
sort-dropdown-test.js Loading commit data...
spinner-test.js Loading commit data...
status-button-test.coffee Loading commit data...
thread-test.coffee Loading commit data...
util.js Loading commit data...
window-scroll-test.js Loading commit data...