summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/panels
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/wicket/panels')
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BranchesPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CommentPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/MarkdownTextArea.java6
-rw-r--r--src/main/java/com/gitblit/wicket/panels/PagerPanel.java5
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java8
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TeamsPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/UsersPanel.java2
11 files changed, 18 insertions, 17 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java b/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java
index 9de3aa17..9c87a2a9 100644
--- a/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java
+++ b/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java
@@ -61,7 +61,7 @@ public class BooleanChoiceOption<T> extends BasePanel {
add(choice.setMarkupId("choice").setEnabled(choice.getChoices().size() > 0));
choice.setEnabled(checkbox.getModelObject());
- checkbox.add(new AjaxFormComponentUpdatingBehavior("onchange") {
+ checkbox.add(new AjaxFormComponentUpdatingBehavior("change") {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
index 92e7fb6d..a6ff921d 100644
--- a/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
@@ -236,7 +236,7 @@ public class BranchesPanel extends BasePanel {
}
};
- deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ deleteLink.add(new JavascriptEventConfirmation("click", MessageFormat.format(
"Delete branch \"{0}\"?", entry.displayName )));
return deleteLink;
}
diff --git a/src/main/java/com/gitblit/wicket/panels/CommentPanel.java b/src/main/java/com/gitblit/wicket/panels/CommentPanel.java
index 3de07346..4740130a 100644
--- a/src/main/java/com/gitblit/wicket/panels/CommentPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/CommentPanel.java
@@ -69,7 +69,7 @@ public class CommentPanel extends BasePanel {
private static final long serialVersionUID = 1L;
@Override
- public void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ public void onSubmit(AjaxRequestTarget target) {
String txt = markdownEditor.getText();
if (change == null) {
// new comment
diff --git a/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java b/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java
index b02e848e..20d8a43c 100644
--- a/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java
@@ -76,7 +76,7 @@ public class FederationProposalsPanel extends BasePanel {
}
}
};
- deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ deleteLink.add(new JavascriptEventConfirmation("click", MessageFormat.format(
"Delete proposal \"{0}\"?", entry.name)));
item.add(deleteLink);
WicketUtils.setAlternatingBackground(item, counter);
diff --git a/src/main/java/com/gitblit/wicket/panels/MarkdownTextArea.java b/src/main/java/com/gitblit/wicket/panels/MarkdownTextArea.java
index f922686f..c3fce626 100644
--- a/src/main/java/com/gitblit/wicket/panels/MarkdownTextArea.java
+++ b/src/main/java/com/gitblit/wicket/panels/MarkdownTextArea.java
@@ -38,7 +38,7 @@ public class MarkdownTextArea extends TextArea {
public MarkdownTextArea(String id, final IModel<String> previewModel, final Label previewLabel) {
super(id);
setModel(new PropertyModel(this, "text"));
- add(new AjaxFormComponentUpdatingBehavior("onblur") {
+ add(new AjaxFormComponentUpdatingBehavior("blur") {
private static final long serialVersionUID = 1L;
@Override
@@ -49,7 +49,7 @@ public class MarkdownTextArea extends TextArea {
}
}
});
- add(new AjaxFormComponentUpdatingBehavior("onchange") {
+ add(new AjaxFormComponentUpdatingBehavior("change") {
private static final long serialVersionUID = 1L;
@Override
@@ -97,7 +97,7 @@ public class MarkdownTextArea extends TextArea {
// private static final long serialVersionUID = 1L;
//
// public RichTextSetActiveTextFieldAttributeModifier(String markupId) {
-// super("onClick", true, new Model("richTextSetActiveTextField('" + markupId + "');"));
+// super("Click", true, new Model("richTextSetActiveTextField('" + markupId + "');"));
// }
// }
diff --git a/src/main/java/com/gitblit/wicket/panels/PagerPanel.java b/src/main/java/com/gitblit/wicket/panels/PagerPanel.java
index c80bb73c..3a136f03 100644
--- a/src/main/java/com/gitblit/wicket/panels/PagerPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/PagerPanel.java
@@ -48,7 +48,7 @@ public class PagerPanel extends Panel {
deltas = new int[] { -2, -1, 0, 1, 2 };
}
- if (totalPages > 0) {
+ if (totalPages > 0 && currentPage > 1) {
pages.add(new PageObject("\u2190", currentPage - 1));
}
for (int delta : deltas) {
@@ -57,7 +57,7 @@ public class PagerPanel extends Panel {
pages.add(new PageObject("" + page, page));
}
}
- if (totalPages > 0) {
+ if (totalPages > 0 && currentPage < totalPages) {
pages.add(new PageObject("\u2192", currentPage + 1));
}
@@ -75,6 +75,7 @@ public class PagerPanel extends Panel {
item.add(link);
if (pageItem.page == currentPage || pageItem.page < 1 || pageItem.page > totalPages) {
WicketUtils.setCssClass(item, "disabled");
+ link.setEnabled(false);
}
}
};
diff --git a/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
index 839d80f9..ce288a84 100644
--- a/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
@@ -208,7 +208,7 @@ public class RegistrantPermissionsPanel extends BasePanel {
permissionChoice.setEnabled(entry.mutable);
permissionChoice.setOutputMarkupId(true);
if (entry.mutable) {
- permissionChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
+ permissionChoice.add(new AjaxFormComponentUpdatingBehavior("change") {
private static final long serialVersionUID = 1L;
@@ -254,9 +254,9 @@ public class RegistrantPermissionsPanel extends BasePanel {
private static final long serialVersionUID = 1L;
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
// add permission to our list
- RegistrantAccessPermission rp = (RegistrantAccessPermission) form.getModel().getObject();
+ RegistrantAccessPermission rp = (RegistrantAccessPermission) getForm().getModel().getObject();
if (rp.permission == null) {
return;
}
@@ -342,7 +342,7 @@ public class RegistrantPermissionsPanel extends BasePanel {
}
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
RegistrantPermissionsPanel.this.activeState = buttonState;
target.add(RegistrantPermissionsPanel.this);
}
diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
index 19fe46c1..262aa61a 100644
--- a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
@@ -359,7 +359,7 @@ public class RepositoryUrlPanel extends BasePanel {
// javascript: manual copy & paste with modal browser prompt dialog
Fragment copyFragment = new Fragment("copyFunction", "jsPanel", RepositoryUrlPanel.this);
ContextImage img = WicketUtils.newImage("copyIcon", "clippy.png");
- img.add(new JavascriptTextPrompt("onclick", "Copy to Clipboard (Ctrl+C, Enter)", text));
+ img.add(new JavascriptTextPrompt("click", "Copy to Clipboard (Ctrl+C, Enter)", text));
copyFragment.add(img);
return copyFragment;
}
diff --git a/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java b/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java
index a06f9c4d..1ca3bb8a 100644
--- a/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/SshKeysPanel.java
@@ -123,7 +123,7 @@ public class SshKeysPanel extends BasePanel {
private static final long serialVersionUID = 1L;
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
UserModel user = GitBlitWebSession.get().getUser();
String data = keyData.getObject();
diff --git a/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
index 69c64fc7..87e93e89 100644
--- a/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
@@ -83,7 +83,7 @@ public class TeamsPanel extends BasePanel {
}
}
};
- deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ deleteLink.add(new JavascriptEventConfirmation("click", MessageFormat.format(
"Delete team \"{0}\"?", entry.name)));
teamLinks.add(deleteLink);
item.add(teamLinks);
diff --git a/src/main/java/com/gitblit/wicket/panels/UsersPanel.java b/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
index 7200cb76..1a67bcb2 100644
--- a/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
@@ -103,7 +103,7 @@ public class UsersPanel extends BasePanel {
}
}
};
- deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ deleteLink.add(new JavascriptEventConfirmation("click", MessageFormat.format(
getString("gb.deleteUser"), entry.username)));
userLinks.add(deleteLink);
item.add(userLinks);