summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Spielmann <martin.spielmann@pingunaut.com>2016-07-31 16:27:05 +0200
committerMartin Spielmann <martin.spielmann@pingunaut.com>2016-07-31 16:27:05 +0200
commit82a77de387c63fe44b4eee99c711fe5072cdfc9c (patch)
tree7936e1f33fe20bc5de28465079e55d042b192cfe
parent43366f57a1123c2ca80cb518b1819e434bc75371 (diff)
downloadgitblit-82a77de387c63fe44b4eee99c711fe5072cdfc9c.tar.gz
gitblit-82a77de387c63fe44b4eee99c711fe5072cdfc9c.zip
fix fragment markup loading #1
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ActivityPage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ComparePage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/DashboardPage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/DocPage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/DocsPage.java6
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditFilePage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditTicketPage.java10
-rw-r--r--src/main/java/com/gitblit/wicket/pages/MyDashboardPage.java4
-rw-r--r--src/main/java/com/gitblit/wicket/pages/NewTicketPage.java8
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RepositoryPage.java26
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RootPage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SummaryPage.java2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketPage.java50
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketsPage.java12
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TreePage.java6
-rw-r--r--src/main/java/com/gitblit/wicket/pages/UserPage.java6
-rw-r--r--src/main/java/com/gitblit/wicket/panels/AccessPolicyPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BranchesPanel.java4
-rw-r--r--src/main/java/com/gitblit/wicket/panels/HistoryPanel.java6
-rw-r--r--src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java14
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java22
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TagsPanel.java6
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TeamsPanel.java4
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TicketListPanel.java2
-rw-r--r--src/main/java/com/gitblit/wicket/panels/UsersPanel.java4
25 files changed, 106 insertions, 106 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/ActivityPage.java b/src/main/java/com/gitblit/wicket/pages/ActivityPage.java
index f7c8ccf1..82e64c15 100644
--- a/src/main/java/com/gitblit/wicket/pages/ActivityPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ActivityPage.java
@@ -118,7 +118,7 @@ public class ActivityPage extends RootPage {
if (app().settings().getBoolean(Keys.web.generateActivityGraph, true)) {
Charts charts = createCharts(recentActivity);
add(charts);
- add(new Fragment("chartsPanel", "chartsFragment", this));
+ add(new Fragment("chartsPanel", "chartsFragment", ActivityPage.this));
} else {
add(new Label("chartsPanel").setVisible(false));
}
diff --git a/src/main/java/com/gitblit/wicket/pages/ComparePage.java b/src/main/java/com/gitblit/wicket/pages/ComparePage.java
index bbf866c0..98c5abc8 100644
--- a/src/main/java/com/gitblit/wicket/pages/ComparePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ComparePage.java
@@ -84,7 +84,7 @@ public class ComparePage extends RepositoryPage {
add(new Label("comparison").setVisible(false));
} else {
// active comparison
- Fragment comparison = new Fragment("comparison", "comparisonFragment", this);
+ Fragment comparison = new Fragment("comparison", "comparisonFragment", ComparePage.this);
add(comparison);
RevCommit fromCommit;
diff --git a/src/main/java/com/gitblit/wicket/pages/DashboardPage.java b/src/main/java/com/gitblit/wicket/pages/DashboardPage.java
index 0b247334..51a73f95 100644
--- a/src/main/java/com/gitblit/wicket/pages/DashboardPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/DashboardPage.java
@@ -88,7 +88,7 @@ public abstract class DashboardPage extends RootPage {
}
}
- Fragment activityFragment = new Fragment("activity", "activityFragment", this);
+ Fragment activityFragment = new Fragment("activity", "activityFragment", DashboardPage.this);
add(activityFragment);
activityFragment.add(new Label("feedTitle", feedTitle));
if (digests.size() == 0) {
@@ -240,7 +240,7 @@ public abstract class DashboardPage extends RootPage {
charts.addChart(chart);
add(charts);
- frag.add(new Fragment("charts", "chartsFragment", this));
+ frag.add(new Fragment("charts", "chartsFragment", DashboardPage.this));
} else {
frag.add(new Label("charts").setVisible(false));
}
diff --git a/src/main/java/com/gitblit/wicket/pages/DocPage.java b/src/main/java/com/gitblit/wicket/pages/DocPage.java
index 0ff50a85..5b365c46 100644
--- a/src/main/java/com/gitblit/wicket/pages/DocPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/DocPage.java
@@ -83,9 +83,9 @@ public class DocPage extends RepositoryPage {
Fragment fragment;
MarkupDocument markupDoc = processor.parse(repositoryName, getBestCommitId(commit), documentPath, markupText);
if (MarkupSyntax.PLAIN.equals(markupDoc.syntax)) {
- fragment = new Fragment("doc", "plainContent", this);
+ fragment = new Fragment("doc", "plainContent", DocPage.this);
} else {
- fragment = new Fragment("doc", "markupContent", this);
+ fragment = new Fragment("doc", "markupContent", DocPage.this);
}
// document page links
diff --git a/src/main/java/com/gitblit/wicket/pages/DocsPage.java b/src/main/java/com/gitblit/wicket/pages/DocsPage.java
index 00144454..2345b907 100644
--- a/src/main/java/com/gitblit/wicket/pages/DocsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/DocsPage.java
@@ -71,11 +71,11 @@ public class DocsPage extends RepositoryPage {
Fragment fragment = null;
if (roots.isEmpty()) {
// no identified root documents
- fragment = new Fragment("docs", "noIndexFragment", this);
+ fragment = new Fragment("docs", "noIndexFragment", DocsPage.this);
setResponsePage(NoDocsPage.class, params);
} else {
// root documents, use tabbed ui of index/root and document list
- fragment = new Fragment("docs", "tabsFragment", this);
+ fragment = new Fragment("docs", "tabsFragment", DocsPage.this);
ListDataProvider<MarkupDocument> docDp = new ListDataProvider<MarkupDocument>(roots);
// tab titles
@@ -143,7 +143,7 @@ public class DocsPage extends RepositoryPage {
// document list
final ByteFormat byteFormat = new ByteFormat();
- Fragment docs = new Fragment("documents", "documentsFragment", this);
+ Fragment docs = new Fragment("documents", "documentsFragment", DocsPage.this);
ListDataProvider<PathModel> pathsDp = new ListDataProvider<PathModel>(paths);
DataView<PathModel> pathsView = new DataView<PathModel>("document", pathsDp) {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/com/gitblit/wicket/pages/EditFilePage.java b/src/main/java/com/gitblit/wicket/pages/EditFilePage.java
index bee642df..86d20d09 100644
--- a/src/main/java/com/gitblit/wicket/pages/EditFilePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditFilePage.java
@@ -103,7 +103,7 @@ public class EditFilePage extends RepositoryPage {
final Model<String> commitMessage = new Model<String>("Document update");
final Model<String> commitIdAtLoad = new Model<String>(displayedCommitId);
- fragment = new Fragment("doc", "markupContent", this);
+ fragment = new Fragment("doc", "markupContent", EditFilePage.this);
Form<Void> form = new Form<Void>("documentEditor") {
@@ -182,7 +182,7 @@ public class EditFilePage extends RepositoryPage {
MarkupDocument markupDoc = processor.parse(repositoryName, displayedCommitId, documentPath, markupText);
final Model<String> documentContent = new Model<String>(markupDoc.html);
- fragment = new Fragment("doc", "plainContent", this);
+ fragment = new Fragment("doc", "plainContent", EditFilePage.this);
fragment.add(new Label("content", documentContent).setEscapeModelStrings(false));
}
diff --git a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
index cacdc4ab..8cc2c611 100644
--- a/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditTicketPage.java
@@ -163,7 +163,7 @@ public class EditTicketPage extends RepositoryPage {
} else {
statusChoices = Arrays.asList(TicketModel.Status.requestWorkflow);
}
- Fragment status = new Fragment("status", "statusFragment", this);
+ Fragment status = new Fragment("status", "statusFragment", EditTicketPage.this);
status.add(new DropDownChoice<TicketModel.Status>("status", statusModel, statusChoices));
form.add(status);
@@ -200,7 +200,7 @@ public class EditTicketPage extends RepositoryPage {
}
Collections.sort(responsibles);
responsibles.add(new TicketResponsible(NIL, "", ""));
- Fragment responsible = new Fragment("responsible", "responsibleFragment", this);
+ Fragment responsible = new Fragment("responsible", "responsibleFragment", EditTicketPage.this);
responsible.add(new DropDownChoice<TicketResponsible>("responsible", responsibleModel, responsibles));
form.add(responsible.setVisible(!responsibles.isEmpty()));
@@ -224,12 +224,12 @@ public class EditTicketPage extends RepositoryPage {
}
// milestone
- Fragment milestone = new Fragment("milestone", "milestoneFragment", this);
+ Fragment milestone = new Fragment("milestone", "milestoneFragment", EditTicketPage.this);
milestone.add(new DropDownChoice<TicketMilestone>("milestone", milestoneModel, milestones));
form.add(milestone.setVisible(!milestones.isEmpty()));
// priority
- Fragment priority = new Fragment("priority", "priorityFragment", this);
+ Fragment priority = new Fragment("priority", "priorityFragment", EditTicketPage.this);
List<TicketModel.Priority> priorityChoices = Arrays.asList(TicketModel.Priority.choices());
priority.add(new DropDownChoice<TicketModel.Priority>("priority", priorityModel, priorityChoices));
form.add(priority);
@@ -245,7 +245,7 @@ public class EditTicketPage extends RepositoryPage {
branches.remove(Repository.shortenRefName(getRepositoryModel().mergeTo));
branches.add(0, Repository.shortenRefName(getRepositoryModel().mergeTo));
- Fragment mergeto = new Fragment("mergeto", "mergeToFragment", this);
+ Fragment mergeto = new Fragment("mergeto", "mergeToFragment", EditTicketPage.this);
mergeto.add(new DropDownChoice<String>("mergeto", mergeToModel, branches));
form.add(mergeto.setVisible(!branches.isEmpty()));
} else {
diff --git a/src/main/java/com/gitblit/wicket/pages/MyDashboardPage.java b/src/main/java/com/gitblit/wicket/pages/MyDashboardPage.java
index ee24b6a9..4f34e5da 100644
--- a/src/main/java/com/gitblit/wicket/pages/MyDashboardPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/MyDashboardPage.java
@@ -159,9 +159,9 @@ public class MyDashboardPage extends DashboardPage {
Fragment repositoryTabs;
if (UserModel.ANONYMOUS.equals(user)) {
- repositoryTabs = new Fragment("repositoryTabs", "anonymousTabsFragment", this);
+ repositoryTabs = new Fragment("repositoryTabs", "anonymousTabsFragment", MyDashboardPage.this);
} else {
- repositoryTabs = new Fragment("repositoryTabs", "authenticatedTabsFragment", this);
+ repositoryTabs = new Fragment("repositoryTabs", "authenticatedTabsFragment", MyDashboardPage.this);
}
add(repositoryTabs);
diff --git a/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java b/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java
index 5092e66f..1fd5839d 100644
--- a/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/NewTicketPage.java
@@ -149,18 +149,18 @@ public class NewTicketPage extends RepositoryPage {
}
}
Collections.sort(responsibles);
- Fragment responsible = new Fragment("responsible", "responsibleFragment", this);
+ Fragment responsible = new Fragment("responsible", "responsibleFragment", NewTicketPage.this);
responsible.add(new DropDownChoice<TicketResponsible>("responsible", responsibleModel, responsibles));
form.add(responsible.setVisible(!responsibles.isEmpty()));
// milestone
List<TicketMilestone> milestones = app().tickets().getMilestones(getRepositoryModel(), Status.Open);
- Fragment milestone = new Fragment("milestone", "milestoneFragment", this);
+ Fragment milestone = new Fragment("milestone", "milestoneFragment", NewTicketPage.this);
milestone.add(new DropDownChoice<TicketMilestone>("milestone", milestoneModel, milestones));
form.add(milestone.setVisible(!milestones.isEmpty()));
// priority
- Fragment priority = new Fragment("priority", "priorityFragment", this);
+ Fragment priority = new Fragment("priority", "priorityFragment", NewTicketPage.this);
priority.add(new DropDownChoice<TicketModel.Priority>("priority", priorityModel, Arrays.asList(TicketModel.Priority.choices())));
form.add(priority);
@@ -175,7 +175,7 @@ public class NewTicketPage extends RepositoryPage {
branches.remove(Repository.shortenRefName(getRepositoryModel().HEAD));
branches.add(0, Repository.shortenRefName(getRepositoryModel().HEAD));
- Fragment mergeto = new Fragment("mergeto", "mergeToFragment", this);
+ Fragment mergeto = new Fragment("mergeto", "mergeToFragment", NewTicketPage.this);
mergeto.add(new DropDownChoice<String>("mergeto", mergeToModel, branches));
form.add(mergeto.setVisible(!branches.isEmpty()));
} else {
diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
index 504d83c1..00d75590 100644
--- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
@@ -305,16 +305,16 @@ public abstract class RepositoryPage extends RootPage {
RepositoryModel model = getRepositoryModel();
if (StringUtils.isEmpty(model.originRepository)) {
if (model.isMirror) {
- add(new Fragment("repoIcon", "mirrorIconFragment", this));
- Fragment mirrorFrag = new Fragment("originRepository", "mirrorFragment", this);
+ add(new Fragment("repoIcon", "mirrorIconFragment", RepositoryPage.this));
+ Fragment mirrorFrag = new Fragment("originRepository", "mirrorFragment", RepositoryPage.this);
Label lbl = new Label("originRepository", MessageFormat.format(getString("gb.mirrorOf"), "<b>" + model.origin + "</b>"));
mirrorFrag.add(lbl.setEscapeModelStrings(false));
add(mirrorFrag);
} else {
if (model.isBare) {
- add(new Fragment("repoIcon", "repoIconFragment", this));
+ add(new Fragment("repoIcon", "repoIconFragment", RepositoryPage.this));
} else {
- add(new Fragment("repoIcon", "cloneIconFragment", this));
+ add(new Fragment("repoIcon", "cloneIconFragment", RepositoryPage.this));
}
add(new Label("originRepository", Optional.of(model.description).or("")));
}
@@ -323,21 +323,21 @@ public abstract class RepositoryPage extends RootPage {
if (origin == null) {
// no origin repository, show description if available
if (model.isBare) {
- add(new Fragment("repoIcon", "repoIconFragment", this));
+ add(new Fragment("repoIcon", "repoIconFragment", RepositoryPage.this));
} else {
- add(new Fragment("repoIcon", "cloneIconFragment", this));
+ add(new Fragment("repoIcon", "cloneIconFragment", RepositoryPage.this));
}
add(new Label("originRepository", Optional.of(model.description).or("")));
} else if (!user.canView(origin)) {
// show origin repository without link
- add(new Fragment("repoIcon", "forkIconFragment", this));
- Fragment forkFrag = new Fragment("originRepository", "originFragment", this);
+ add(new Fragment("repoIcon", "forkIconFragment", RepositoryPage.this));
+ Fragment forkFrag = new Fragment("originRepository", "originFragment", RepositoryPage.this);
forkFrag.add(new Label("originRepository", StringUtils.stripDotGit(model.originRepository)));
add(forkFrag);
} else {
// link to origin repository
- add(new Fragment("repoIcon", "forkIconFragment", this));
- Fragment forkFrag = new Fragment("originRepository", "originFragment", this);
+ add(new Fragment("repoIcon", "forkIconFragment", RepositoryPage.this));
+ Fragment forkFrag = new Fragment("originRepository", "originFragment", RepositoryPage.this);
forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(model.originRepository),
SummaryPage.class, WicketUtils.newRepositoryParameter(model.originRepository)));
add(forkFrag);
@@ -415,7 +415,7 @@ public abstract class RepositoryPage extends RootPage {
}
protected void addToolbarButton(String wicketId, String iconClass, String label, String url) {
- Fragment button = new Fragment(wicketId, "toolbarLinkFragment", this);
+ Fragment button = new Fragment(wicketId, "toolbarLinkFragment", RepositoryPage.this);
Label icon = new Label("icon");
WicketUtils.setCssClass(icon, iconClass);
button.add(icon);
@@ -621,14 +621,14 @@ public abstract class RepositoryPage extends RootPage {
value = getString("gb.missingUsername");
}
}
- Fragment partial = new Fragment(wicketId, "partialPersonIdent", this);
+ Fragment partial = new Fragment(wicketId, "partialPersonIdent", RepositoryPage.this);
LinkPanel link = new LinkPanel("personName", "list", value, GitSearchPage.class,
WicketUtils.newSearchParameter(repositoryName, objectId, value, searchType));
setPersonSearchTooltip(link, value, searchType);
partial.add(link);
return partial;
} else {
- Fragment fullPerson = new Fragment(wicketId, "fullPersonIdent", this);
+ Fragment fullPerson = new Fragment(wicketId, "fullPersonIdent", RepositoryPage.this);
LinkPanel nameLink = new LinkPanel("personName", "list", name, GitSearchPage.class,
WicketUtils.newSearchParameter(repositoryName, objectId, name, searchType));
setPersonSearchTooltip(nameLink, name, searchType);
diff --git a/src/main/java/com/gitblit/wicket/pages/RootPage.java b/src/main/java/com/gitblit/wicket/pages/RootPage.java
index 455dd417..0d802816 100644
--- a/src/main/java/com/gitblit/wicket/pages/RootPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RootPage.java
@@ -692,7 +692,7 @@ public abstract class RootPage extends BasePage {
* @return a submenu fragment
*/
private Fragment newSubmenu(String wicketId, String submenuTitle, List<MenuItem> menuItems) {
- Fragment submenu = new Fragment(wicketId, "submenuFragment", this);
+ Fragment submenu = new Fragment(wicketId, "submenuFragment", RootPage.this);
submenu.add(new Label("submenuTitle", submenuTitle).setRenderBodyOnly(true));
ListDataProvider<MenuItem> menuItemsDp = new ListDataProvider<MenuItem>(menuItems);
DataView<MenuItem> submenuItems = new DataView<MenuItem>("submenuItem", menuItemsDp) {
diff --git a/src/main/java/com/gitblit/wicket/pages/SummaryPage.java b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
index 43f9c450..485f4d0a 100644
--- a/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
@@ -143,7 +143,7 @@ public class SummaryPage extends RepositoryPage {
if (markupDoc == null || markupDoc.markup == null) {
add(new Label("readme").setVisible(false));
} else {
- Fragment fragment = new Fragment("readme", MarkupSyntax.PLAIN.equals(markupDoc.syntax) ? "plaintextPanel" : "markdownPanel", this);
+ Fragment fragment = new Fragment("readme", MarkupSyntax.PLAIN.equals(markupDoc.syntax) ? "plaintextPanel" : "markdownPanel", SummaryPage.this);
fragment.add(new Label("readmeFile", markupDoc.documentPath));
// Add the html to the page
Component content = new Label("readmeContent", markupDoc.html).setEscapeModelStrings(false);
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
index 3ce5484e..25c24738 100644
--- a/src/main/java/com/gitblit/wicket/pages/TicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
@@ -274,7 +274,7 @@ public class TicketPage extends RepositoryPage {
closed = tm.getClosedTickets();
}
- Fragment milestoneProgress = new Fragment("milestone", "milestoneProgressFragment", this);
+ Fragment milestoneProgress = new Fragment("milestone", "milestoneProgressFragment", TicketPage.this);
milestoneProgress.add(new LinkPanel("link", null, ticket.milestone, TicketsPage.class, milestoneParameters));
Label label = new Label("progress");
WicketUtils.setCssStyle(label, "width:" + progress + "%;");
@@ -333,7 +333,7 @@ public class TicketPage extends RepositoryPage {
/*
* LARGE STATUS INDICATOR WITH ICON (DISCUSSION TAB->SIDE BAR)
*/
- Fragment ticketStatus = new Fragment("ticketStatus", "ticketStatusFragment", this);
+ Fragment ticketStatus = new Fragment("ticketStatus", "ticketStatusFragment", TicketPage.this);
Label ticketIcon = TicketsUI.getStateIcon("ticketIcon", ticket);
ticketStatus.add(ticketIcon);
ticketStatus.add(new Label("ticketStatus", ticket.status.toString()));
@@ -349,7 +349,7 @@ public class TicketPage extends RepositoryPage {
/*
* OPEN TICKET
*/
- Fragment controls = new Fragment("controls", "openControlsFragment", this);
+ Fragment controls = new Fragment("controls", "openControlsFragment", TicketPage.this);
/*
* STATUS
@@ -509,7 +509,7 @@ public class TicketPage extends RepositoryPage {
/*
* CLOSED TICKET
*/
- Fragment controls = new Fragment("controls", "closedControlsFragment", this);
+ Fragment controls = new Fragment("controls", "closedControlsFragment", TicketPage.this);
String editHref = urlFor(EditTicketPage.class, params).toString();
controls.add(new ExternalLink("editLink", editHref, getString("gb.edit")));
@@ -648,7 +648,7 @@ public class TicketPage extends RepositoryPage {
if (comments.size() == 0) {
add(new Label("discussion").setVisible(false));
} else {
- Fragment discussionFragment = new Fragment("discussion", "discussionFragment", this);
+ Fragment discussionFragment = new Fragment("discussion", "discussionFragment", TicketPage.this);
ListDataProvider<Change> discussionDp = new ListDataProvider<Change>(discussion);
DataView<Change> discussionView = new DataView<Change>("discussion", discussionDp) {
private static final long serialVersionUID = 1L;
@@ -681,7 +681,7 @@ public class TicketPage extends RepositoryPage {
commitLink = mergedPatch.toString();
}
- Fragment mergeFragment = new Fragment("entry", "mergeFragment", this);
+ Fragment mergeFragment = new Fragment("entry", "mergeFragment", TicketPage.this);
mergeFragment.add(new LinkPanel("commitLink", null, commitLink,
CommitPage.class, WicketUtils.newObjectParameter(repositoryName, resolvedBy)));
mergeFragment.add(new Label("toBranch", MessageFormat.format(getString("gb.toBranch"),
@@ -694,7 +694,7 @@ public class TicketPage extends RepositoryPage {
/*
* STATUS CHANGE
*/
- Fragment frag = new Fragment("entry", "statusFragment", this);
+ Fragment frag = new Fragment("entry", "statusFragment", TicketPage.this);
Label status = new Label("statusChange", entry.getStatus().toString());
String css = TicketsUI.getLozengeClass(entry.getStatus(), false);
WicketUtils.setCssClass(status, css);
@@ -709,7 +709,7 @@ public class TicketPage extends RepositoryPage {
String bugtraq = bugtraqProcessor().processText(getRepository(), repositoryName, entry.comment.text);
String comment = MarkdownUtils.transformGFM(app().settings(), bugtraq, repositoryName);
String safeComment = app().xssFilter().relaxed(comment);
- Fragment frag = new Fragment("entry", "commentFragment", this);
+ Fragment frag = new Fragment("entry", "commentFragment", TicketPage.this);
Label commentIcon = new Label("commentIcon");
if (entry.comment.src == CommentSource.Email) {
WicketUtils.setCssClass(commentIcon, "iconic-mail");
@@ -741,7 +741,7 @@ public class TicketPage extends RepositoryPage {
add(new Label("newComment").setVisible(false));
} else {
// permit user to comment
- Fragment newComment = new Fragment("newComment", "newCommentFragment", this);
+ Fragment newComment = new Fragment("newComment", "newCommentFragment", TicketPage.this);
AvatarImage img = new AvatarImage("newCommentAvatar", user.username, user.emailAddress,
"gravatar-round", avatarWidth, true);
newComment.add(img);
@@ -762,7 +762,7 @@ public class TicketPage extends RepositoryPage {
if (ticket.isOpen() && app().tickets().isAcceptingNewPatchsets(repository) && canPropose) {
// ticket & repo will accept a proposal patchset
// show the instructions for proposing a patchset
- Fragment changeIdFrag = new Fragment("patchset", "proposeFragment", this);
+ Fragment changeIdFrag = new Fragment("patchset", "proposeFragment", TicketPage.this);
changeIdFrag.add(new Label("proposeInstructions", MarkdownUtils.transformMarkdown(getString("gb.proposeInstructions"))).setEscapeModelStrings(false));
changeIdFrag.add(new Label("ptWorkflow", MessageFormat.format(getString("gb.proposeWith"), "Barnum")));
changeIdFrag.add(new Label("ptWorkflowSteps", getProposeWorkflow("propose_pt.md", repoUrl.url, ticket.number)).setEscapeModelStrings(false));
@@ -771,7 +771,7 @@ public class TicketPage extends RepositoryPage {
add(changeIdFrag);
} else {
// explain why you can't propose a patchset
- Fragment fragment = new Fragment("patchset", "canNotProposeFragment", this);
+ Fragment fragment = new Fragment("patchset", "canNotProposeFragment", TicketPage.this);
String reason = "";
if (ticket.isClosed()) {
reason = getString("gb.ticketIsClosed");
@@ -795,7 +795,7 @@ public class TicketPage extends RepositoryPage {
}
} else {
// show current patchset
- Fragment patchsetFrag = new Fragment("patchset", "patchsetFragment", this);
+ Fragment patchsetFrag = new Fragment("patchset", "patchsetFragment", TicketPage.this);
patchsetFrag.add(new Label("commitsInPatchset", MessageFormat.format(getString("gb.commitsInPatchsetN"), currentPatchset.number)));
patchsetFrag.add(createMergePanel(user, repository));
@@ -842,7 +842,7 @@ public class TicketPage extends RepositoryPage {
/*
* ACTIVITY TAB
*/
- Fragment revisionHistory = new Fragment("activity", "activityFragment", this);
+ Fragment revisionHistory = new Fragment("activity", "activityFragment", TicketPage.this);
List<Change> events = new ArrayList<Change>(ticket.changes);
Collections.sort(events);
Collections.reverse(events);
@@ -1090,7 +1090,7 @@ public class TicketPage extends RepositoryPage {
patchsets.remove(currentPatchset);
Collections.reverse(patchsets);
- Fragment panel = new Fragment(wicketId, "collapsiblePatchsetFragment", this);
+ Fragment panel = new Fragment(wicketId, "collapsiblePatchsetFragment", TicketPage.this);
// patchset header
String ps = "<b>" + currentPatchset.number + "</b>";
@@ -1167,7 +1167,7 @@ public class TicketPage extends RepositoryPage {
}
// user can review, add review controls
- Fragment reviewControls = new Fragment("reviewControls", "reviewControlsFragment", this);
+ Fragment reviewControls = new Fragment("reviewControls", "reviewControlsFragment", TicketPage.this);
// show "approve" button if no review OR not current score
if (user.canApprovePatchset(repository) && (myReview == null || Score.approved != myReview.score)) {
@@ -1415,7 +1415,7 @@ public class TicketPage extends RepositoryPage {
if (allowMerge) {
if (MergeStatus.MERGEABLE == mergeStatus) {
// patchset can be cleanly merged to integration branch OR has already been merged
- Fragment mergePanel = new Fragment("mergePanel", "mergeableFragment", this);
+ Fragment mergePanel = new Fragment("mergePanel", "mergeableFragment", TicketPage.this);
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetMergeable"), ticket.mergeTo)));
if (user.canPush(repository)) {
// user can merge locally
@@ -1482,18 +1482,18 @@ public class TicketPage extends RepositoryPage {
return mergePanel;
} else if (MergeStatus.ALREADY_MERGED == mergeStatus) {
// patchset already merged
- Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", this);
+ Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", TicketPage.this);
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetAlreadyMerged"), ticket.mergeTo)));
return mergePanel;
} else if (MergeStatus.MISSING_INTEGRATION_BRANCH == mergeStatus) {
// target/integration branch is missing
- Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", this);
+ Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", TicketPage.this);
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotMergeable"), ticket.mergeTo)));
mergePanel.add(new Label("mergeMore", MessageFormat.format(getString("gb.missingIntegrationBranchMore"), ticket.mergeTo)));
return mergePanel;
} else {
// patchset can not be cleanly merged
- Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", this);
+ Fragment mergePanel = new Fragment("mergePanel", "notMergeableFragment", TicketPage.this);
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotMergeable"), ticket.mergeTo)));
if (user.canPush(repository)) {
// user can merge locally
@@ -1508,17 +1508,17 @@ public class TicketPage extends RepositoryPage {
// merge not allowed
if (MergeStatus.ALREADY_MERGED == mergeStatus) {
// patchset already merged
- Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", this);
+ Fragment mergePanel = new Fragment("mergePanel", "alreadyMergedFragment", TicketPage.this);
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetAlreadyMerged"), ticket.mergeTo)));
return mergePanel;
} else if (ticket.isVetoed(patchset)) {
// patchset has been vetoed
- Fragment mergePanel = new Fragment("mergePanel", "vetoedFragment", this);
+ Fragment mergePanel = new Fragment("mergePanel", "vetoedFragment", TicketPage.this);
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotMergeable"), ticket.mergeTo)));
return mergePanel;
} else if (repository.requireApproval) {
// patchset has been not been approved for merge
- Fragment mergePanel = new Fragment("mergePanel", "notApprovedFragment", this);
+ Fragment mergePanel = new Fragment("mergePanel", "notApprovedFragment", TicketPage.this);
mergePanel.add(new Label("mergeTitle", MessageFormat.format(getString("gb.patchsetNotApproved"), ticket.mergeTo)));
mergePanel.add(new Label("mergeMore", MessageFormat.format(getString("gb.patchsetNotApprovedMore"), ticket.mergeTo)));
return mergePanel;
@@ -1530,7 +1530,7 @@ public class TicketPage extends RepositoryPage {
}
protected Component getMergeInstructions(UserModel user, RepositoryModel repository, String markupId, String infoKey) {
- Fragment cmd = new Fragment(markupId, "commandlineMergeFragment", this);
+ Fragment cmd = new Fragment(markupId, "commandlineMergeFragment", TicketPage.this);
cmd.add(new Label("instructions", MessageFormat.format(getString(infoKey), ticket.mergeTo)));
// git instructions
@@ -1639,7 +1639,7 @@ public class TicketPage extends RepositoryPage {
protected Fragment createCopyFragment(String wicketId, String text) {
if (app().settings().getBoolean(Keys.web.allowFlashCopyToClipboard, true)) {
// clippy: flash-based copy & paste
- Fragment copyFragment = new Fragment(wicketId, "clippyPanel", this);
+ Fragment copyFragment = new Fragment(wicketId, "clippyPanel", TicketPage.this);
String baseUrl = WicketUtils.getGitblitURL(getRequest());
ShockWaveComponent clippy = new ShockWaveComponent("clippy", baseUrl + "/clippy.swf");
clippy.setValue("flashVars", "text=" + StringUtils.encodeURL(text));
@@ -1647,7 +1647,7 @@ public class TicketPage extends RepositoryPage {
return copyFragment;
} else {
// javascript: manual copy & paste with modal browser prompt dialog
- Fragment copyFragment = new Fragment(wicketId, "jsPanel", this);
+ 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));
copyFragment.add(img);
diff --git a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
index 15dfe0e8..560cd40d 100644
--- a/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
@@ -165,10 +165,10 @@ public class TicketsPage extends RepositoryPage {
Fragment milestonePanel;
if (currentMilestone == null) {
- milestonePanel = new Fragment("milestonePanel", "noMilestoneFragment", this);
+ milestonePanel = new Fragment("milestonePanel", "noMilestoneFragment", TicketsPage.this);
add(milestonePanel);
} else {
- milestonePanel = new Fragment("milestonePanel", "milestoneProgressFragment", this);
+ milestonePanel = new Fragment("milestonePanel", "milestoneProgressFragment", TicketsPage.this);
milestonePanel.add(new Label("currentMilestone", currentMilestone.name));
if (currentMilestone.due == null) {
milestonePanel.add(new Label("currentDueDate", getString("gb.notSpecified")));
@@ -194,7 +194,7 @@ public class TicketsPage extends RepositoryPage {
add(milestonePanel);
}
- Fragment milestoneDropdown = new Fragment("milestoneDropdown", "milestoneDropdownFragment", this);
+ Fragment milestoneDropdown = new Fragment("milestoneDropdown", "milestoneDropdownFragment", TicketsPage.this);
PageParameters resetMilestone = queryParameters(queryParam, null, statiiParam, assignedToParam, sortBy, desc, 1);
milestoneDropdown.add(new BookmarkablePageLink<Void>("resetMilestone", TicketsPage.class, resetMilestone));
@@ -354,7 +354,7 @@ public class TicketsPage extends RepositoryPage {
if (dynamicQueries.size() == 0) {
add(new Label("dynamicQueries").setVisible(false));
} else {
- Fragment fragment = new Fragment("dynamicQueries", "dynamicQueriesFragment", this);
+ Fragment fragment = new Fragment("dynamicQueries", "dynamicQueriesFragment", TicketsPage.this);
ListDataProvider<TicketQuery> dynamicQueriesDp = new ListDataProvider<TicketQuery>(new ArrayList<TicketQuery>(dynamicQueries));
DataView<TicketQuery> dynamicQueriesList = new DataView<TicketQuery>("dynamicQuery", dynamicQueriesDp) {
private static final long serialVersionUID = 1L;
@@ -547,7 +547,7 @@ public class TicketsPage extends RepositoryPage {
@Override
public void populateItem(final Item<TicketMilestone> item) {
- Fragment entryPanel = new Fragment("entryPanel", "milestoneListFragment", this);
+ Fragment entryPanel = new Fragment("entryPanel", "milestoneListFragment", TicketsPage.this);
item.add(entryPanel);
final TicketMilestone tm = item.getModelObject();
@@ -595,7 +595,7 @@ public class TicketsPage extends RepositoryPage {
// re-load milestone with query results
TicketMilestone m = app().tickets().getMilestone(getRepositoryModel(), tm.name);
- Fragment milestonePanel = new Fragment("milestonePanel", "openMilestoneFragment", this);
+ Fragment milestonePanel = new Fragment("milestonePanel", "openMilestoneFragment", TicketsPage.this);
Label label = new Label("progress");
WicketUtils.setCssStyle(label, "width:" + m.getProgress() + "%;");
milestonePanel.add(label);
diff --git a/src/main/java/com/gitblit/wicket/pages/TreePage.java b/src/main/java/com/gitblit/wicket/pages/TreePage.java
index 79b7460e..98bb1d7a 100644
--- a/src/main/java/com/gitblit/wicket/pages/TreePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TreePage.java
@@ -120,7 +120,7 @@ public class TreePage extends RepositoryPage {
WicketUtils.newPathParameter(repositoryName, id, entry.path)));
// links
- Fragment links = new Fragment("pathLinks", "treeLinks", this);
+ Fragment links = new Fragment("pathLinks", "treeLinks", TreePage.this);
links.add(new BookmarkablePageLink<Void>("tree", TreePage.class,
WicketUtils.newPathParameter(repositoryName, id, entry.path)));
links.add(new BookmarkablePageLink<Void>("history", HistoryPage.class,
@@ -144,7 +144,7 @@ public class TreePage extends RepositoryPage {
TreePage.class, WicketUtils.newPathParameter(submodulePath, submoduleId, ""))
.setEnabled(hasSubmodule));
- Fragment links = new Fragment("pathLinks", "submoduleLinks", this);
+ Fragment links = new Fragment("pathLinks", "submoduleLinks", TreePage.this);
links.add(new BookmarkablePageLink<Void>("view", SummaryPage.class,
WicketUtils.newRepositoryParameter(submodulePath)).setEnabled(hasSubmodule));
links.add(new BookmarkablePageLink<Void>("tree", TreePage.class,
@@ -167,7 +167,7 @@ public class TreePage extends RepositoryPage {
item.add(new Label("pathSize", byteFormat.format(entry.size)));
// links
- Fragment links = new Fragment("pathLinks", "blobLinks", this);
+ Fragment links = new Fragment("pathLinks", "blobLinks", TreePage.this);
if (entry.isFilestoreItem()) {
item.add(new LinkPanel("pathName", "list", displayPath, new Link<Object>("link", null) {
diff --git a/src/main/java/com/gitblit/wicket/pages/UserPage.java b/src/main/java/com/gitblit/wicket/pages/UserPage.java
index 284970ff..b37e75d8 100644
--- a/src/main/java/com/gitblit/wicket/pages/UserPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/UserPage.java
@@ -301,17 +301,17 @@ public class UserPage extends RootPage {
// add the preferences tab
add(new Fragment("preferencesLink", "preferencesLinkFragment", this).setRenderBodyOnly(true));
- Fragment fragment = new Fragment("preferencesTab", "preferencesTabFragment", this);
+ Fragment fragment = new Fragment("preferencesTab", "preferencesTabFragment", UserPage.this);
fragment.add(prefs);
add(fragment.setRenderBodyOnly(true));
}
private void addSshKeys(final UserModel user) {
- Fragment keysTab = new Fragment("sshKeysTab", "sshKeysTabFragment", this);
+ Fragment keysTab = new Fragment("sshKeysTab", "sshKeysTabFragment", UserPage.this);
keysTab.add(new SshKeysPanel("sshKeysPanel", user));
// add the SSH keys tab
- add(new Fragment("sshKeysLink", "sshKeysLinkFragment", this).setRenderBodyOnly(true));
+ add(new Fragment("sshKeysLink", "sshKeysLinkFragment", UserPage.this).setRenderBodyOnly(true));
add(keysTab.setRenderBodyOnly(true));
}
diff --git a/src/main/java/com/gitblit/wicket/panels/AccessPolicyPanel.java b/src/main/java/com/gitblit/wicket/panels/AccessPolicyPanel.java
index 2c880247..25895ec8 100644
--- a/src/main/java/com/gitblit/wicket/panels/AccessPolicyPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/AccessPolicyPanel.java
@@ -145,7 +145,7 @@ public class AccessPolicyPanel extends BasePanel {
add(policiesGroup);
if (app().settings().getBoolean(Keys.web.allowForking, true)) {
- Fragment fragment = new Fragment("allowForks", "allowForksFragment", this);
+ Fragment fragment = new Fragment("allowForks", "allowForksFragment", AccessPolicyPanel.this);
fragment.add(new BooleanOption("allowForks",
getString("gb.allowForks"),
getString("gb.allowForksDescription"),
diff --git a/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
index d5dc1a37..92e7fb6d 100644
--- a/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
@@ -140,7 +140,7 @@ public class BranchesPanel extends BasePanel {
item.add(shortlog);
if (maxCount <= 0) {
- Fragment fragment = new Fragment("branchLinks", showDelete? "branchPageAdminLinks" : "branchPageLinks", this);
+ Fragment fragment = new Fragment("branchLinks", showDelete? "branchPageAdminLinks" : "branchPageLinks", BranchesPanel.this);
fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, shortUniqRef));
fragment.add(new BookmarkablePageLink<Void>("tree", TreePage.class, shortUniqRef));
String rawUrl = RawServlet.asLink(getContextUrl(), model.name, Repository.shortenRefName(entry.getName()), null);
@@ -154,7 +154,7 @@ public class BranchesPanel extends BasePanel {
}
item.add(fragment);
} else {
- Fragment fragment = new Fragment("branchLinks", "branchPanelLinks", this);
+ Fragment fragment = new Fragment("branchLinks", "branchPanelLinks", BranchesPanel.this);
fragment.add(new BookmarkablePageLink<Void>("log", LogPage.class, shortUniqRef));
fragment.add(new BookmarkablePageLink<Void>("tree", TreePage.class, shortUniqRef));
String rawUrl = RawServlet.asLink(getContextUrl(), model.name, Repository.shortenRefName(entry.getName()), null);
diff --git a/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java
index 75fd70e7..cf5854e1 100644
--- a/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java
@@ -207,7 +207,7 @@ public class HistoryPanel extends BasePanel {
WicketUtils.setHtmlTooltip(commitHash, entry.getName());
item.add(commitHash);
- Fragment links = new Fragment("historyLinks", "treeLinks", this);
+ Fragment links = new Fragment("historyLinks", "treeLinks", HistoryPanel.this);
links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
WicketUtils.newObjectParameter(repositoryName, entry.getName())));
item.add(links);
@@ -230,7 +230,7 @@ public class HistoryPanel extends BasePanel {
WicketUtils.setHtmlTooltip(commitHash, submoduleId);
item.add(commitHash.setEnabled(hasSubmodule));
}
- Fragment links = new Fragment("historyLinks", "treeLinks", this);
+ Fragment links = new Fragment("historyLinks", "treeLinks", HistoryPanel.this);
links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
WicketUtils.newObjectParameter(repositoryName, entry.getName())));
item.add(links);
@@ -244,7 +244,7 @@ public class HistoryPanel extends BasePanel {
WicketUtils.setHtmlTooltip(commitHash, entry.getName());
item.add(commitHash);
- Fragment links = new Fragment("historyLinks", "blobLinks", this);
+ Fragment links = new Fragment("historyLinks", "blobLinks", HistoryPanel.this);
links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
WicketUtils.newObjectParameter(repositoryName, entry.getName())));
links.add(new BookmarkablePageLink<Void>("difftocurrent", BlobDiffPage.class,
diff --git a/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
index 503b3d12..6c0d1c67 100644
--- a/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
@@ -60,13 +60,13 @@ public class ProjectRepositoryPanel extends BasePanel {
Fragment iconFragment;
if (entry.isMirror) {
- iconFragment = new Fragment("repoIcon", "mirrorIconFragment", this);
+ iconFragment = new Fragment("repoIcon", "mirrorIconFragment", ProjectRepositoryPanel.this);
} else if (entry.isFork()) {
- iconFragment = new Fragment("repoIcon", "forkIconFragment", this);
+ iconFragment = new Fragment("repoIcon", "forkIconFragment", ProjectRepositoryPanel.this);
} else if (entry.isBare) {
- iconFragment = new Fragment("repoIcon", "repoIconFragment", this);
+ iconFragment = new Fragment("repoIcon", "repoIconFragment", ProjectRepositoryPanel.this);
} else {
- iconFragment = new Fragment("repoIcon", "cloneIconFragment", this);
+ iconFragment = new Fragment("repoIcon", "cloneIconFragment", ProjectRepositoryPanel.this);
}
if (showSwatch) {
WicketUtils.setCssStyle(iconFragment, "color:" + StringUtils.getColor(entry.toString()));
@@ -76,7 +76,7 @@ public class ProjectRepositoryPanel extends BasePanel {
if (StringUtils.isEmpty(entry.originRepository)) {
add(new Label("originRepository").setVisible(false));
} else {
- Fragment forkFrag = new Fragment("originRepository", "originFragment", this);
+ Fragment forkFrag = new Fragment("originRepository", "originFragment", ProjectRepositoryPanel.this);
forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(entry.originRepository),
SummaryPage.class, WicketUtils.newRepositoryParameter(entry.originRepository)));
add(forkFrag);
@@ -126,11 +126,11 @@ public class ProjectRepositoryPanel extends BasePanel {
}
Fragment repositoryLinks;
if (user.canAdmin(entry)) {
- repositoryLinks = new Fragment("repositoryLinks", "repositoryOwnerLinks", this);
+ repositoryLinks = new Fragment("repositoryLinks", "repositoryOwnerLinks", ProjectRepositoryPanel.this);
repositoryLinks.add(new BookmarkablePageLink<Void>("editRepository", EditRepositoryPage.class,
WicketUtils.newRepositoryParameter(entry.name)));
} else {
- repositoryLinks = new Fragment("repositoryLinks", "repositoryUserLinks", this);
+ repositoryLinks = new Fragment("repositoryLinks", "repositoryUserLinks", ProjectRepositoryPanel.this);
}
repositoryLinks.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils
diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
index 549c92b5..19fe46c1 100644
--- a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
@@ -119,7 +119,7 @@ public class RepositoryUrlPanel extends BasePanel {
protected Fragment createPrimaryUrlPanel(String wicketId, final RepositoryModel repository, List<RepositoryUrl> repositoryUrls) {
- Fragment urlPanel = new Fragment(wicketId, "repositoryUrlFragment", this);
+ Fragment urlPanel = new Fragment(wicketId, "repositoryUrlFragment", RepositoryUrlPanel.this);
urlPanel.setRenderBodyOnly(true);
if (repositoryUrls.size() == 1) {
@@ -139,7 +139,7 @@ public class RepositoryUrlPanel extends BasePanel {
public void populateItem(final Item<RepositoryUrl> item) {
RepositoryUrl repoUrl = item.getModelObject();
// repository url
- Fragment fragment = new Fragment("repoUrl", "actionFragment", this);
+ Fragment fragment = new Fragment("repoUrl", "actionFragment", RepositoryUrlPanel.this);
Component content = new Label("content", repoUrl.url).setRenderBodyOnly(true);
WicketUtils.setCssClass(content, "commandMenuItem");
fragment.add(content);
@@ -154,7 +154,7 @@ public class RepositoryUrlPanel extends BasePanel {
}
};
- Fragment urlMenuFragment = new Fragment("menu", "urlProtocolMenuFragment", this);
+ Fragment urlMenuFragment = new Fragment("menu", "urlProtocolMenuFragment", RepositoryUrlPanel.this);
urlMenuFragment.setRenderBodyOnly(true);
urlMenuFragment.add(new Label("menuText", getString("gb.url")));
urlMenuFragment.add(repoUrlMenuItems);
@@ -253,7 +253,7 @@ public class RepositoryUrlPanel extends BasePanel {
return;
}
- Fragment appMenu = new Fragment("appMenu", "appMenuFragment", this);
+ Fragment appMenu = new Fragment("appMenu", "appMenuFragment", RepositoryUrlPanel.this);
appMenu.setRenderBodyOnly(true);
item.add(appMenu);
@@ -304,7 +304,7 @@ public class RepositoryUrlPanel extends BasePanel {
@Override
public void populateItem(final Item<RepositoryUrl> repoLinkItem) {
RepositoryUrl repoUrl = repoLinkItem.getModelObject();
- Fragment fragment = new Fragment("actionItem", "actionFragment", this);
+ Fragment fragment = new Fragment("actionItem", "actionFragment", RepositoryUrlPanel.this);
fragment.add(createPermissionBadge("permission", repoUrl));
if (!StringUtils.isEmpty(clientApp.cloneUrl)) {
@@ -329,7 +329,7 @@ public class RepositoryUrlPanel extends BasePanel {
}
};
- Fragment applicationMenus = new Fragment(wicketId, "applicationMenusFragment", this);
+ Fragment applicationMenus = new Fragment(wicketId, "applicationMenusFragment", RepositoryUrlPanel.this);
applicationMenus.add(appMenus);
return applicationMenus;
}
@@ -349,7 +349,7 @@ public class RepositoryUrlPanel extends BasePanel {
protected Fragment createCopyFragment(String text) {
if (app().settings().getBoolean(Keys.web.allowFlashCopyToClipboard, true)) {
// clippy: flash-based copy & paste
- Fragment copyFragment = new Fragment("copyFunction", "clippyPanel", this);
+ Fragment copyFragment = new Fragment("copyFunction", "clippyPanel", RepositoryUrlPanel.this);
String baseUrl = WicketUtils.getGitblitURL(getRequest());
ShockWaveComponent clippy = new ShockWaveComponent("clippy", baseUrl + "/clippy.swf");
clippy.setValue("flashVars", "text=" + StringUtils.encodeURL(text));
@@ -357,7 +357,7 @@ public class RepositoryUrlPanel extends BasePanel {
return copyFragment;
} else {
// javascript: manual copy & paste with modal browser prompt dialog
- Fragment copyFragment = new Fragment("copyFunction", "jsPanel", this);
+ 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));
copyFragment.add(img);
@@ -441,11 +441,11 @@ public class RepositoryUrlPanel extends BasePanel {
}
protected Component createRepositoryIndicators(RepositoryModel repository) {
- Fragment fragment = new Fragment("repositoryIndicators", "indicatorsFragment", this);
+ Fragment fragment = new Fragment("repositoryIndicators", "indicatorsFragment", RepositoryUrlPanel.this);
if (repository.isBare) {
fragment.add(new Label("workingCopyIndicator").setVisible(false));
} else {
- Fragment wc = new Fragment("workingCopyIndicator", "workingCopyFragment", this);
+ Fragment wc = new Fragment("workingCopyIndicator", "workingCopyFragment", RepositoryUrlPanel.this);
Label lbl = new Label("workingCopy", getString("gb.workingCopy"));
WicketUtils.setHtmlTooltip(lbl, getString("gb.workingCopyWarning"));
wc.add(lbl);
@@ -464,7 +464,7 @@ public class RepositoryUrlPanel extends BasePanel {
if (hasFork || !canFork) {
if (user.canFork() && !repository.allowForks) {
// show forks prohibited indicator
- Fragment wc = new Fragment("forksProhibitedIndicator", "forksProhibitedFragment", this);
+ Fragment wc = new Fragment("forksProhibitedIndicator", "forksProhibitedFragment", RepositoryUrlPanel.this);
Label lbl = new Label("forksProhibited", getString("gb.forksProhibited"));
WicketUtils.setHtmlTooltip(lbl, getString("gb.forksProhibitedWarning"));
wc.add(lbl);
diff --git a/src/main/java/com/gitblit/wicket/panels/TagsPanel.java b/src/main/java/com/gitblit/wicket/panels/TagsPanel.java
index 9926d113..85a50139 100644
--- a/src/main/java/com/gitblit/wicket/panels/TagsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/TagsPanel.java
@@ -106,7 +106,7 @@ public class TagsPanel extends BasePanel {
}
item.add(messageLink);
- Fragment fragment = new Fragment("tagLinks", "blobLinks", this);
+ Fragment fragment = new Fragment("tagLinks", "blobLinks", TagsPanel.this);
fragment.add(new BookmarkablePageLink<Void>("tag", TagPage.class, WicketUtils
.newObjectParameter(repositoryName, entry.getObjectId().getName()))
.setEnabled(entry.isAnnotatedTag()));
@@ -133,7 +133,7 @@ public class TagsPanel extends BasePanel {
}
item.add(messageLink);
- Fragment fragment = new Fragment("tagLinks", "annotatedLinks", this);
+ Fragment fragment = new Fragment("tagLinks", "annotatedLinks", TagsPanel.this);
fragment.add(new BookmarkablePageLink<Void>("tag", TagPage.class,
WicketUtils.newObjectParameter(repositoryName, entry.getObjectId()
.getName())).setEnabled(entry.isAnnotatedTag()));
@@ -150,7 +150,7 @@ public class TagsPanel extends BasePanel {
item.add(new LinkPanel("tagDescription", "list", message, CommitPage.class,
WicketUtils.newObjectParameter(repositoryName, entry.getObjectId()
.getName())));
- Fragment fragment = new Fragment("tagLinks", "lightweightLinks", this);
+ Fragment fragment = new Fragment("tagLinks", "lightweightLinks", TagsPanel.this);
fragment.add(new BookmarkablePageLink<Void>("commit", CommitPage.class,
WicketUtils.newObjectParameter(repositoryName, entry
.getReferencedObjectId().getName())));
diff --git a/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
index 7f3fd9a2..69c64fc7 100644
--- a/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
@@ -37,7 +37,7 @@ public class TeamsPanel extends BasePanel {
public TeamsPanel(String wicketId, final boolean showAdmin) {
super(wicketId);
- Fragment adminLinks = new Fragment("adminPanel", "adminLinks", this);
+ Fragment adminLinks = new Fragment("adminPanel", "adminLinks", TeamsPanel.this);
adminLinks.add(new BookmarkablePageLink<Void>("newTeam", EditTeamPage.class));
add(adminLinks.setVisible(showAdmin));
@@ -65,7 +65,7 @@ public class TeamsPanel extends BasePanel {
: ""));
item.add(new Label("repositories",
entry.repositories.size() > 0 ? ("" + entry.repositories.size()) : ""));
- Fragment teamLinks = new Fragment("teamLinks", "teamAdminLinks", this);
+ Fragment teamLinks = new Fragment("teamLinks", "teamAdminLinks", TeamsPanel.this);
teamLinks.add(new BookmarkablePageLink<Void>("editTeam", EditTeamPage.class,
WicketUtils.newTeamnameParameter(entry.name)));
Link<Void> deleteLink = new Link<Void>("deleteTeam") {
diff --git a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java
index b247228b..6c6435bb 100644
--- a/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/TicketListPanel.java
@@ -101,7 +101,7 @@ public class TicketListPanel extends BasePanel {
if (ticket.updatedAt == null) {
item.add(new Label("updated").setVisible(false));
} else {
- Fragment updated = new Fragment("updated", "updatedFragment", this);
+ Fragment updated = new Fragment("updated", "updatedFragment", TicketListPanel.this);
UserModel updater = app().users().getUserModel(ticket.updatedBy);
if (updater != null) {
updated.add(new LinkPanel("updatedBy", null, updater.getDisplayName(),
diff --git a/src/main/java/com/gitblit/wicket/panels/UsersPanel.java b/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
index 5d626552..7200cb76 100644
--- a/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
@@ -38,7 +38,7 @@ public class UsersPanel extends BasePanel {
public UsersPanel(String wicketId, final boolean showAdmin) {
super(wicketId);
- Fragment adminLinks = new Fragment("adminPanel", "adminLinks", this);
+ Fragment adminLinks = new Fragment("adminPanel", "adminLinks", UsersPanel.this);
adminLinks.add(new BookmarkablePageLink<Void>("newUser", EditUserPage.class));
add(adminLinks.setVisible(showAdmin));
@@ -85,7 +85,7 @@ public class UsersPanel extends BasePanel {
item.add(new Label("teams", entry.teams.size() > 0 ? ("" + entry.teams.size()) : ""));
item.add(new Label("repositories",
entry.permissions.size() > 0 ? ("" + entry.permissions.size()) : ""));
- Fragment userLinks = new Fragment("userLinks", "userAdminLinks", this);
+ Fragment userLinks = new Fragment("userLinks", "userAdminLinks", UsersPanel.this);
userLinks.add(new BookmarkablePageLink<Void>("editUser", EditUserPage.class,
WicketUtils.newUsernameParameter(entry.username)));
Link<Void> deleteLink = new Link<Void>("deleteUser") {