From 2bfe934bd13c5bb95e436c8861878b86400dc084 Mon Sep 17 00:00:00 2001 From: Andrew Carter Date: Fri, 13 Jul 2018 09:45:07 -0400 Subject: [PATCH] Fixing style script when displayed as _source --- .../field_formats/object/templates/object_format.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/field_formats/object/templates/object_format.html b/public/field_formats/object/templates/object_format.html index da80d90..170e002 100644 --- a/public/field_formats/object/templates/object_format.html +++ b/public/field_formats/object/templates/object_format.html @@ -25,9 +25,13 @@ // Run this after angular has done it's thing setTimeout(() => { // Discover table row - $(".<%= uid %>").closest(".truncate-by-height").css("white-space", "nowrap"); + // Only set nowrap if parent is td.discover-table-datafield, do nothing if td.discover-table-sourcefield + $(".<%= uid %>") + .closest("td.discover-table-datafield") + .children(".truncate-by-height") + .css("white-space", "nowrap"); - // Discover expanded row table + // Discover table expanded row $(".<%= uid %>").closest("div.doc-viewer-value").css("white-space", "nowrap"); $(".<%= uid %>").closest("div.doc-viewer-value").siblings("i.fa-warning").remove(); }, 0); @@ -42,7 +46,7 @@ .children(".table-cell-filter") .empty(); - // Discover expanded row table + // Discover table expanded row var buttonsCell = $(".object-table-no-filter.<%= uid %>") .closest("div.doc-viewer-value") .closest("td")