[Edit Mode] #627 slightly modified edit representer to detect newly created objects

Added some comments, renamed controller variable in markup

Removed edit references from BrowseController
This commit is contained in:
Henry
2016-01-26 22:05:18 -08:00
parent 549dfab5aa
commit fa46d31ac2
9 changed files with 56 additions and 158 deletions

View File

@ -22,11 +22,8 @@
/*global define,Promise*/
define(
[
'../../../representation/src/gestures/GestureConstants',
'../../edit/src/objects/EditableDomainObject'
],
function (GestureConstants, EditableDomainObject) {
[],
function () {
"use strict";
/**
@ -57,10 +54,9 @@ define(
function updateQueryParam(viewKey) {
var unlisten,
priorRoute = $route.current,
isEditMode = $scope.domainObject && $scope.domainObject.hasCapability('editor');
priorRoute = $route.current;
if (viewKey && !isEditMode) {
if (viewKey) {
$location.search('view', viewKey);
unlisten = $scope.$on('$locationChangeSuccess', function () {
// Checks path to make sure /browse/ is at front
@ -76,10 +72,6 @@ define(
$scope.$watch('domainObject', setViewForDomainObject);
$scope.$watch('representation.selected.key', updateQueryParam);
$scope.cancelEditing = function() {
navigationService.setNavigation($scope.domainObject.getDomainObject());
};
$scope.doAction = function (action){
return $scope[action] && $scope[action]();
};