-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from valincius/release-3.0.0
Release 3.0.0 - API overhaul
- Loading branch information
Showing
36 changed files
with
763 additions
and
406 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Microsoft.AspNetCore.Components; | ||
using Microsoft.AspNetCore.Components.Web; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace BlazorScheduler | ||
{ | ||
public partial class Appointment : ComponentBase, IDisposable | ||
{ | ||
[CascadingParameter] public Scheduler Scheduler { get; set; } | ||
|
||
[Parameter] public RenderFragment ChildContent { get; set; } | ||
|
||
[Parameter] public Func<Task> OnClick { get; set; } | ||
|
||
[Parameter] public DateTime Start { get; set; } | ||
[Parameter] public DateTime End { get; set; } | ||
[Parameter] public string Color { get; set; } | ||
|
||
protected override void OnInitialized() | ||
{ | ||
Scheduler.AddAppointment(this); | ||
base.OnInitialized(); | ||
} | ||
|
||
public void Click(MouseEventArgs e) | ||
{ | ||
OnClick?.Invoke(); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
Scheduler.RemoveAppointment(this); | ||
GC.SuppressFinalize(this); | ||
} | ||
} | ||
} |
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,9 +1,15 @@ | ||
namespace BlazorScheduler.Configuration | ||
using System; | ||
|
||
namespace BlazorScheduler.Configuration | ||
{ | ||
public class Config | ||
{ | ||
public bool AlwaysShowYear { get; set; } = true; | ||
public int MaxVisibleAppointmentsPerDay { get; set; } = 5; | ||
public bool DisableDragging { get; set; } = false; | ||
public string ThemeColor { get; set; } = "aqua"; | ||
public DayOfWeek StartDayOfWeek { get; set; } = DayOfWeek.Sunday; | ||
public string TodayButtonText { get; set; } = "Today"; | ||
public string PlusOthersText { get; set; } = "+ {n} others"; | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
BlazorScheduler/Internal/Components/SchedulerAllDayAppointment.razor
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,7 +1,7 @@ | ||
@typeparam T | ||
@namespace BlazorScheduler.Internal.Components | ||
|
||
<div class="appointment @Classes.AsString()" | ||
style="--start: @Start; --end: @End; --order: @Order; background-color: @BackgroundColor; color: @TextColor;" | ||
@onclick="e => Scheduler.OnAppointmentClick(Appointment, e)"> | ||
@Appointment.Title | ||
style="--start: @Start; --end: @End; --order: @Order; background-color: @Appointment.Color;" | ||
@onclick="Appointment.Click"> | ||
@Appointment.ChildContent | ||
</div> |
Oops, something went wrong.