mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 15:18:12 +00:00
[Edit Mode] Fixed spelling mistake, moved variable declaration
This commit is contained in:
@ -49,9 +49,7 @@ define(
|
|||||||
NavigateAction.prototype.perform = function () {
|
NavigateAction.prototype.perform = function () {
|
||||||
var self = this,
|
var self = this,
|
||||||
navigateTo = this.domainObject,
|
navigateTo = this.domainObject,
|
||||||
currentObject = self.navigationService.getNavigation(),
|
currentObject = self.navigationService.getNavigation();
|
||||||
editing = currentObject.hasCapability('editor') &&
|
|
||||||
currentObject.getCapability('editor').isEditContextRoot();
|
|
||||||
|
|
||||||
function allow() {
|
function allow() {
|
||||||
var navigationAllowed = true;
|
var navigationAllowed = true;
|
||||||
@ -63,6 +61,9 @@ define(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cancelIfEditing() {
|
function cancelIfEditing() {
|
||||||
|
var editing = currentObject.hasCapability('editor') &&
|
||||||
|
currentObject.getCapability('editor').isEditContextRoot();
|
||||||
|
|
||||||
return self.$q.when(editing && currentObject.getCapability("editor").cancel());
|
return self.$q.when(editing && currentObject.getCapability("editor").cancel());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ define(
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("in edit more", function () {
|
describe("in edit mode", function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockNavigatedObject.hasCapability.andCallFake(function (capability) {
|
mockNavigatedObject.hasCapability.andCallFake(function (capability) {
|
||||||
return capability === "editor";
|
return capability === "editor";
|
||||||
|
@ -76,7 +76,6 @@ define(
|
|||||||
this.navigationService.setNavigation(this.domainObject);
|
this.navigationService.setNavigation(this.domainObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.navigationService.addListener(cancelEditing);
|
|
||||||
this.domainObject.useCapability("editor");
|
this.domainObject.useCapability("editor");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user