Link opens the standard picker under the button instead of a window - linked records ticked, tick to link and untick to unlink, saved when the picker closes with one message - for every record link, contact and asset credentials, a contact's assets, project and service tickets, a ticket's services and related tickets, with a document's or file's Link grouped by kind and quick looks reloading in place; the old link windows and the handlers only they used are removed

This commit is contained in:
johnnyq
2026-11-20 18:23:48 -05:00
parent c1bdc99c14
commit 8ac88a48fd
54 changed files with 837 additions and 1252 deletions

View File

@@ -244,7 +244,7 @@ function filesItemMenu($item) {
$html .= '<div class="dropdown-divider"></div>';
$html .= "<a class=\"dropdown-item ajax-modal\" href=\"#\" data-modal-url=\"modals/file/file_rename.php?id=$id\"><i class=\"fas fa-fw fa-pen me-2\"></i>Rename</a>";
$html .= "<a class=\"dropdown-item ajax-modal\" href=\"#\" data-modal-url=\"modals/file/file_move.php?id=$id\"><i class=\"fas fa-fw fa-folder-open me-2\"></i>Move</a>";
$html .= "<a class=\"dropdown-item ajax-modal\" href=\"#\" data-modal-url=\"modals/link/link.php?from=file&amp;id=$id\"><i class=\"fas fa-fw fa-link me-2\"></i>Link</a>";
$html .= linkPickerButton('file', $id, '', 'Link', 'dropdown-item', 'fas fa-fw fa-link me-2');
}
$archive_name = 'file';
} else {
@@ -262,7 +262,7 @@ function filesItemMenu($item) {
$favorite = !empty($item['row']['document_favorite']);
$html .= "<a class=\"dropdown-item\" href=\"post.php?toggle_document_favorite=$id&amp;csrf_token=$csrf\" title=\"Favorites show on the client's overview\"><i class=\"" . ($favorite ? 'far' : 'fas') . " fa-fw fa-star me-2\"></i>" . ($favorite ? 'Unfavorite' : 'Favorite') . "</a>";
$html .= "<a class=\"dropdown-item ajax-modal\" href=\"#\" data-modal-url=\"modals/document/document_move.php?id=$id\"><i class=\"fas fa-fw fa-folder-open me-2\"></i>Move</a>";
$html .= "<a class=\"dropdown-item ajax-modal\" href=\"#\" data-modal-url=\"modals/link/link.php?from=document&amp;id=$id\"><i class=\"fas fa-fw fa-link me-2\"></i>Link</a>";
$html .= linkPickerButton('document', $id, '', 'Link', 'dropdown-item', 'fas fa-fw fa-link me-2');
}
$archive_name = 'document';
}