v4.3.19-18: PDF 편집기 자동다운로드 되돌림 - 사용자가 원치 않음
작업 디렉토리에 로컬로 접근 가능해서 Stirling-PDF 업로드 대화상자에서 직접 파일을 찾아 선택하는 걸 선호함. 클릭할 때마다 자동 다운로드되는 건 불필요한 부작용이었음. 툴팁만 업로드 버튼에서 직접 선택하라고 안내하도록 수정.
This commit is contained in:
1 parent
ec62051251
commit
ebb605bc24
1 file changed
+1
-13
@@ -911,18 +911,6 @@ function onPriChange(){
|
||||
renderCaseList();saveCases();
|
||||
}
|
||||
function onNotesChange(){/* auto-save on blur */}
|
||||
// Stirling-PDF (the external editor at /pdf-editor) has no supported way to
|
||||
// preload a remote file via URL — confirmed by inspecting its own frontend
|
||||
// bundle, which only reads a "token" query param, nothing file-related. Its
|
||||
// stateful "storage" API exists but requires a login we don't run. So instead
|
||||
// of pretending the file opens automatically, trigger a real download of the
|
||||
// exact same file alongside opening the editor tab, so the user only has to
|
||||
// drag one file (already in Downloads) instead of hunting for it again.
|
||||
function dtDownloadForEditor(url,name){
|
||||
const a=document.createElement('a');
|
||||
a.href=url;a.download=name;a.style.display='none';
|
||||
document.body.appendChild(a);a.click();document.body.removeChild(a);
|
||||
}
|
||||
function handleNotesTab(e){
|
||||
if(e.key!=='Tab')return;
|
||||
e.preventDefault();
|
||||
@@ -1344,7 +1332,7 @@ function renderFileRow(f,name){
|
||||
<span style="flex-shrink:0">${icon}</span>
|
||||
${nameHtml}
|
||||
<span style="font-size:10px;color:var(--muted);flex-shrink:0">${fmtFileSize(f.size)}</span>
|
||||
${isPdf?`<a href="/pdf-editor-open?caseId=${encodeURIComponent(currentCaseId)}" target="_blank" class="dt-cl-del" style="opacity:.7" onclick="dtDownloadForEditor('${escJsAttr(f.url)}','${escJsAttr(f.name)}')" title="PDF 편집기를 새 창에서 엽니다. 이 파일은 자동으로 열리지 않으니(외부 편집기 한계), 다운로드된 파일을 편집기 창에 끌어다 놓으세요. 수정 후 다운로드하면 사건 폴더에 자동 저장됩니다.">✏️</a>`:''}
|
||||
${isPdf?`<a href="/pdf-editor-open?caseId=${encodeURIComponent(currentCaseId)}" target="_blank" class="dt-cl-del" style="opacity:.7" title="PDF 편집기를 새 창에서 엽니다. 이 파일은 자동으로 열리지 않으니(외부 편집기 한계), 편집기의 업로드 버튼에서 이 파일을 직접 선택하세요. 수정 후 다운로드하면 사건 폴더에 자동 저장됩니다.">✏️</a>`:''}
|
||||
${(f.category==='photo'||isText)?`<button class="dt-cl-del" onclick="dtQuickAddToTimeline('${escJsAttr(f.relPath)}',this)" title="날짜 인식 (타임라인 탭에서 확인 후 추가)">🕐+</button>
|
||||
<button class="dt-cl-del" onclick="dtManualDateSuggest('${escJsAttr(f.relPath)}',this)" title="날짜 인식">📅</button>`:''}
|
||||
<button class="dt-cl-del" onclick="deleteFile('${escJsAttr(f.relPath)}')" title="삭제">✕</button>
|
||||
|
||||
Reference in new issue
Block a user