Telemetry Panels now created correctly
This commit is contained in:
@@ -63,14 +63,10 @@ define(
|
||||
return editor.cancel();
|
||||
}
|
||||
|
||||
// Discard the current root view (which will be the editing
|
||||
// UI, which will have been pushed atop the Browise UI.)
|
||||
//Discard current 'editable' object, and retrieve original
|
||||
// un-edited object.
|
||||
function returnToBrowse() {
|
||||
self.objectService.getObjects([self.domainObject.getId()]).then(function(objects){
|
||||
return self.navigationService.setNavigation(objects[self.domainObject.getId()]);
|
||||
})
|
||||
//return
|
||||
// self.navigationService.setNavigation(self.domainObject.getDomainObject());
|
||||
return self.navigationService.setNavigation(self.domainObject.getOriginalObject());
|
||||
}
|
||||
|
||||
return doCancel(getEditorCapability())
|
||||
|
||||
@@ -99,8 +99,9 @@ define(
|
||||
return domainObject.useCapability('composition')
|
||||
.then(function(composees){
|
||||
return self.$q.all(composees.map(function(composee){
|
||||
return object.getCapability('composition').add(composee);
|
||||
}));
|
||||
object.getCapability('composition').add(composee);
|
||||
return object;
|
||||
})).then(function(){return object});
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -120,7 +121,9 @@ define(
|
||||
//This is a new 'virtual panel' that has not been persisted
|
||||
// yet.
|
||||
if (domainObject.getModel().type === 'telemetry.panel' && !domainObject.getModel().persisted){
|
||||
return self.getObjectService().getObjects([domainObject.getModel().location]).then(function(objs){ doWizardSave(domainObject, objs[domainObject.getModel().location])});
|
||||
return self.getObjectService()
|
||||
.getObjects([domainObject.getModel().location])
|
||||
.then(function(objs){ return doWizardSave(domainObject, objs[domainObject.getModel().location])});
|
||||
} else {
|
||||
return domainObject.getCapability("editor").save();
|
||||
}
|
||||
@@ -128,8 +131,8 @@ define(
|
||||
|
||||
// Discard the current root view (which will be the editing
|
||||
// UI, which will have been pushed atop the Browse UI.)
|
||||
function returnToBrowse() {
|
||||
return self.navigationService.setNavigation(self.domainObject.getDomainObject());
|
||||
function returnToBrowse(object) {
|
||||
self.navigationService.setNavigation(object)
|
||||
}
|
||||
|
||||
return doSave().then(returnToBrowse);
|
||||
|
||||
@@ -78,7 +78,8 @@ define(
|
||||
// different versions of the same editable domain object
|
||||
// are not shown in different sections of the same Edit
|
||||
// UI, which might thereby fall out of sync.
|
||||
var cache;
|
||||
var cache,
|
||||
originalObject = domainObject;
|
||||
|
||||
// Constructor for EditableDomainObject, which adheres
|
||||
// to the same shared cache.
|
||||
@@ -101,10 +102,15 @@ define(
|
||||
new Factory(capability, editableObject, domainObject, cache) :
|
||||
capability;
|
||||
};
|
||||
|
||||
editableObject.getDomainObject = function() {
|
||||
return domainObject;
|
||||
}
|
||||
|
||||
|
||||
editableObject.setOriginalObject = function(object) {
|
||||
originalObject = object;
|
||||
};
|
||||
|
||||
editableObject.getOriginalObject = function() {
|
||||
return originalObject;
|
||||
};
|
||||
|
||||
return editableObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user