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:
parent
4e6fe4d119
commit
57abea5416
1 changed files with 0 additions and 21 deletions
|
@ -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,29 +1418,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
valueElement.classList.add("pointer");
|
||||
|
|
Loading…
Add table
Reference in a new issue