Skip to content

Commit

Permalink
Fix #807
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Dec 3, 2013
1 parent 5af2de2 commit 13a302e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hawtio-web/src/main/webapp/app/wiki/html/viewNavBar.html
Expand Up @@ -118,7 +118,7 @@
</div>
</div>

<form class="form-inline" ng-submit="addAndCloseDialog()">
<form class="form-inline" ng-submit="addAndCloseDialog(newDocumentName)">
<label class="control-label" for="fileName">Name: </label>

<input id="fileName" type="text" ng-model="newDocumentName"
Expand All @@ -132,7 +132,7 @@
</div>
</div>
<div class="modal-footer">
<input id="submit" class="btn btn-primary add" type="submit" ng-click="addAndCloseDialog()"
<input id="submit" class="btn btn-primary add" type="submit" ng-click="addAndCloseDialog(newDocumentName)"
ng-disabled="!selectedCreateDocumentTemplate.exemplar || fileExists.exists"
value="Create">
<button class="btn btn-warning cancel" type="button" ng-click="addDialog.close()">Cancel</button>
Expand Down Expand Up @@ -200,4 +200,4 @@
<button class="btn btn-warning cancel" type="button" ng-click="renameDialog.close()">Cancel</button>
</div>
</form>
</div>
</div>
3 changes: 2 additions & 1 deletion hawtio-web/src/main/webapp/app/wiki/js/view.ts
Expand Up @@ -240,7 +240,8 @@ module Wiki {
$scope.addDialog.open();
};

$scope.addAndCloseDialog = () => {
$scope.addAndCloseDialog = (fileName) => {
$scope.newDocumentName = fileName;
var template = $scope.selectedCreateDocumentTemplate;
var path = getNewDocumentPath();
if (!template || !path) {
Expand Down

0 comments on commit 13a302e

Please sign in to comment.