Use the existing PatchLink.SideBySide class to build patch links

I shouldn't have generated the link by hand, instead this should
have used the existing side by side link generator that we already
use in the PatchSetPanel.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-01-16 09:21:31 -08:00
parent 3f24201185
commit 3800537597
2 changed files with 3 additions and 7 deletions

View File

@@ -27,13 +27,13 @@ import com.google.gerrit.client.reviewdb.PatchSet;
import com.google.gerrit.client.rpc.Common;
import com.google.gerrit.client.rpc.GerritCallback;
import com.google.gerrit.client.ui.AccountScreen;
import com.google.gerrit.client.ui.PatchLink;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.FormPanel;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.RadioButton;
@@ -207,11 +207,7 @@ public class PublishCommentScreen extends AccountScreen {
panel.addStyleName("gerrit-PatchComments");
draftsPanel.add(panel);
final Hyperlink link =
new Hyperlink(fn, Link.toPatchSideBySide(c.getKey()
.getParentKey()));
link.addStyleName("gerrit-PatchLink");
panel.add(link);
panel.add(new PatchLink.SideBySide(fn, c.getKey().getParentKey()));
priorFile = fn;
}

View File

@@ -671,7 +671,7 @@
margin-bottom: 10px;
margin-left: 10px;
}
.gerrit-PublishCommentsScreen .gerrit-PatchLink {
.gerrit-PublishCommentsScreen .gwt-Hyperlink {
white-space: nowrap;
font-size: small;
}