File manager - Edit - /home/gzbnyc5/pty-app/realstate/public/js/pty.v2.admin.documents.table.js
Back
const tableColumnTemplateOverride = { file_path: function (row, index, datatable) { if (!row.file_path) { return ""; } let originalName = row.file_path; return `<a target="_blank" class="btn btn-icon btn-active-light-primary w-30px h-30px me-3 pty-row-download-file" data-pty-file-id="0" data-pty-file-path="${row.file_path}" data-pty-file-original-name="${originalName}" href="${viewUrls["download-file"] + "?fileName=" + encodeURIComponent(row.file_path)}"> <span class="svg-icon svg-icon-3"> ${SvgIcons.downloadFile} </span> <!--end::Svg Icon--> </a>`; }, url: function(row, index, datatable) { if( !row.url ) { return ''; } return `<a target="_blank" class="" href="${row.url}" > ${row.url} </a>`; } }; const PtyListingUpdateService = (function () { const initListingUpdateRowOptions = function () { $(document).on("click", ".pty-row-download-file", function () { const documentId = this.dataset.ptyDocumentId; const documentName = this.dataset.ptyDocumentName; $.ajax({ url: viewUrls["download-file"], data: { id: documentId, name: documentName }, method: "POST", dataType: "JSON", success: function (data) { if (data.error == 0) { var tempForm = $( '<form action="' + viewUrls["download-file"] + '" method="POST">' + '<input type="hidden" name="id" value="' + documentId + '">' + '<input type="hidden" name="_token" value="' + $('meta[name="csrf-token"]').attr("content") + '">' + "</form>" ); $("body").append(tempForm); tempForm.submit(); tempForm.remove(); } }, error: function (data) {}, }); }); }; return { init: function () { initListingUpdateRowOptions(); }, }; })();
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0 |
proxy
|
phpinfo
|
Settings