From 8dda227af4e8b78d08d82dabda13678a11f508e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 24 Jan 2021 18:55:49 +0300 Subject: [PATCH] Fix widgets. --- .../Components/AttendeesArea/RegistrationAreaViewComponent.cs | 4 ++-- .../RegistrationArea/RegistrationAreaViewComponent.cs | 2 +- .../Events/Components/RegistrationArea/registration-area.js | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eventhub/src/EventHub.Web/Pages/Events/Components/AttendeesArea/RegistrationAreaViewComponent.cs b/eventhub/src/EventHub.Web/Pages/Events/Components/AttendeesArea/RegistrationAreaViewComponent.cs index f301829..64c592e 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/Components/AttendeesArea/RegistrationAreaViewComponent.cs +++ b/eventhub/src/EventHub.Web/Pages/Events/Components/AttendeesArea/RegistrationAreaViewComponent.cs @@ -8,7 +8,7 @@ namespace EventHub.Web.Pages.Events.Components.AttendeesArea { [Widget( AutoInitialize = true, - RefreshUrl = "/Widgets/EventRegistrationArea" + RefreshUrl = "/Widgets/EventAttendeesArea" )] public class AttendeesAreaViewComponent : AbpViewComponent { @@ -18,7 +18,7 @@ namespace EventHub.Web.Pages.Events.Components.AttendeesArea public async Task InvokeAsync(Guid eventId) { - return View(); + return View("~/Pages/Events/Components/AttendeesArea/Default.cshtml"); } } } diff --git a/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/RegistrationAreaViewComponent.cs b/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/RegistrationAreaViewComponent.cs index 2ed8f60..c3cec29 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/RegistrationAreaViewComponent.cs +++ b/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/RegistrationAreaViewComponent.cs @@ -19,7 +19,7 @@ namespace EventHub.Web.Pages.Events.Components.RegistrationArea public async Task InvokeAsync(Guid eventId) { - return View(); + return View("~/Pages/Events/Components/RegistrationArea/Default.cshtml"); } } } diff --git a/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/registration-area.js b/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/registration-area.js index 14856cb..6fe3c35 100644 --- a/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/registration-area.js +++ b/eventhub/src/EventHub.Web/Pages/Events/Components/RegistrationArea/registration-area.js @@ -1,10 +1,12 @@ (function () { abp.widgets.RegistrationArea = function ($wrapper) { + var widgetManager = $wrapper.data('abp-widget-manager'); + function init() { $wrapper.find('#EventRegisterButton').click(function(e){ e.preventDefault(); - alert("TODO: register"); + widgetManager.refresh(); }); }