From eae31d55c754e22d2b3581ee2eaabf1c428e75af Mon Sep 17 00:00:00 2001 From: James Date: Sat, 7 Mar 2026 14:21:46 -0500 Subject: [PATCH] fix: show full request sentences, no mid-word truncation; edit uses textarea showing full text --- dealspace | Bin 34756760 -> 34756760 bytes portal/templates/app/project.html | 30 +++++++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/dealspace b/dealspace index cd1e136c7355cd5326df279508f999707d1258c6..4f9d471d5a019d3ba2b30a64d357997a664a27ee 100755 GIT binary patch delta 2689 zcmb`{`F{^|9Ki9%cXKmF?i4B!*1ogvcZU)}CfBrSp@W^488%{b4Hcytsa(}`Un-)A zYDw-6>2y@2qUcamTUv1sMC=tZ<*S!BbwaFbAvgHg>JZ*0>2 z*o?;YChbZ~TCh4Ym^L~tDKlkgN^$RTg~j=$rTtTS6~)Bn_bTl>aZG7U_ui=q`6I`s zhe~n_V~dh=xa z>P}Zv59&$1=o;!xDb$CqrM}dU`qKa!NU1c4uA?+cr@?eRWzY>Ygoe^Ex{+?8o9PxB zP9rFjvM8H!D3|hRB<0hsG>QsnG!@bq8cXA-h>B@EO`zLoB2A(aDy7LZg{IOpnoeaj zgJ#k!x}ENzJ83q}p}XjAnoIZ4y>uUy(>$6__tOG;fF7iWXdx}4#k7Q$(!=x!JxUd{ zj2@%M=?Qw0o}#De8G4qUqvz=bT23$0OY}0Wpq2Crt)kWRD!oQ)Xf3@?>u5c_L2uGq zR7r2s26~4!(z~>YHq#c`O512V?V$JQefoetq@DB;?V^wA6Z(`sqtEFJ+D&_CFYTi* z=_~r0_R|6Sh7QuV^c{Uqhv+c&f)Tfc`XCbN?OZBa$=xzn?vZ=tJ}H-ZGGFeO1@eGAC=ba(StN^Pi7b_e&Q zDrA{FCXdS#@}xW^Ps=m%tUM>r%L}qxUX+*QWmzFB~SVBdYew(q7=B(_G)hJ{qN*)X>yRtlT~9aAjntNI zqMNB5wWnLC1Kmm;sS_nr3f)Gj)S0@_?Q{pFQCCW*4C+SRsRw1!oz#^Z-3bW9cCp zM@957JwoGY0zFEP(L|a=lW7V~rN`+BnnuO+Bt1pbX$Cz_&(O0plV;I#^gO*lFVai& zGL_J5nnSP9tMnSZPIGA>_EU@+V=6v<9V3}q!H1mhD*&-ZQ=$f(@nzq3$$IFy}~8;QgR zLpgD+bF*_3a>9|sgiyb%?2^Xe`vQ%kgKdJvGxHh+ps_TOE2OD3ljd@zTqP~!YPm+P zmFuLXw31i}N}PlwEUhJ85+ovtk|b^9dbvSvl(uq{+$`;+z1$)lWV`H;ow7@I z%O2S)`((d-C*R8t@}vAD2jrj}lEZRDj>^w+OpePh@~iwNC*-93E~n(Q{2^!Ltelhc z@~2#ozvQC)9hh1aj$#pzD2bLbQdY`Id8r^3rIJ*ZDpFOdNp*>l8d0T1;hItPn*Rgo CAcBnm diff --git a/portal/templates/app/project.html b/portal/templates/app/project.html index f833084..be9b683 100644 --- a/portal/templates/app/project.html +++ b/portal/templates/app/project.html @@ -450,12 +450,22 @@ if (detailMode) { titleHtml = `${escHtml(title)}`; if (d.description) { - const descTrunc = d.description.length > 120 ? d.description.substring(0, 120) + '\u2026' : d.description; - titleHtml += `
${escHtml(descTrunc)}
`; + titleHtml += `
${escHtml(d.description)}
`; } } else { - const titleTrunc = title.length > 80 ? title.substring(0, 80) + '\u2026' : title; - titleHtml = `${escHtml(titleTrunc)}`; + // Show first complete sentence, or full title if short — no arbitrary mid-word cut-off + let displayTitle = title; + if (title.length > 120) { + const sentenceEnd = title.search(/[.!?]\s/); + if (sentenceEnd > 20 && sentenceEnd < 160) { + displayTitle = title.substring(0, sentenceEnd + 1); + } else { + // Break at last word boundary before 120 + const cut = title.lastIndexOf(' ', 120); + displayTitle = title.substring(0, cut > 40 ? cut : 120); + } + } + titleHtml = `${escHtml(displayTitle)}`; } // Priority select @@ -549,13 +559,15 @@ const titleCell = row.querySelector('.req-title-cell'); if (!titleCell) return; row.dataset.originalTitleHtml = titleCell.innerHTML; - titleCell.innerHTML = `
- - - + titleCell.innerHTML = `
+ +
+ + +
`; const input = document.getElementById('edit-title-' + id); - if (input) { input.value = title; input.focus(); input.select(); } + if (input) { input.value = title; input.focus(); input.setSelectionRange(input.value.length, input.value.length); } } function cancelEditRequest(id) {