Add data-branch and data-project to attributes for related changes.

This is so that javascript plugins can more easily identify and
modify the DOM elements associated with RelatedChanges.

Change-Id: Ic4da416cbc359f29b202a966f85cd933e9fda7b3
This commit is contained in:
Stephen Li 2016-08-08 18:38:04 -07:00
parent 9f7e37cbf7
commit 214fe5f74d
1 changed files with 2 additions and 0 deletions

View File

@ -284,6 +284,8 @@ class RelatedChangesTab implements IsWidget {
} else {
sb.openSpan().setStyleName(RelatedChanges.R.css().subject());
}
sb.setAttribute("data-branch", info.branch());
sb.setAttribute("data-project", info.project());
String url = url();
if (url != null) {
sb.openAnchor().setAttribute("href", url);