]> source.dussan.org Git - gitblit.git/commitdiff
fix fragments on RepositoriesPanel #1
authorMartin Spielmann <martin.spielmann@pingunaut.com>
Sun, 31 Jul 2016 13:56:37 +0000 (15:56 +0200)
committerMartin Spielmann <martin.spielmann@pingunaut.com>
Sun, 31 Jul 2016 13:56:37 +0000 (15:56 +0200)
src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java

index 877e21de1676a9a83f7d19595a92842d43c6f001..57ae127094b1075b8da07f79595babfea77dcb47 100644 (file)
@@ -75,7 +75,7 @@ public class RepositoriesPanel extends BasePanel {
                Fragment managementLinks;\r
                if (showAdmin) {\r
                        // user is admin\r
-                       managementLinks = new Fragment("managementPanel", "adminLinks", this);\r
+                       managementLinks = new Fragment("managementPanel", "adminLinks", RepositoriesPanel.this);\r
                        managementLinks.add(new Link<Void>("clearCache") {\r
 \r
                                private static final long serialVersionUID = 1L;\r
@@ -90,7 +90,7 @@ public class RepositoriesPanel extends BasePanel {
                        add(managementLinks);\r
                } else if (showManagement && user != null && user.canCreate()) {\r
                        // user can create personal repositories\r
-                       managementLinks = new Fragment("managementPanel", "personalLinks", this);\r
+                       managementLinks = new Fragment("managementPanel", "personalLinks", RepositoriesPanel.this);\r
                        managementLinks.add(new BookmarkablePageLink<Void>("newRepository", app().getNewRepositoryPage()));\r
                        add(managementLinks);\r
                } else {\r
@@ -160,7 +160,7 @@ public class RepositoriesPanel extends BasePanel {
                                if (entry instanceof GroupRepositoryModel) {\r
                                        GroupRepositoryModel groupRow = (GroupRepositoryModel) entry;\r
                                        currGroupName = entry.name;\r
-                                       Fragment row = new Fragment("rowContent", "groupRepositoryRow", this);\r
+                                       Fragment row = new Fragment("rowContent", "groupRepositoryRow", RepositoriesPanel.this);\r
                                        item.add(row);\r
 \r
                                        String name = groupRow.name;\r
@@ -180,19 +180,19 @@ public class RepositoriesPanel extends BasePanel {
                                        counter = 0;\r
                                        return;\r
                                }\r
-                               Fragment row = new Fragment("rowContent", "repositoryRow", this);\r
+                               Fragment row = new Fragment("rowContent", "repositoryRow", RepositoriesPanel.this);\r
                                item.add(row);\r
 \r
                                // show colored repository type icon\r
                                Fragment iconFragment;\r
                                if (entry.isMirror) {\r
-                                       iconFragment = new Fragment("repoIcon", "mirrorIconFragment", this);\r
+                                       iconFragment = new Fragment("repoIcon", "mirrorIconFragment", RepositoriesPanel.this);\r
                                } else if (entry.isFork()) {\r
-                                       iconFragment = new Fragment("repoIcon", "forkIconFragment", this);\r
+                                       iconFragment = new Fragment("repoIcon", "forkIconFragment", RepositoriesPanel.this);\r
                                } else if (entry.isBare) {\r
-                                       iconFragment = new Fragment("repoIcon", "repoIconFragment", this);\r
+                                       iconFragment = new Fragment("repoIcon", "repoIconFragment", RepositoriesPanel.this);\r
                                } else {\r
-                                       iconFragment = new Fragment("repoIcon", "cloneIconFragment", this);\r
+                                       iconFragment = new Fragment("repoIcon", "cloneIconFragment", RepositoriesPanel.this);\r
                                }\r
                                if (showSwatch) {\r
                                        WicketUtils.setCssStyle(iconFragment, "color:" + StringUtils.getColor(entry.toString()));\r
@@ -311,7 +311,7 @@ public class RepositoriesPanel extends BasePanel {
                if (dp instanceof SortableDataProvider<?,?>) {\r
                        // add sortable header\r
                        SortableDataProvider<?,?> sdp = (SortableDataProvider<?,?>) dp;\r
-                       Fragment fragment = new Fragment("headerContent", "flatRepositoryHeader", this);\r
+                       Fragment fragment = new Fragment("headerContent", "flatRepositoryHeader", RepositoriesPanel.this);\r
                        fragment.add(newSort("orderByRepository", SortBy.repository, sdp, dataView));\r
                        fragment.add(newSort("orderByDescription", SortBy.description, sdp, dataView));\r
                        fragment.add(newSort("orderByOwner", SortBy.owner, sdp, dataView));\r
@@ -319,7 +319,7 @@ public class RepositoriesPanel extends BasePanel {
                        add(fragment);\r
                } else {\r
                        // not sortable\r
-                       Fragment fragment = new Fragment("headerContent", "groupRepositoryHeader", this);\r
+                       Fragment fragment = new Fragment("headerContent", "groupRepositoryHeader", RepositoriesPanel.this);\r
                        add(fragment);\r
                }\r
        }\r