diff options
Diffstat (limited to 'src')
17 files changed, 32 insertions, 27 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java b/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java index ccb807c6..5ba57b40 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java @@ -120,7 +120,7 @@ public class EditMilestonePage extends RepositoryPage { private static final long serialVersionUID = 1L;
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
String name = nameModel.getObject();
if (StringUtils.isEmpty(name)) {
return;
@@ -180,7 +180,7 @@ public class EditMilestonePage extends RepositoryPage { }
};
- delete.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ delete.add(new JavascriptEventConfirmation("click", MessageFormat.format(
getString("gb.deleteMilestone"), oldName)));
form.add(delete);
diff --git a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java index 61e6b0c9..a68f3d3e 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -28,6 +28,7 @@ import java.util.Set; import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
import org.apache.wicket.extensions.markup.html.form.palette.Palette;
@@ -369,8 +370,10 @@ public class EditRepositoryPage extends RootSubPage { // custom fields
repositoryModel.customFields = new LinkedHashMap<String, String>();
- for (int i = 0; i < customFieldsListView.size(); i++) {
- ListItem<String> child = (ListItem<String>) customFieldsListView.get(i);
+ Iterator<Component> customFieldsListViewIterator = customFieldsListView.iterator();
+ while(customFieldsListViewIterator.hasNext()){
+
+ ListItem<String> child = (ListItem<String>) customFieldsListViewIterator.next();
String key = child.getModelObject();
TextField<String> field = (TextField<String>) child.get("customFieldValue");
@@ -709,7 +712,7 @@ public class EditRepositoryPage extends RootSubPage { };
if (canDelete) {
- delete.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(
+ delete.add(new JavascriptEventConfirmation("click", MessageFormat.format(
getString("gb.deleteRepository"), repositoryModel)));
}
form.add(delete.setVisible(canDelete));
diff --git a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java index 8cc2c611..b3be019b 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java @@ -62,7 +62,9 @@ import com.google.common.base.Optional; */
public class EditTicketPage extends RepositoryPage {
- static final String NIL = "<nil>";
+ private static final long serialVersionUID = 1L;
+
+ static final String NIL = "<nil>";
static final String ESC_NIL = StringUtils.escapeForHtml(NIL, false);
@@ -261,7 +263,7 @@ public class EditTicketPage extends RepositoryPage { private static final long serialVersionUID = 1L;
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
long ticketId = 0L;
try {
String h = WicketUtils.getObject(getPageParameters());
diff --git a/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java b/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java index 833c6d47..f78b1c44 100644 --- a/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java +++ b/src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java @@ -87,7 +87,7 @@ public class NewMilestonePage extends RepositoryPage { private static final long serialVersionUID = 1L;
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
String name = nameModel.getObject();
if (StringUtils.isEmpty(name)) {
// invalid name
diff --git a/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java b/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java index 1fd5839d..45478bc8 100644 --- a/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java @@ -191,7 +191,7 @@ public class NewTicketPage extends RepositoryPage { private static final long serialVersionUID = 1L;
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
String title = titleModel.getObject();
if (StringUtils.isEmpty(title)) {
return;
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java index 290d6437..77d2236a 100644 --- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java +++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java @@ -1649,7 +1649,7 @@ public class TicketPage extends RepositoryPage { // javascript: manual copy & paste with modal browser prompt dialog
Fragment copyFragment = new Fragment(wicketId, "jsPanel", TicketPage.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;
}
@@ -1729,7 +1729,7 @@ public class TicketPage extends RepositoryPage { WicketUtils.setHtmlTooltip(deleteLink, MessageFormat.format(getString("gb.deletePatchset"), patchset.number));
- deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(getString("gb.deletePatchset"), patchset.number)));
+ deleteLink.add(new JavascriptEventConfirmation("click", MessageFormat.format(getString("gb.deletePatchset"), patchset.number)));
return deleteLink;
}
diff --git a/src/main/java/com/gitblit/wicket/pages/UserPage.java b/src/main/java/com/gitblit/wicket/pages/UserPage.java index b37e75d8..8908016c 100644 --- a/src/main/java/com/gitblit/wicket/pages/UserPage.java +++ b/src/main/java/com/gitblit/wicket/pages/UserPage.java @@ -273,7 +273,7 @@ public class UserPage extends RootPage { private static final long serialVersionUID = 1L;
@Override
- protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
+ protected void onSubmit(AjaxRequestTarget target) {
UserModel user = GitBlitWebSession.get().getUser();
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/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);
|