Merge branch 'release/FixPeriodoTranslation'
This commit is contained in:
@@ -31,4 +31,52 @@
|
||||
<ProjectReference Include="..\EgwCoreLib.Razor\EgwCoreLib.Razor.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\font\lato-v17-latin-regular.eot">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\lato-v17-latin-regular.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\lato-v17-latin-regular.ttf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\lato-v17-latin-regular.woff">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\lato-v17-latin-regular.woff2">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-condensed-v19-latin-regular.eot">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-condensed-v19-latin-regular.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-condensed-v19-latin-regular.ttf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-condensed-v19-latin-regular.woff">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-condensed-v19-latin-regular.woff2">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-v27-latin-regular.eot">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-v27-latin-regular.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-v27-latin-regular.ttf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-v27-latin-regular.woff">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Update="wwwroot\font\roboto-v27-latin-regular.woff2">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/TestComponenti"
|
||||
@using EgwCoreLib.Utils
|
||||
@using static EgwCoreLib.Razor.Sorter
|
||||
|
||||
@inject NavigationManager NavMan
|
||||
@@ -196,6 +197,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="card">
|
||||
<div class="card-header"><h4>Test Periodo</h4></div>
|
||||
<div class="card-body small">
|
||||
<h5>standard</h5>
|
||||
<PeriodoSel></PeriodoSel>
|
||||
<h5>custom</h5>
|
||||
<PeriodoSel DictSelect="@CustomSelDict"></PeriodoSel>
|
||||
<div class="condensed">
|
||||
<PeriodoSel DictSelect="@CustomSelDict"></PeriodoSel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
@@ -287,7 +302,28 @@
|
||||
Tooltip = $"Switch {i:00}"
|
||||
});
|
||||
}
|
||||
|
||||
// preparo sel periodo custom (es traduzioni)...
|
||||
CustomSelDict = Enum.GetValues(typeof(DtUtils.PeriodSet))
|
||||
.Cast<DtUtils.PeriodSet>()
|
||||
.ToDictionary(e => e, e => Traduci(e.ToString()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mockup traduzione termini
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
private string Traduci(string lemma)
|
||||
{
|
||||
return $"IT | {lemma}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Periodo custom selezione valori
|
||||
/// </summary>
|
||||
private Dictionary<DtUtils.PeriodSet, string>? CustomSelDict = new();
|
||||
|
||||
async void LocationChanged(object sender, LocationChangedEventArgs e)
|
||||
{
|
||||
qsNome = NavMan.ExtractQueryStringByKey<string>("Nome");
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* lato-regular - latin */
|
||||
@font-face {
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('../fonts/lato-v17-latin-regular.eot'); /* IE9 Compat Modes */
|
||||
src: local(''), url('../fonts/lato-v17-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('../fonts/lato-v17-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url('../fonts/lato-v17-latin-regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../fonts/lato-v17-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url('../fonts/lato-v17-latin-regular.svg#Lato') format('svg'); /* Legacy iOS */
|
||||
}
|
||||
/* roboto-regular - latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('../fonts/roboto-v27-latin-regular.eot'); /* IE9 Compat Modes */
|
||||
src: local(''), url('../fonts/roboto-v27-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('../fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url('../fonts/roboto-v27-latin-regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../fonts/roboto-v27-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url('../fonts/roboto-v27-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
|
||||
}
|
||||
/* roboto-condensed-regular - latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto Condensed';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('../fonts/roboto-condensed-v19-latin-regular.eot'); /* IE9 Compat Modes */
|
||||
src: local(''), url('../fonts/roboto-condensed-v19-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('../fonts/roboto-condensed-v19-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url('../fonts/roboto-condensed-v19-latin-regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../fonts/roboto-condensed-v19-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url('../fonts/roboto-condensed-v19-latin-regular.svg#RobotoCondensed') format('svg'); /* Legacy iOS */
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
|
||||
@import url('font.css');
|
||||
|
||||
html, body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-family: Roboto,sans-serif;
|
||||
}
|
||||
|
||||
.condensed {
|
||||
font-family: 'Roboto Condensed', sans-serif;
|
||||
}
|
||||
|
||||
h1:focus {
|
||||
|
||||
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
@@ -1,16 +1,16 @@
|
||||
@using EgwCoreLib.Utils;
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Periodo</span>
|
||||
<span class="input-group-text">@PeriodoLabel</span>
|
||||
<input type="date" class="form-control" @bind-value="@Inizio">
|
||||
<input type="date" class="form-control" @bind-value="@Fine">
|
||||
<select @bind="@PerSelect" class="form-select form-select-sm">
|
||||
@foreach (var item in periodList)
|
||||
<select @bind="@PerSelect" class="form-select form-select-sm bg-opacity-10 flex-grow-0 w-auto ps-2">
|
||||
@foreach (var item in DictSelect ?? new())
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
<option value="@item.Key">@item.Value</option>
|
||||
|
||||
}
|
||||
</select>
|
||||
<span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -7,13 +7,6 @@ namespace EgwCoreLib.Razor
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DtUtils.Periodo> E_PeriodoSel { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Parameter]
|
||||
public DtUtils.Periodo CurrPeriodo
|
||||
{
|
||||
@@ -28,7 +21,43 @@ namespace EgwCoreLib.Razor
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime Fine
|
||||
[Parameter]
|
||||
public Dictionary<DtUtils.PeriodSet, string>? DictSelect { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DtUtils.Periodo> E_PeriodoSel { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string PeriodoLabel { get; set; } = "Periodo";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await E_PeriodoSel.InvokeAsync(CurrPeriodo);
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
// se fosse vuoto il dizionario lo preparo...
|
||||
if (DictSelect == null || DictSelect.Count == 0)
|
||||
{
|
||||
// inizializzo!
|
||||
DictSelect = Enum.GetValues(typeof(DtUtils.PeriodSet))
|
||||
.Cast<DtUtils.PeriodSet>()
|
||||
.ToDictionary(e => e, e => $"{e}");
|
||||
}
|
||||
|
||||
}
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private DtUtils.Periodo currPeriodo { get; set; } = new DtUtils.Periodo();
|
||||
|
||||
private DateTime Fine
|
||||
{
|
||||
get => CurrPeriodo.Fine;
|
||||
set
|
||||
@@ -42,7 +71,7 @@ namespace EgwCoreLib.Razor
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime Inizio
|
||||
private DateTime Inizio
|
||||
{
|
||||
get => CurrPeriodo.Inizio;
|
||||
set
|
||||
@@ -56,9 +85,13 @@ namespace EgwCoreLib.Razor
|
||||
}
|
||||
}
|
||||
|
||||
protected List<string> periodList { get => Enum.GetNames(typeof(DtUtils.PeriodSet)).ToList(); }
|
||||
#if false
|
||||
private List<string> periodList { get => Enum.GetNames(typeof(DtUtils.PeriodSet)).ToList(); }
|
||||
#endif
|
||||
|
||||
protected string PerSelect
|
||||
private string perSelect { get; set; } = "Select";
|
||||
|
||||
private string PerSelect
|
||||
{
|
||||
get => perSelect;
|
||||
set
|
||||
@@ -73,22 +106,6 @@ namespace EgwCoreLib.Razor
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await E_PeriodoSel.InvokeAsync(CurrPeriodo);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private DtUtils.Periodo currPeriodo { get; set; } = new DtUtils.Periodo();
|
||||
private string perSelect { get; set; } = "Select";
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user