diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index bed2fd1fbd..0dd556c40c 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -41,7 +41,6 @@ define([ "text!./res/templates/items/items.html", "text!./res/templates/browse/object-properties.html", "text!./res/templates/browse/inspector-region.html", - "text!./res/templates/view-object.html", 'legacyRegistry' ], function ( BrowseController, @@ -64,7 +63,6 @@ define([ itemsTemplate, objectPropertiesTemplate, inspectorRegionTemplate, - viewObjectTemplate, legacyRegistry ) { @@ -141,10 +139,6 @@ define([ } ], "representations": [ - { - "key": "view-object", - "template": viewObjectTemplate - }, { "key": "browse-object", "template": browseObjectTemplate, diff --git a/platform/commonUI/browse/res/templates/browse.html b/platform/commonUI/browse/res/templates/browse.html index aa1415ca81..214c765add 100644 --- a/platform/commonUI/browse/res/templates/browse.html +++ b/platform/commonUI/browse/res/templates/browse.html @@ -63,7 +63,7 @@
- - - diff --git a/platform/commonUI/edit/src/representers/EditRepresenter.js b/platform/commonUI/edit/src/representers/EditRepresenter.js index 81252977b1..fa08d7be7b 100644 --- a/platform/commonUI/edit/src/representers/EditRepresenter.js +++ b/platform/commonUI/edit/src/representers/EditRepresenter.js @@ -47,7 +47,6 @@ define( var self = this; this.scope = scope; - this.listenHandle = undefined; // Mutate and persist a new version of a domain object's model. function doMutate(model) { @@ -90,51 +89,15 @@ define( // Place the "commit" method in the scope scope.commit = commit; - // Clean up when the scope is destroyed - scope.$on("$destroy", function () { - self.destroy(); - }); - } // Handle a specific representation of a specific domain object - EditRepresenter.prototype.represent = function represent(representation, representedObject) { - var scope = this.scope; - - // Track the key, to know which view configuration to save to. - this.key = (representation || {}).key; - // Track the represented object + EditRepresenter.prototype.represent = function (representation, representedObject) { this.domainObject = representedObject; - - // Ensure existing watches are released - this.destroy(); - - function setEditing() { - scope.viewObjectTemplate = 'edit-object'; - } - - /** - * Listen for changes in object state. If the object becomes - * editable then change the view and inspector regions - * object representation accordingly - */ - this.listenHandle = this.domainObject.getCapability('status').listen(function (statuses) { - if (statuses.indexOf('editing') !== -1) { - setEditing(); - } else { - delete scope.viewObjectTemplate; - } - }); - - if (representedObject.hasCapability('editor') && representedObject.getCapability('editor').isEditContextRoot()) { - setEditing(); - } }; // Respond to the destruction of the current representation. - EditRepresenter.prototype.destroy = function destroy() { - return this.listenHandle && this.listenHandle(); - }; + EditRepresenter.prototype.destroy = function () {}; return EditRepresenter; }