fx-compat: Item box: Remove some dead code

All already being handled by CSS (besides the exact character length limits, but
it's not clear that we really need those - we just ellipsize if it visually
overflows now, which seems fine).
This commit is contained in:
Abe Jellinek 2022-08-05 11:57:54 -04:00
parent 4e6fe4d119
commit 57abea5416

View file

@ -1336,10 +1336,6 @@
&& Zotero.ItemFields.isMultiline(fieldName);
var valueElement = document.createElement("div");
/*if (useVbox) {
valueElement.style.display = 'flex';
valueElement.style.flexDirection = 'column';
}*/
valueElement.setAttribute('id', `itembox-field-value-${fieldName}`);
valueElement.className = 'value';
@ -1422,28 +1418,11 @@
}
}
if (fieldName && fieldName.indexOf('firstName') != -1) {
valueElement.setAttribute('flex', '1');
}
var firstSpace = valueText.indexOf(" ");
valueElement.textContent = valueText;
if (isMultiline) {
valueElement.classList.add('multiline');
}
if ((firstSpace == -1 && valueText.length > 29) || firstSpace > 29
|| (fieldName &&
(fieldName.startsWith('creator') || (!isMultiline && fieldName == 'abstractNote')))) {
if (fieldName == 'abstractNote') {
// TODO this does nothing - do we want it to do something?
valueText = valueText.replace(/[\t\n]/g, ' ');
}
valueElement.setAttribute('crop', 'end');
}
// Allow toggling non-editable Abstract open and closed with click
if (fieldName == 'abstractNote' && !this.editable) {