[Edit Mode] #627 removed edit concerns from browse controllers and markup

Fixed elements not appearing in edit mode

Fixed failing tests
This commit is contained in:
Henry
2016-02-26 17:12:35 -08:00
parent a910fa8f37
commit 2cc2c6a9d3
11 changed files with 140 additions and 73 deletions

View File

@ -102,6 +102,11 @@ define(
scope.commit = commit;
scope.setEditable = setEditable;
// Clean up when the scope is destroyed
scope.$on("$destroy", function () {
self.destroy();
});
}
// Handle a specific representation of a specific domain object
@ -119,8 +124,7 @@ define(
this.destroy();
function setEditing(){
scope.viewRegionTemplate = 'edit-object';
scope.inspectorRegionTemplate = 'inspector-edit'
scope.viewObjectTemplate = 'edit-object';
}
/**
@ -132,7 +136,7 @@ define(
if (statuses.indexOf('editing')!=-1){
setEditing();
} else {
delete scope.viewRegionTemplate;
delete scope.viewObjectTemplate;
}
});
@ -144,7 +148,7 @@ define(
// Respond to the destruction of the current representation.
EditRepresenter.prototype.destroy = function destroy() {
// Nothing to clean up
this.listenHandle && this.listenHandle();
return this.listenHandle && this.listenHandle();
};
return EditRepresenter;