Skip to content

Commit

Permalink
#298: Fixed wiki plugin search filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Apr 27, 2013
1 parent b87aaf6 commit 27db965
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/wiki/html/formTable.html
Expand Up @@ -27,7 +27,7 @@
</div>

<div class="wiki-fixed row-fluid">
<input class="search-query span12" type="text" ng-model="searchText"
<input class="search-query span12" type="text" ng-model="gridOptions.filterOptions.filterText"
placeholder="Filter...">
</div>

Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/wiki/html/history.html
Expand Up @@ -34,7 +34,7 @@
</div>
<div class="span8">
<div class="control-group">
<input class="span12 search-query" type="text" ng-model="searchText" placeholder="search">
<input class="span12 search-query" type="text" ng-model="gridOptions.filterOptions.filterText" placeholder="search">
</div>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions hawtio-web/src/main/webapp/app/wiki/js/formTable.ts
Expand Up @@ -3,7 +3,6 @@ module Wiki {
export function FormTableController($scope, $location, $routeParams, workspace:Workspace, wikiRepository:GitWikiRepository) {
$scope.pageId = Wiki.pageId($routeParams, $location);
$scope.columnDefs = [];
$scope.searchText = null;

$scope.viewLink = (row) => {
return childLink(row, "#/wiki/view");
Expand Down Expand Up @@ -55,7 +54,7 @@ module Wiki {
}

function updateView() {
$scope.git = wikiRepository.jsonChildContents($scope.pageId, "*.json", $scope.searchText, onResults);
$scope.git = wikiRepository.jsonChildContents($scope.pageId, "*.json", $scope.gridOptions.filterOptions.filterText, onResults);
}

function onFormData(details) {
Expand Down Expand Up @@ -85,7 +84,7 @@ module Wiki {
displayFooter: false,
showFilter: false,
filterOptions: {
filterText: "searchText"
filterText: ''
},
columnDefs: columnDefs
};
Expand Down
3 changes: 1 addition & 2 deletions hawtio-web/src/main/webapp/app/wiki/js/history.ts
Expand Up @@ -4,7 +4,6 @@ module Wiki {

$scope.pageId = Wiki.pageId($routeParams, $location);
$scope.selectedItems = [];
$scope.searchText = "";

// TODO we could configure this?
$scope.dateFormat = 'EEE, MMM d, y : hh:mm:ss a';
Expand All @@ -14,7 +13,7 @@ module Wiki {
showFilter: false,
selectedItems: $scope.selectedItems,
filterOptions: {
filterText: "searchText"
filterText: ''
},
columnDefs: [
{
Expand Down

0 comments on commit 27db965

Please sign in to comment.