feature: add select all/none attachments when submitting waranty/repair/insurance job

This commit is contained in:
Gary Sharp
2024-12-11 15:15:22 +11:00
parent 343f20980d
commit 25e3a8e1f1
15 changed files with 327 additions and 196 deletions
+12
View File
@@ -125,6 +125,9 @@
<table>
<tr>
<td>
<p id="publishJobAttachmentsSelect">
Select <a href="#" class="all">All</a> | <a href="#" class="none">None</a>
</p>
<div id="publishJobAttachments">
@foreach (var ja in Model.Job.JobAttachments)
{
@@ -210,5 +213,14 @@
}, 0);
return false;
});
$('#publishJobAttachmentsSelect').on('click', 'a', function (e) {
e.preventDefault();
var $i = $(e.currentTarget);
var $c = $i.hasClass('all');
setTimeout(function () {
$('#publishJobAttachments').find('input:not(:disabled)').prop('checked', $c);
}, 0);
return false;
});
});
</script>