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

@@ -6,7 +6,7 @@
* files about a location, and what a service depends on.
*
* One handler for every pair LINK_RELATIONS knows (functions/links.php):
* link_items links any number of records at once, unlink_item drops one.
* unlink_item drops one. Linking is the Link picker's (functions/link_picker.php).
* The older one-pair-each names (link_asset_to_document, unlink_contact_from_file
* and so on) are still answered here, so a link built by any page or older
* modal keeps working - and gets the same checks: the same client, nothing
@@ -63,11 +63,6 @@ function linkHandle($action, $from, $id, $to, $ids) {
redirect();
}
if (isset($_POST['link_items'])) {
$ids = $_POST['ids'] ?? [];
linkHandle('link', (string) ($_POST['from'] ?? ''), intval($_POST['id'] ?? 0), (string) ($_POST['to'] ?? ''), is_array($ids) ? $ids : [$ids]);
}
if (isset($_GET['unlink_item'])) {
linkHandle('unlink', (string) ($_GET['from'] ?? ''), intval($_GET['id'] ?? 0), (string) ($_GET['to'] ?? ''), [intval($_GET['other'] ?? 0)]);
}