diff options
author | James Moger <james.moger@gitblit.com> | 2011-11-04 17:21:30 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-11-04 17:22:06 -0400 |
commit | 33d8d8b21c5586f1328c8c3e7f6049037ae5fd0d (patch) | |
tree | 63bb27e42dda5047704f3f66f99809ecb11f5016 /src/com/gitblit/wicket/panels | |
parent | b7646f8a02db486a08c9b2951966aa8fdaf0ba7a (diff) | |
download | gitblit-33d8d8b21c5586f1328c8c3e7f6049037ae5fd0d.tar.gz gitblit-33d8d8b21c5586f1328c8c3e7f6049037ae5fd0d.zip |
Moved SearchType enum to Constants
Diffstat (limited to 'src/com/gitblit/wicket/panels')
-rw-r--r-- | src/com/gitblit/wicket/panels/BasePanel.java | 8 | ||||
-rw-r--r-- | src/com/gitblit/wicket/panels/BranchesPanel.java | 6 | ||||
-rw-r--r-- | src/com/gitblit/wicket/panels/HistoryPanel.java | 6 | ||||
-rw-r--r-- | src/com/gitblit/wicket/panels/LogPanel.java | 6 | ||||
-rw-r--r-- | src/com/gitblit/wicket/panels/SearchPanel.java | 8 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/com/gitblit/wicket/panels/BasePanel.java b/src/com/gitblit/wicket/panels/BasePanel.java index 9dda03c2..8ea2a697 100644 --- a/src/com/gitblit/wicket/panels/BasePanel.java +++ b/src/com/gitblit/wicket/panels/BasePanel.java @@ -22,9 +22,9 @@ import org.apache.wicket.Component; import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;
+import com.gitblit.Constants;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
-import com.gitblit.utils.JGitUtils.SearchType;
import com.gitblit.wicket.GitBlitWebSession;
import com.gitblit.wicket.WicketUtils;
@@ -41,10 +41,10 @@ public abstract class BasePanel extends Panel { .getTimezone() : TimeZone.getDefault();
}
- protected void setPersonSearchTooltip(Component component, String value, SearchType searchType) {
- if (searchType.equals(SearchType.AUTHOR)) {
+ protected void setPersonSearchTooltip(Component component, String value, Constants.SearchType searchType) {
+ if (searchType.equals(Constants.SearchType.AUTHOR)) {
WicketUtils.setHtmlTooltip(component, getString("gb.searchForAuthor") + " " + value);
- } else if (searchType.equals(SearchType.COMMITTER)) {
+ } else if (searchType.equals(Constants.SearchType.COMMITTER)) {
WicketUtils.setHtmlTooltip(component, getString("gb.searchForCommitter") + " " + value);
}
}
diff --git a/src/com/gitblit/wicket/panels/BranchesPanel.java b/src/com/gitblit/wicket/panels/BranchesPanel.java index d45c0e62..6eb40199 100644 --- a/src/com/gitblit/wicket/panels/BranchesPanel.java +++ b/src/com/gitblit/wicket/panels/BranchesPanel.java @@ -29,11 +29,11 @@ import org.apache.wicket.markup.repeater.data.ListDataProvider; import org.apache.wicket.model.StringResourceModel;
import org.eclipse.jgit.lib.Repository;
+import com.gitblit.Constants;
import com.gitblit.SyndicationServlet;
import com.gitblit.models.RefModel;
import com.gitblit.models.RepositoryModel;
import com.gitblit.utils.JGitUtils;
-import com.gitblit.utils.JGitUtils.SearchType;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.pages.BranchesPage;
@@ -95,8 +95,8 @@ public class BranchesPanel extends BasePanel { String author = entry.getAuthorIdent().getName();
LinkPanel authorLink = new LinkPanel("branchAuthor", "list", author,
SearchPage.class, WicketUtils.newSearchParameter(model.name,
- entry.getName(), author, SearchType.AUTHOR));
- setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);
+ entry.getName(), author, Constants.SearchType.AUTHOR));
+ setPersonSearchTooltip(authorLink, author, Constants.SearchType.AUTHOR);
item.add(authorLink);
// short message
diff --git a/src/com/gitblit/wicket/panels/HistoryPanel.java b/src/com/gitblit/wicket/panels/HistoryPanel.java index 9ad407ca..16f95f22 100644 --- a/src/com/gitblit/wicket/panels/HistoryPanel.java +++ b/src/com/gitblit/wicket/panels/HistoryPanel.java @@ -30,13 +30,13 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
+import com.gitblit.Constants;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.models.PathModel;
import com.gitblit.models.PathModel.PathChangeModel;
import com.gitblit.models.RefModel;
import com.gitblit.utils.JGitUtils;
-import com.gitblit.utils.JGitUtils.SearchType;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.pages.BlobDiffPage;
@@ -109,8 +109,8 @@ public class HistoryPanel extends BasePanel { String author = entry.getAuthorIdent().getName();
LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author,
SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,
- author, SearchType.AUTHOR));
- setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);
+ author, Constants.SearchType.AUTHOR));
+ setPersonSearchTooltip(authorLink, author, Constants.SearchType.AUTHOR);
item.add(authorLink);
// merge icon
diff --git a/src/com/gitblit/wicket/panels/LogPanel.java b/src/com/gitblit/wicket/panels/LogPanel.java index 66fddd2c..90b6745f 100644 --- a/src/com/gitblit/wicket/panels/LogPanel.java +++ b/src/com/gitblit/wicket/panels/LogPanel.java @@ -29,11 +29,11 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
+import com.gitblit.Constants;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.models.RefModel;
import com.gitblit.utils.JGitUtils;
-import com.gitblit.utils.JGitUtils.SearchType;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.pages.CommitDiffPage;
@@ -100,8 +100,8 @@ public class LogPanel extends BasePanel { String author = entry.getAuthorIdent().getName();
LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author,
SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,
- author, SearchType.AUTHOR));
- setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);
+ author, Constants.SearchType.AUTHOR));
+ setPersonSearchTooltip(authorLink, author, Constants.SearchType.AUTHOR);
item.add(authorLink);
// merge icon
diff --git a/src/com/gitblit/wicket/panels/SearchPanel.java b/src/com/gitblit/wicket/panels/SearchPanel.java index d118790c..44b499b2 100644 --- a/src/com/gitblit/wicket/panels/SearchPanel.java +++ b/src/com/gitblit/wicket/panels/SearchPanel.java @@ -28,11 +28,11 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
+import com.gitblit.Constants;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.models.RefModel;
import com.gitblit.utils.JGitUtils;
-import com.gitblit.utils.JGitUtils.SearchType;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.pages.CommitDiffPage;
@@ -47,7 +47,7 @@ public class SearchPanel extends BasePanel { private boolean hasMore;
public SearchPanel(String wicketId, final String repositoryName, final String objectId,
- final String value, SearchType searchType, Repository r, int limit, int pageOffset) {
+ final String value, Constants.SearchType searchType, Repository r, int limit, int pageOffset) {
super(wicketId);
boolean pageResults = limit <= 0;
int itemsPerPage = GitBlit.getInteger(Keys.web.itemsPerPage, 50);
@@ -93,8 +93,8 @@ public class SearchPanel extends BasePanel { String author = entry.getAuthorIdent().getName();
LinkPanel authorLink = new LinkPanel("commitAuthor", "list", author,
SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,
- author, SearchType.AUTHOR));
- setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);
+ author, Constants.SearchType.AUTHOR));
+ setPersonSearchTooltip(authorLink, author, Constants.SearchType.AUTHOR);
item.add(authorLink);
// merge icon
|