-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes issue #58 - message for samples
- Loading branch information
Showing
5 changed files
with
89 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,81 @@ | ||
@{ | ||
@{ | ||
ViewData["title"] = Localizer["CSV_ADD_TITLE"]; | ||
} | ||
|
||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a asp-controller="Home" asp-action="Index" class="navmenu">@Localizer["HOME"]</a></li> | ||
<li class="breadcrumb-item"><a asp-controller="Csv" asp-action="Index" class="navmenu">@Localizer["BREADCRUMB_CSV"]</a></li> | ||
<li class="breadcrumb-item active" aria-current="page">@Localizer["BREADCRUMB_CSV_ADD"]</li> | ||
</ol> | ||
</nav> | ||
|
||
<h2>@Localizer["CSV_ADD_TITLE"]</h2> | ||
|
||
@Html.Raw(Localizer["CSV_ADD_INTRO"]) | ||
|
||
<div class="input-group mb-0"> | ||
<div class="input-group-prepend"> | ||
<span class="input-group-text">@Localizer["CSV_ADD_MAINFILE"]</span> | ||
</div> | ||
<input type="text" class="form-control" id="fileMainCsv"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-outline-primary browse" type="button" data-input="fileMainCsv">@Localizer["BROWSE"]</button> | ||
</div> | ||
</div> | ||
<p class="mt-0 mb-3"> | ||
<small class="form-text text-muted">@Localizer["CSV_ADD_MAINFILE_DESC"]</small> | ||
</p> | ||
|
||
<!-- secondary CSV file --> | ||
<div class="input-group mb-0"> | ||
<div class="input-group-prepend"> | ||
<span class="input-group-text">@Localizer["CSV_ADD_SECONDARY"]</span> | ||
</div> | ||
<input type="text" class="form-control" id="fileSecondaryCsv"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-outline-secondary browse" type="button" data-input="fileSecondaryCsv">@Localizer["BROWSE"]</button> | ||
</div> | ||
</div> | ||
<p class="mt-0 mb-3"> | ||
<small class="form-text text-muted">@Localizer["CSV_ADD_SECONDARY_DESC"]</small> | ||
</p> | ||
|
||
<!-- target output file --> | ||
<div class="input-group mb-0"> | ||
<div class="input-group-prepend"> | ||
<span class="input-group-text">@Localizer["CSV_ADD_TARGET"]</span> | ||
</div> | ||
<input type="text" class="form-control" id="fileTarget"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-outline-secondary browse new" type="button" data-input="fileTarget">@Localizer["BROWSE"]</button> | ||
</div> | ||
</div> | ||
<p class="mt-0 mb-3"> | ||
<small class="form-text text-muted">@Localizer["CSV_ADD_TARGET_DESC"]</small> | ||
</p> | ||
|
||
<p class="mt-3"> | ||
<button type="button" id="buttonOk" class="btn btn-primary btn-lg btn-block">@Localizer["CSV_ADD_ADD"]</button> | ||
</p> | ||
|
||
@section Scripts { | ||
|
||
<script> | ||
$('#buttonOk').on('click', () => { | ||
// get paths from file inputs | ||
const main = $('#fileMainCsv').val(), | ||
secondary = $('#fileSecondaryCsv').val(), | ||
target = $('#fileTarget').val(); | ||
// check every path is filled | ||
if (main === '') { window.alert('@Localizer.Js("ERROR_NOCSV")'); return; } | ||
if (secondary === '') { window.alert('@Localizer.Js("ERROR_NOSECONDARYCSV")'); return; } | ||
if (target === '') { window.alert('@Localizer.Js("ERROR_NOTARGETCSV")'); return; } | ||
// execute action | ||
ipc('csv-merge', { main, secondary, target }); | ||
}); | ||
</script> | ||
|
||
} | ||
|
||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"><a asp-controller="Home" asp-action="Index" class="navmenu">@Localizer["HOME"]</a></li> | ||
<li class="breadcrumb-item"><a asp-controller="Csv" asp-action="Index" class="navmenu">@Localizer["BREADCRUMB_CSV"]</a></li> | ||
<li class="breadcrumb-item active" aria-current="page">@Localizer["BREADCRUMB_CSV_ADD"]</li> | ||
</ol> | ||
</nav> | ||
|
||
<h2>@Localizer["CSV_ADD_TITLE"]</h2> | ||
|
||
@Html.Raw(Localizer["CSV_ADD_INTRO"]) | ||
|
||
<div class="input-group mb-0"> | ||
<div class="input-group-prepend"> | ||
<span class="input-group-text">@Localizer["CSV_ADD_MAINFILE"]</span> | ||
</div> | ||
<input type="text" class="form-control" id="fileMainCsv"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-outline-primary browse" type="button" data-input="fileMainCsv">@Localizer["BROWSE"]</button> | ||
</div> | ||
</div> | ||
<p class="mt-0 mb-3"> | ||
<small class="form-text text-muted">@Localizer["CSV_ADD_MAINFILE_DESC"]</small> | ||
</p> | ||
|
||
<!-- secondary CSV file --> | ||
<div class="input-group mb-0"> | ||
<div class="input-group-prepend"> | ||
<span class="input-group-text">@Localizer["CSV_ADD_SECONDARY"]</span> | ||
</div> | ||
<input type="text" class="form-control" id="fileSecondaryCsv"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-outline-secondary browse" type="button" data-input="fileSecondaryCsv">@Localizer["BROWSE"]</button> | ||
</div> | ||
</div> | ||
<p class="mt-0 mb-3"> | ||
<small class="form-text text-muted">@Localizer["CSV_ADD_SECONDARY_DESC"]</small> | ||
</p> | ||
|
||
<!-- target output file --> | ||
<div class="input-group mb-0"> | ||
<div class="input-group-prepend"> | ||
<span class="input-group-text">@Localizer["CSV_ADD_TARGET"]</span> | ||
</div> | ||
<input type="text" class="form-control" id="fileTarget"> | ||
<div class="input-group-append"> | ||
<button class="btn btn-outline-secondary browse new" type="button" data-input="fileTarget">@Localizer["BROWSE"]</button> | ||
</div> | ||
</div> | ||
<p class="mt-0 mb-3"> | ||
<small class="form-text text-muted">@Localizer["CSV_ADD_TARGET_DESC"]</small> | ||
</p> | ||
|
||
<p class="mt-3"> | ||
<button type="button" id="buttonOk" class="btn btn-primary btn-lg btn-block">@Localizer["CSV_ADD_ADD"]</button> | ||
</p> | ||
|
||
@section Scripts { | ||
|
||
<script> | ||
$('#buttonOk').on('click', () => { | ||
// get paths from file inputs | ||
const main = $('#fileMainCsv').val(), | ||
secondary = $('#fileSecondaryCsv').val(), | ||
target = $('#fileTarget').val(); | ||
// check every path is filled | ||
if (main === '') { window.alert('@Localizer.Js("ERROR_NOCSV")'); return; } | ||
if (secondary === '') { window.alert('@Localizer.Js("ERROR_NOSECONDARYCSV")'); return; } | ||
if (target === '') { window.alert('@Localizer.Js("ERROR_NOTARGETCSV")'); return; } | ||
// execute action | ||
ipc('csv-merge', { main, secondary, target }); | ||
}); | ||
</script> | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters