Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #733
  • Loading branch information
gashcrumb committed Nov 7, 2013
1 parent 7bad8f3 commit fb03135
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/wiki/html/viewPage.html
Expand Up @@ -240,7 +240,7 @@
<label class="control-label" for="renameFileName">Name</label>

<div class="controls">
<input type="text" id="renameFileName" ng-model="fileName">
<input type="text" id="renameFileName" ng-model="newFileName">
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions hawtio-web/src/main/webapp/app/wiki/js/view.ts
Expand Up @@ -351,7 +351,7 @@ module Wiki {
$scope.deleteDialog = false;
};

$scope.$watch("fileName", () => {
$scope.$watch("newFileName", () => {
// ignore errors if the file is the same as the rename file!
var path = getRenameFilePath();
if ($scope.originalRenameFilePath === path) {
Expand All @@ -368,7 +368,7 @@ module Wiki {
name = selected.name;
}
if (name) {
$scope.fileName = name;
$scope.newFileName = name;
$scope.originalRenameFilePath = getRenameFilePath();
$scope.renameDialog.open();
$timeout(() => {
Expand Down Expand Up @@ -622,7 +622,7 @@ module Wiki {
}

function getRenameFilePath() {
return ($scope.pageId && $scope.fileName) ? $scope.pageId + "/" + $scope.fileName : null;
return ($scope.pageId && $scope.newFileName) ? $scope.pageId + "/" + $scope.newFileName : null;
}
}
}

0 comments on commit fb03135

Please sign in to comment.