mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Edit Mode] Fixed spelling mistake, moved variable declaration
This commit is contained in:
parent
3548cde9c4
commit
7a94efccbf
@ -49,9 +49,7 @@ define(
|
||||
NavigateAction.prototype.perform = function () {
|
||||
var self = this,
|
||||
navigateTo = this.domainObject,
|
||||
currentObject = self.navigationService.getNavigation(),
|
||||
editing = currentObject.hasCapability('editor') &&
|
||||
currentObject.getCapability('editor').isEditContextRoot();
|
||||
currentObject = self.navigationService.getNavigation();
|
||||
|
||||
function allow() {
|
||||
var navigationAllowed = true;
|
||||
@ -63,6 +61,9 @@ define(
|
||||
}
|
||||
|
||||
function cancelIfEditing() {
|
||||
var editing = currentObject.hasCapability('editor') &&
|
||||
currentObject.getCapability('editor').isEditContextRoot();
|
||||
|
||||
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 () {
|
||||
mockNavigatedObject.hasCapability.andCallFake(function (capability) {
|
||||
return capability === "editor";
|
||||
|
@ -76,7 +76,6 @@ define(
|
||||
this.navigationService.setNavigation(this.domainObject);
|
||||
}
|
||||
|
||||
//this.navigationService.addListener(cancelEditing);
|
||||
this.domainObject.useCapability("editor");
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user