Skip to content

Commit

Permalink
small fix for resource content panel - active resource/repo search bu…
Browse files Browse the repository at this point in the history
…ttons
  • Loading branch information
katkav committed Sep 23, 2022
1 parent 1fe4a23 commit ce44d60
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ public boolean isVisible() {

@Override
public void onClick(AjaxRequestTarget target) {
isRepoSearch = true;
updateSearchButtons(true, target, initRepoContent(ResourceContentPanel.this.getObjectWrapperModel()));
}
};
Expand All @@ -294,7 +293,6 @@ public void onClick(AjaxRequestTarget target) {

@Override
public void onClick(AjaxRequestTarget target) {
isRepoSearch = false;
updateSearchButtons(false, target, initResourceContent(ResourceContentPanel.this.getObjectWrapperModel()));
}

Expand All @@ -309,12 +307,14 @@ private void updateSearchButtons(boolean repoSearch, AjaxRequestTarget target, P
getContentStorage(kind, SessionStorage.KEY_RESOURCE_PAGE_RESOURCE_CONTENT).setResourceSearch(!repoSearch);

resourceContentSearch.getObject().setResourceSearch(!repoSearch);
this.isRepoSearch = repoSearch;
updateResourceContentSearch();

Form mainForm = getMainForm();
mainForm.addOrReplace(newPanel);
target.add(mainForm);
target.add(get(ID_RESOURCE_CHOICE_CONTAINER_SEARCH));

}

private Form getMainForm() {
Expand Down

0 comments on commit ce44d60

Please sign in to comment.