mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
Moved template modal outside of add modal.
This commit is contained in:
parent
4c30939339
commit
c582f5f5c7
@ -101,10 +101,6 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="#" onclick="savePlanRecordTemplate()">@translator.Translate(userLanguage, "Save as Template")</a></li>
|
<li><a class="dropdown-item" href="#" onclick="savePlanRecordTemplate()">@translator.Translate(userLanguage, "Save as Template")</a></li>
|
||||||
@if (!Model.CreatedFromReminder)
|
|
||||||
{
|
|
||||||
<li><a class="dropdown-item" href="#" onclick="showPlanRecordTemplatesModal()">@translator.Translate(userLanguage, "View Templates")</a></li>
|
|
||||||
}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,8 @@
|
|||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a class="dropdown-item" href="#" onclick="showBulkImportModal('PlanRecord')">@translator.Translate(userLanguage,"Import via CSV")</a></li>
|
<li><a class="dropdown-item" href="#" onclick="showBulkImportModal('PlanRecord')">@translator.Translate(userLanguage,"Import via CSV")</a></li>
|
||||||
<li><a class="dropdown-item" href="#" onclick="exportVehicleData('PlanRecord')">@translator.Translate(userLanguage,"Export to CSV")</a></li>
|
<li><a class="dropdown-item" href="#" onclick="exportVehicleData('PlanRecord')">@translator.Translate(userLanguage,"Export to CSV")</a></li>
|
||||||
|
<li><hr class="dropdown-divider"></li>
|
||||||
|
<li><a class="dropdown-item" href="#" onclick="showPlanRecordTemplatesModal()">@translator.Translate(userLanguage, "View Templates")</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@ -102,7 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal fade" data-bs-focus="false" id="planRecordTemplateModal" tabindex="-1" role="dialog" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
<div class="modal fade" data-bs-focus="false" id="planRecordTemplateModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg" role="document">
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
<div class="modal-content" id="planRecordTemplateModalContent">
|
<div class="modal-content" id="planRecordTemplateModalContent">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -98,22 +98,19 @@ function showPlanRecordTemplatesModal() {
|
|||||||
$.get(`/Vehicle/GetPlanRecordTemplatesForVehicleId?vehicleId=${vehicleId}`, function (data) {
|
$.get(`/Vehicle/GetPlanRecordTemplatesForVehicleId?vehicleId=${vehicleId}`, function (data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
$("#planRecordTemplateModalContent").html(data);
|
$("#planRecordTemplateModalContent").html(data);
|
||||||
hideAddPlanRecordModal();
|
|
||||||
$('#planRecordTemplateModal').modal('show');
|
$('#planRecordTemplateModal').modal('show');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function hidePlanRecordTemplatesModal() {
|
function hidePlanRecordTemplatesModal() {
|
||||||
$('#planRecordTemplateModal').modal('hide');
|
$('#planRecordTemplateModal').modal('hide');
|
||||||
$('#planRecordModal').modal('show');
|
|
||||||
}
|
}
|
||||||
function usePlannerRecordTemplate(planRecordTemplateId) {
|
function usePlannerRecordTemplate(planRecordTemplateId) {
|
||||||
$.post(`/Vehicle/ConvertPlanRecordTemplateToPlanRecord?planRecordTemplateId=${planRecordTemplateId}`, function (data) {
|
$.post(`/Vehicle/ConvertPlanRecordTemplateToPlanRecord?planRecordTemplateId=${planRecordTemplateId}`, function (data) {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
var vehicleId = GetVehicleId().vehicleId;
|
var vehicleId = GetVehicleId().vehicleId;
|
||||||
successToast(data.message);
|
successToast(data.message);
|
||||||
$('#planRecordTemplateModal').modal('hide');
|
hidePlanRecordTemplatesModal();
|
||||||
hideAddPlanRecordModal();
|
|
||||||
saveScrollPosition();
|
saveScrollPosition();
|
||||||
getVehiclePlanRecords(vehicleId);
|
getVehiclePlanRecords(vehicleId);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user