On our website, I have encountered an error related to Client activity - "Kundenaktivität
" along with a long string attached at the end. I am looking for a way to prevent the image below from showing with this lengthy string "
asdasdaxcasdasdasasdasdaxcasdasdasdasdasdasdacasascasc
". Do you have any suggestions on how I can achieve this?
enter image description here
This is triggered when a customer clicks inside a canvas in a new phase.
The code snippet used within the phase includes:
var Cockpit = {};
Cockpit.CjmCanvas.setMapTableCjHeader = function()
{
var canvasCjRow = $('#map-table .mm-canvas-cj');
var headerElements = $('.map-table-header');
headerElements.each(function() {
var cxId = $(this).data("id");
var curEl = canvasCjRow.find(".map-table-col-"+cxId);
$(this).find(".map-table-cj-col").html(curEl.find(".map-table-displayfield").parent().html());
if (curEl.find(".phase-arrows-last-element-cj").length == 0) {
$(this).find(".map-table-menu-icon-cj").remove();
}
if ($(this).find('.cjmp-change-cb').length > 0) {
var select = $(this).find('.cjmp-change-cb');
var selOption = select.find(':selected');
select.on("change", function() {
if (!confirm($(this).data("confirm"))) {
selOption.prop("selected", "selected");
}
});
}
//I attempted to decrease the title size but couldn't locate the correct text (nesto)
$('.cjmp-drag-element-content').on("click", function(){
var title = $(".cjmp-drag-element-content span:last-child").text();
var newTitle = title.substring(0, 5);
var nesto = $(".cjmp-drag-element-content span:last-child").text(newTitle + "...");
return nesto;
});
$('.mm-canvas-cj').remove();
});
$('#canvas-cj').parent().remove();
};
#map-table-box #map-table .map-table-header-row .corner-ca span {
line-height: normal !important;
max-height: 38px;
margin: 3px 3px 3px 10px !important;
display: inline-block;
overflow: hidden;
}
element {
display: inline-block;
line-height: 110%;
width: 135px;
padding: 2px 4px;
height: 27px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="cjmp-drag-element-content cjmp-choosen">
<span class="cjm-score-value" style="background-color: #75EA00;">8.6</span>
<span class="cjmp-content-visitors" id="cjmpc-visitors-210">0%</span>
<span style="display: inline-block; line-height: 220%; width: 135px; padding: 2px 4px; height:27px;">testaasdfasdf </span>
</div>
These are two different css's
. "Element" refers to an element described in the HTML structure, while "map-table-displayfield" represents the CSS for the display whenever someone interacts with the canvas element shown in the picture.