Added a selective interface for import and export

This commit is contained in:
PeekabooSteam
2023-11-16 21:44:40 +00:00
parent b89c5142b6
commit 210c1fbecf
8 changed files with 258 additions and 104 deletions

View File

@@ -1,6 +1,17 @@
<%- include('dialogs/advancedsettings.ejs') %>
<%- include('dialogs/commandmodesettings.ejs') %>
<%- include('dialogs/customformation.ejs') %>
<%- include('dialogs/importexport.ejs') %>
<%- include('dialogs/importexport.ejs', {
"dialogId": "unit-export-dialog",
"submitButtonText": "Export units to file",
"textContent": "Select the unit categories you would like to export. Note: only ground and naval units can be exported at this time.",
"title": "Export"
}) %>
<%- include('dialogs/importexport.ejs', {
"dialogId": "unit-import-dialog",
"submitButtonText": "Import units into mission",
"textContent": "Select the unit categories you would like to import.",
"title": "Import"
}) %>
<%- include('dialogs/slowdelete.ejs') %>
<%- include('dialogs/splash.ejs') %>

View File

@@ -1,11 +1,11 @@
<div id="unit-import-export-dialog" class="ol-panel ol-dialog hide" oncontextmenu="return false;">
<div id="<%= dialogId %>" class="ol-panel ol-dialog file-import-export hide" oncontextmenu="return false;">
<div class="ol-dialog-header">
<h3 class="export">Export unit data to file</h3>
<h3><%= title %></h3>
</div>
<div class="ol-dialog-content">
<p>Note: only ground and naval units can be exported at this time. (Air units will be possible <em>soon</em>.)</p>
<table>
<p><%= textContent %></p>
<table class="categories-coalitions">
<thead>
</thead>
<tbody>
@@ -14,8 +14,7 @@
</div>
<div class="ol-dialog-footer ol-group">
<button class="start-transfer import">Import units into mission</button>
<button class="start-transfer export">Export units to file</button>
<button data-on-click="closeDialog">Cancel</button>
<button class="start-transfer"><%= submitButtonText %></button>
<button data-on-click="closeDialog">Close</button>
</div>
</div>