[Edit Mode] Fixed spelling mistake, moved variable declaration

This commit is contained in:
Henry 2016-09-22 11:04:04 -07:00
parent 3548cde9c4
commit 7a94efccbf
3 changed files with 5 additions and 5 deletions

View File

@ -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());
}

View File

@ -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";

View File

@ -76,7 +76,6 @@ define(
this.navigationService.setNavigation(this.domainObject);
}
//this.navigationService.addListener(cancelEditing);
this.domainObject.useCapability("editor");
};