diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/Metadata.java b/Core/src/org/sleuthkit/autopsy/contentviewers/Metadata.java index 112ea3523c..1bc0c5edd5 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/Metadata.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/Metadata.java @@ -136,7 +136,7 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer { } private void startTable(StringBuilder sb) { - sb.append(MessageFormat.format("", + sb.append(MessageFormat.format("
", ContentViewerHtmlStyles.getIndentedClassName())); //NON-NLS } diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/analysisresults/AnalysisResultsContentPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/analysisresults/AnalysisResultsContentPanel.java index f365e8392e..d19cf80b5c 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/analysisresults/AnalysisResultsContentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/analysisresults/AnalysisResultsContentPanel.java @@ -184,7 +184,10 @@ public class AnalysisResultsContentPanel extends javax.swing.JPanel { Optional.ofNullable(getAnchor(attrs.getAnalysisResult()))); // create a table - Element table = sectionDiv.appendElement("table"); + Element table = sectionDiv.appendElement("table") + .attr("valign", "top") + .attr("align", "left"); + table.attr("class", ContentViewerHtmlStyles.getIndentedClassName()); Element tableBody = table.appendElement("tbody"); @@ -194,11 +197,11 @@ public class AnalysisResultsContentPanel extends javax.swing.JPanel { Element row = tableBody.appendElement("tr"); String keyString = keyVal.getKey() == null ? "" : keyVal.getKey() + ":"; Element keyTd = row.appendElement("td") - .attr("class", ContentViewerHtmlStyles.getTextClassName()); + .attr("class", ContentViewerHtmlStyles.getKeyColumnClassName()); keyTd.appendElement("span") .text(keyString) - .attr("class", ContentViewerHtmlStyles.getKeyColumnClassName()); + .attr("class", ContentViewerHtmlStyles.getTextClassName()); String valueString = keyVal.getValue() == null ? "" : keyVal.getValue(); row.appendElement("td") diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/application/Annotations.java b/Core/src/org/sleuthkit/autopsy/contentviewers/application/Annotations.java index 9651ddc518..67124d1502 100755 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/application/Annotations.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/application/Annotations.java @@ -207,11 +207,10 @@ public class Annotations { Element sourceFileSection = appendSection(parent, Bundle.Annotations_sourceFile_title()); sourceFileSection.attr("class", ContentViewerHtmlStyles.getSpacedSectionClassName()); - + Element sourceFileContainer = sourceFileSection.appendElement("div"); sourceFileContainer.attr("class", ContentViewerHtmlStyles.getIndentedClassName()); - - + boolean sourceFileRendered = renderContent(sourceFileContainer, sourceContent, true); if (!sourceFileRendered) { @@ -239,7 +238,7 @@ public class Annotations { if (CentralRepository.isEnabled()) { List centralRepoComments = getCentralRepositoryData(sourceFile); - boolean crRendered = appendEntries(parent, CR_COMMENTS_CONFIG, centralRepoComments, isSubheader, + boolean crRendered = appendEntries(parent, CR_COMMENTS_CONFIG, centralRepoComments, isSubheader, !contentRendered); contentRendered = contentRendered || crRendered; } @@ -475,13 +474,13 @@ public class Annotations { if (!isFirstSection) { sectionDiv.attr("class", ContentViewerHtmlStyles.getSpacedSectionClassName()); } - + Element sectionContainer = sectionDiv.appendElement("div"); - + if (!isSubsection) { - sectionContainer.attr("class", ContentViewerHtmlStyles.getIndentedClassName()); + sectionContainer.attr("class", ContentViewerHtmlStyles.getIndentedClassName()); } - + appendVerticalEntryTables(sectionContainer, items, config.getAttributes()); return true; } @@ -532,7 +531,10 @@ public class Annotations { * @return The created table. */ private static Element appendTable(Element parent, int columnNumber, List> content, List columnHeaders) { - Element table = parent.appendElement("table"); + Element table = parent.appendElement("table") + .attr("valign", "top") + .attr("align", "left"); + if (columnHeaders != null && !columnHeaders.isEmpty()) { Element header = table.appendElement("thead"); appendRow(header, columnHeaders, columnNumber, true); @@ -559,9 +561,15 @@ public class Annotations { Element row = rowParent.appendElement("tr"); for (int i = 0; i < columnNumber; i++) { Element cell = row.appendElement(cellType); - cell.attr("class", ContentViewerHtmlStyles.getTextClassName()); + + if (i == 0) { + cell.attr("class", ContentViewerHtmlStyles.getKeyColumnClassName()); + } + if (data != null && i < data.size()) { - cell.text(StringUtils.isEmpty(data.get(i)) ? "" : data.get(i)); + cell.appendElement("span") + .attr("class", ContentViewerHtmlStyles.getTextClassName()) + .text(StringUtils.isEmpty(data.get(i)) ? "" : data.get(i)); } } return row; diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/layout/ContentViewerHtmlStyles.java b/Core/src/org/sleuthkit/autopsy/contentviewers/layout/ContentViewerHtmlStyles.java index 17632dc802..6321f5c78c 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/layout/ContentViewerHtmlStyles.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/layout/ContentViewerHtmlStyles.java @@ -65,7 +65,7 @@ public class ContentViewerHtmlStyles { INDENTED_CLASSNAME, pxToPt(ContentViewerDefaults.getSectionIndent())) + String.format(" .%s { padding-top: %dpt } ", SPACED_SECTION_CLASSNAME, pxToPt(ContentViewerDefaults.getSectionSpacing())) - + String.format(" .%s { padding-right: %dpt } ", + + String.format(" .%s { padding-right: %dpt; white-space: nowrap; } ", KEY_COLUMN_TD_CLASSNAME, pxToPt(ContentViewerDefaults.getColumnSpacing())); private static final StyleSheet STYLE_SHEET = new StyleSheet();