Jelajahi Sumber

HUE-2471 [beeswax] Fix display ellipsis on fields longer than 20 characters

Removed ellipsis on shorter fields
Enrico Berti 11 tahun lalu
induk
melakukan
1b68f38
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      apps/beeswax/src/beeswax/templates/execute.mako

+ 3 - 2
apps/beeswax/src/beeswax/templates/execute.mako

@@ -997,13 +997,14 @@ var truncateOutput = function (obj) {
     name = obj.name || '',
     type = obj.type || '',
     output = name.length + type.length,
+    suffix = '',
     trim;
-
   if (output > chars) {
     trim = Math.abs((output + 4) - chars); // 4 accounts for ellipsis, spaces, parenthesis
     type = type.slice(0, Math.abs(type.length - trim));
+    suffix = '…';
   }
-  return escapeOutput(type) + '…';
+  return escapeOutput(type) + suffix;
 };
 
 function placeResizePanelHandle() {