Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Repaired bugs in RenderableContentControl
  • Loading branch information
Brano5 committed Aug 1, 2023
commit 97730d5392bb4be5f466c7e1bd3030ae65b17d8b
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
@typeparam T
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<T>
@namespace AXSharp.Presentation.Blazor.Controls.Templates

@typeparam T

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type=@IsNumeric(typeof(T))
step=any
@onfocus="@( () => {HasFocus = true; LastValue = Onliner.LastValue;} )"
@onblur="@( () => HasFocus = false )"
@bind="Value" />

@onfocus="@(() => { HasFocus = true; LastValue = Onliner.LastValue; })"
@onblur="@(() => HasFocus = false)"
@bind="Value">
</TemplateView>


@code{

@code {
private string IsNumeric(Type type)
{
if (type == null) return "text";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
@inherits TemplateBaseOnline<bool>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">
<label for="@ComponentId" >@Onliner.AttributeName</label>
<label for="@ComponentId">@Onliner.AttributeName</label>
<div class="form-check form-switch">
<input id="@ComponentId"
disabled="@IsReadOnly"
class="form-check-input @AccessStatus"
type="checkbox"
@bind="Value">

</div>
</TemplateView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
@inherits TemplateBaseOnline<DateOnly>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@ComponentId" >@Onliner.AttributeName</label>
<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="date"
@bind="Value" />

readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="date"
@bind="Value">
</TemplateView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
@inherits TemplateBaseOnline<DateTime>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@ComponentId" >@Onliner.AttributeName</label>
<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="datetime-local"
step=1
name="onlineDateTime"
@bind="Value">

readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="datetime-local"
@bind="Value">
</TemplateView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<DateTime>

<OnlinerDateTimeControlView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<OnlinerTimeControlView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<OnlinerTimeControlView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">
<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="time"
value="@Onliner.Cyclic"
@onchange="ValueChanged">
</TemplateView>

@code
{
private void ValueChanged(ChangeEventArgs args)
{
try
{
Onliner.Edit = TimeSpan.Parse(args.Value.ToString());
}
catch
{
//do nothing
}
}
}
Original file line number Diff line number Diff line change
@@ -1,33 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@ComponentId" >@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="time"
step="1"
name="onlineTime"
value="@Onliner.Cyclic"
@onchange="ValueChanged">

</TemplateView>
@code
{
private void ValueChanged(ChangeEventArgs args)
{
try
{
var parsedTimeSpan = TimeSpan.Parse(args.Value.ToString());
Onliner.Edit = parsedTimeSpan;

}
catch
{
//do nothing
}

}
}
<OnlinerTimeControlView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@typeparam T
@inherits TemplateBaseOnline<T>
<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@(ComponentId)" >@Onliner.AttributeName</label>
<input id="@(ComponentId)"
readonly="readonly"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
type="text"
step=any
[email protected] />
@typeparam T

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">
<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="readonly"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
type="text"
step=any
[email protected]>
</TemplateView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
@inherits TemplateBaseOnline<bool>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@(ComponentId)" >@Onliner.AttributeName</label>
<label for="@ComponentId">@Onliner.AttributeName</label>
<div class="form-check form-switch">
<input id="@(ComponentId)"
<input id="@ComponentId"
disabled
class="form-check-input @AccessStatus"
type="checkbox"
@bind="Onliner.Cyclic"
disabled>
@bind="Onliner.Cyclic">
</div>

</TemplateView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
@inherits TemplateBaseOnline<DateOnly>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@(ComponentId)" >@Onliner.AttributeName</label>
<input id="@(ComponentId)"
readonly="readonly"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
type="date"
[email protected] />

<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="readonly"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
type="text"
value="@Onliner.Cyclic">
</TemplateView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
@inherits TemplateBaseOnline<DateTime>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@(ComponentId)" >@Onliner.AttributeName</label>
<input id="@(ComponentId)"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
readonly="readonly"
type="datetime"
[email protected] />

<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="readonly"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
type="text"
value="@Onliner.Cyclic">
</TemplateView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<DateTime>

<OnlinerDateTimeDisplayView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<OnlinerTimeDisplayView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<OnlinerTimeDisplayView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">
<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="readonly"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
type="text"
value="@Onliner.Cyclic">
</TemplateView>
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseOnline<TimeSpan>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">
<label for="@(ComponentId)" >@Onliner.AttributeName</label>
<input id="@(ComponentId)"
class="w-100 form-control @AccessStatus"
style=@(IsReadOnly? "" : "background-color:transparent")
type="text"
value="@Onliner.Cyclic"
readonly="readonly">


</TemplateView>
<OnlinerTimeDisplayView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@typeparam T
@inherits TemplateBaseShadow<T>
@typeparam T

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@ComponentId" >@Onliner.AttributeName</label>
<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="@IsNumeric(typeof(T))"
step=any
@[email protected] />
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="@IsNumeric(typeof(T))"
step=any
@[email protected]>
</TemplateView>
@code
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
@inherits TemplateBaseShadow<bool>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">
<label for="@ComponentId" >@Onliner.AttributeName</label>
<label for="@ComponentId">@Onliner.AttributeName</label>
<div class="form-check form-switch">
<input id="@ComponentId"
disabled="@IsReadOnly"
class="form-check-input @AccessStatus"
type="checkbox"
@bind="Onliner.Shadow">
@bind="@Onliner.Shadow">
</div>
</TemplateView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
@inherits TemplateBaseShadow<DateOnly>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@ComponentId" >@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="date"
@bind="@Onliner.Shadow" />

<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="date"
@bind="Value">
</TemplateView>
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
@inherits TemplateBaseShadow<DateTime>

<TemplateView Symbol="@OnlinerSymbol" FailureReason="@Onliner.AccessStatus.FailureReason">

<label for="@ComponentId" >@Onliner.AttributeName</label>
<label for="@ComponentId">@Onliner.AttributeName</label>
<input id="@ComponentId"
readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="datetime-local"
step=1
name="onlineDateTime"
@bind="Onliner.Shadow">

readonly="@IsReadOnly"
class="w-100 form-control @AccessStatus"
type="datetime-local"
@bind="Value">
</TemplateView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@namespace AXSharp.Presentation.Blazor.Controls.Templates
@inherits TemplateBaseShadow<DateTime>

<OnlinerDateTimeShadowControlView Onliner="Onliner" IsReadOnly="IsReadOnly" PollingInterval="PollingInterval" />
Loading