Skip to content

Commit

Permalink
fix: more button in commits is not updating
Browse files Browse the repository at this point in the history
  • Loading branch information
robinshine committed Jul 22, 2023
1 parent 7cfcaa7 commit 9cd7f6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Expand Up @@ -24,7 +24,7 @@
</ul>
<div wicket:id="noCommits" class="no-commits"></div>
</div>
<div class="foot text-center">
<div wicket:id="foot" class="foot text-center">
<a wicket:id="more" class="btn btn-primary">More commits</a>
<div wicket:id="tooMany" class="mt-4 mb-0 alert alert-light-warning">Too many commits to load</div>
</div>
Expand Down
Expand Up @@ -215,7 +215,7 @@ protected Map<String, List<String>> load() {

private WebMarkupContainer body;

private WebMarkupContainer tooMany;
private WebMarkupContainer foot;

private RepeatingView commitsView;

Expand Down Expand Up @@ -261,7 +261,7 @@ protected QuerySaveSupport getQuerySaveSupport() {
private void doQuery(AjaxRequestTarget target) {
page = 1;
target.add(body);
target.add(tooMany);
target.add(foot);
querySubmitted = true;
target.appendJavaScript(renderCommitGraph());
if (SecurityUtils.getUser() != null && getQuerySaveSupport() != null)
Expand Down Expand Up @@ -393,7 +393,10 @@ protected void onConfigure() {

});

add(new AjaxLink<Void>("more") {
add(foot = new WebMarkupContainer("foot"));
foot.setOutputMarkupId(true);

foot.add(new AjaxLink<Void>("more") {

private RunTaskBehavior taskBehavior;

Expand Down Expand Up @@ -445,7 +448,7 @@ protected void runTask(AjaxRequestTarget target) {
body.getMarkupId(), item.getMarkupId()));
}
target.prependJavaScript(builder);
target.add(tooMany);
target.add(foot);
target.appendJavaScript(renderCommitGraph());

getProject().cacheCommitStatuses(getBuildManager().queryStatus(getProject(), getCommitIdsToQueryStatus()));
Expand All @@ -467,7 +470,7 @@ protected void onConfigure() {

});

add(tooMany = new WebMarkupContainer("tooMany") {
foot.add(new WebMarkupContainer("tooMany") {

@Override
protected void onConfigure() {
Expand All @@ -476,7 +479,6 @@ protected void onConfigure() {
}

});
tooMany.setOutputMarkupPlaceholderTag(true);

setOutputMarkupId(true);
}
Expand Down

0 comments on commit 9cd7f6e

Please sign in to comment.