Skip to content

Commit f36aede

Browse files
committed
in the rendering of an axis of the PdC, the span element which are rendered the synonyms of a value is displayed only when the value has synonyms with it
1 parent 5671968 commit f36aede

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

war-core/src/main/webapp/util/javaScript/silverpeas-pdc-widgets.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,9 +1115,10 @@ function removePosition(position, positions) {
11151115
}).appendTo($axisDiv);
11161116
}
11171117

1118-
if (!selectedPositions.at(i, anAxis.id)) {
1118+
var aSelectedPosition = selectedPositions.at(i, anAxis.id);
1119+
if (!aSelectedPosition) {
11191120
option.attr('selected', true);
1120-
} else {
1121+
} else if (aSelectedPosition.synonyms && aSelectedPosition.synonyms.length > 0) {
11211122
$('<span>').html('<i>' + selectedPositions.at(i, anAxis.id).synonyms.join(', ') + '</i>&nbsp;').appendTo($axisDiv);
11221123
}
11231124
}

0 commit comments

Comments
 (0)