summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages
diff options
context:
space:
mode:
authorJames Moger <james.moger@gmail.com>2016-11-18 18:48:38 -0500
committerGitHub <noreply@github.com>2016-11-18 18:48:38 -0500
commit855a19a242d9ce0ebbbfe7baa120603d3c598f05 (patch)
treeaa160c8bdb2dc593af36c8646587b0c6544daf67 /src/main/java/com/gitblit/wicket/pages
parente5068d689d47747778dcb7a6b967abbd600a30a4 (diff)
parent7f33a835295216210b7ca63367a460d76f9738d0 (diff)
downloadgitblit-wicket-7.tar.gz
gitblit-wicket-7.zip
Merge pull request #1153 from pingunaut/wicket-7wicket-7
Wicket Update and merge master
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BasePage.html1
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditMilestonePage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html3
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java15
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditTicketPage.java6
-rw-r--r--src/main/java/com/gitblit/wicket/pages/NewMilestonePage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/NewTicketPage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketPage.java10
-rw-r--r--src/main/java/com/gitblit/wicket/pages/UserPage.java2
9 files changed, 29 insertions, 16 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/BasePage.html b/src/main/java/com/gitblit/wicket/pages/BasePage.html
index 9b026982..0335bfe7 100644
--- a/src/main/java/com/gitblit/wicket/pages/BasePage.html
+++ b/src/main/java/com/gitblit/wicket/pages/BasePage.html
@@ -17,6 +17,7 @@
<link rel="stylesheet" href="fontawesome/css/font-awesome.min.css"/>
<link rel="stylesheet" href="octicons/octicons.css"/>
<link rel="stylesheet" type="text/css" href="gitblit.css"/>
+ <link rel="stylesheet" type="text/css" href="bootstrap-fixes.css"/>
</wicket:head>
<body>
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.html b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html
index 7a55b9f5..2c881efc 100644
--- a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html
@@ -123,7 +123,8 @@
<div wicket:id="acceptNewTickets"></div>
<div wicket:id="requireApproval"></div>
<div wicket:id="mergeTo"></div>
-
+ <div wicket:id="mergeType"></div>
+
</div>
<!-- federation -->
diff --git a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
index 355867b6..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;
@@ -56,6 +57,7 @@ import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.Constants.AuthorizationControl;
import com.gitblit.Constants.CommitMessageRenderer;
import com.gitblit.Constants.FederationStrategy;
+import com.gitblit.Constants.MergeType;
import com.gitblit.Constants.RegistrantType;
import com.gitblit.GitBlitException;
import com.gitblit.Keys;
@@ -368,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");
@@ -459,6 +463,11 @@ public class EditRepositoryPage extends RootSubPage {
getString("gb.mergeToDescription"),
new PropertyModel<String>(repositoryModel, "mergeTo"),
availableBranches));
+ form.add(new ChoiceOption<MergeType>("mergeType",
+ getString("gb.mergeType"),
+ getString("gb.mergeTypeDescription"),
+ new PropertyModel<MergeType>(repositoryModel, "mergeType"),
+ Arrays.asList(MergeType.values())));
//
// RECEIVE
@@ -703,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 25c24738..77d2236a 100644
--- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
@@ -1404,14 +1404,14 @@ public class TicketPage extends RepositoryPage {
boolean allowMerge;
if (repository.requireApproval) {
- // rpeository requires approval
+ // repository requires approval
allowMerge = ticket.isOpen() && ticket.isApproved(patchset);
} else {
- // vetos are binding
+ // vetoes are binding
allowMerge = ticket.isOpen() && !ticket.isVetoed(patchset);
}
- MergeStatus mergeStatus = JGitUtils.canMerge(getRepository(), patchset.tip, ticket.mergeTo);
+ MergeStatus mergeStatus = JGitUtils.canMerge(getRepository(), patchset.tip, ticket.mergeTo, repository.mergeType);
if (allowMerge) {
if (MergeStatus.MERGEABLE == mergeStatus) {
// patchset can be cleanly merged to integration branch OR has already been merged
@@ -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();