Compare commits

..

2 Commits

3 changed files with 8 additions and 5 deletions

View File

@ -83,10 +83,11 @@ $(document).on('click', '.uploadedFileDelete', function (){
}) })
$(document).on('click', '.fileDownLink', function (){ $(document).on('click', '.fileDownLink', function (){
const target = $(this)
let url = "/file/fileDownload?" let url = "/file/fileDownload?"
url += "board="+$(this).attr("data-board"); url += "board="+target.attr("data-board");
url += "&parentKey="+Number($("#viewModalPlanKey").val()); url += "&parentKey="+target.attr("data-parentkey");
url += "&fileSeq="+$(this).attr("data-fileseq"); url += "&fileSeq="+target.attr("data-fileseq");
window.open(encodeURI(url)); window.open(encodeURI(url));
}) })

View File

@ -79,7 +79,8 @@
<th:block th:unless="${#lists.isEmpty(plan.fileList)}"> <th:block th:unless="${#lists.isEmpty(plan.fileList)}">
<th:block th:each="file:${plan.fileList}"> <th:block th:each="file:${plan.fileList}">
<tr class="fileInfoTr"> <tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="monthPlan" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td> <td><a href="#" class="fileDownLink" data-board="monthPlan"
th:data-parentkey="${file.planKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td> <td th:text="${file.fileSize}"></td>
</tr> </tr>
</th:block> </th:block>

View File

@ -56,7 +56,8 @@
<th:block th:unless="${#lists.isEmpty(info.fileList)}"> <th:block th:unless="${#lists.isEmpty(info.fileList)}">
<th:block th:each="file:${info.fileList}"> <th:block th:each="file:${info.fileList}">
<tr class="fileInfoTr"> <tr class="fileInfoTr">
<td><a href="#" class="fileDownLink" data-board="monthPlan" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td> <td><a href="#" class="fileDownLink" data-board="publicFile"
th:data-parentkey="${file.publicKey}" th:data-fileseq="${file.fileSeq}" th:text="|${file.origNm}.${file.fileExtn}|"></a></td>
<td th:text="${file.fileSize}"></td> <td th:text="${file.fileSize}"></td>
</tr> </tr>
</th:block> </th:block>