Implement PatchSetSelectBox2
Implemented a new version of PatchSetSelectBox. Used InlineHyperlink with actual hrefs so that they can be opened in new tabs / windows. The download link hasn't been implemented yet. Change-Id: I2da78663f0fbd6a6713129dff945b2a161570430
This commit is contained in:
@@ -169,7 +169,7 @@ class Header extends Composite {
|
||||
if (info != null) {
|
||||
final String url = url(info);
|
||||
link.setTargetHistoryToken(url);
|
||||
link.setTitle(getFileName(info.path()));
|
||||
link.setTitle(FileInfo.getFileName(info.path()));
|
||||
keys.add(new KeyCommand(0, key, help) {
|
||||
@Override
|
||||
public void onKeyPress(KeyPressEvent event) {
|
||||
@@ -187,14 +187,6 @@ class Header extends Composite {
|
||||
}
|
||||
}
|
||||
|
||||
private static String getFileName(String path) {
|
||||
String fileName = Patch.COMMIT_MSG.equals(path)
|
||||
? Util.C.commitMessage()
|
||||
: path;
|
||||
int s = fileName.lastIndexOf('/');
|
||||
return s >= 0 ? fileName.substring(s + 1) : fileName;
|
||||
}
|
||||
|
||||
boolean hasPrev() {
|
||||
return hasPrev;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user