Bläddra i källkod

fixed render table cell values by field widget in TableAjax

Piotr Labudda 10 år sedan
förälder
incheckning
d8f3057569
1 ändrade filer med 6 tillägg och 6 borttagningar
  1. 6 6
      SE/se-lib/TableAjax.php

+ 6 - 6
SE/se-lib/TableAjax.php

@@ -947,7 +947,7 @@ class TableAjax extends ViewAjax {
 						cellNode,
 						cellCnt,
 						format,
-						showTooltip
+						showTooltip = true
 				;
 				if (!columnProps) continue;
 				if (columnProps.hidden) continue;// TODO: "unique" is hidden
@@ -966,18 +966,18 @@ class TableAjax extends ViewAjax {
 				cellNode.data('column', columnName);
 				if (val === undefined) continue;
 
+				format = _.get(columnProps, 'format', '{0}');
+
 				// test use field widgets
 				var fldWidgetNode = priv.renderFieldWidget_TableCell(columnName, val);
 				if (fldWidgetNode) {
-					cellNode.empty();
-					cellNode.append(fldWidgetNode);
+					cellCnt.empty();
+					cellCnt.append(fldWidgetNode);
 				} else if (fldWidgetNode === '') {
-					cellNode.empty();
+					cellCnt.empty();
 				}
 				else {
 
-				format = columnProps.format || '{0}';
-				showTooltip = true;
 				switch (columnProps.type) {// TODO: used is only: string(default), geom, special, simpleLink
 					case "string":
 						cellCnt.html(format.f(val));