From 941c141db7cafa93b2f256229fdf6b1361b1cdc7 Mon Sep 17 00:00:00 2001 From: Steven Owen Nell <12516056+StevenOwenNell@users.noreply.github.com> Date: Sun, 23 Jun 2019 17:40:20 +0200 Subject: [PATCH 1/3] Removed 'Base' from all 'PageBase' --- docs/en/Tutorials/AspNetCore-Mvc/Part-II.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md index 180133d713..067adcc756 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md @@ -63,7 +63,7 @@ Open the `CreateModal.cshtml` file and paste the code below: ````html @page -@inherits Acme.BookStore.Web.Pages.BookStorePageBase +@inherits Acme.BookStore.Web.Pages.BookStorePage @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal @model Acme.BookStore.Web.Pages.Books.CreateModalModel @{ @@ -207,7 +207,7 @@ Replace `EditModal.cshtml` content with the following content: ````html @page -@inherits Acme.BookStore.Web.Pages.BookStorePageBase +@inherits Acme.BookStore.Web.Pages.BookStorePage @using Acme.BookStore.Web.Pages.Books @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal @model EditModalModel From daaa8a917a3d83834531e1f564f8bc506f891795 Mon Sep 17 00:00:00 2001 From: Steven Owen Nell <12516056+StevenOwenNell@users.noreply.github.com> Date: Sun, 23 Jun 2019 17:42:31 +0200 Subject: [PATCH 2/3] Removed 'Base' from 'BookStorePageModelBase' --- docs/en/Tutorials/AspNetCore-Mvc/Part-II.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md index 067adcc756..1f76d3bf38 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md @@ -32,7 +32,7 @@ using Microsoft.AspNetCore.Mvc; namespace Acme.BookStore.Web.Pages.Books { - public class CreateModalModel : BookStorePageModelBase + public class CreateModalModel : BookStorePageModel { [BindProperty] public CreateUpdateBookDto Book { get; set; } @@ -53,7 +53,7 @@ namespace Acme.BookStore.Web.Pages.Books } ```` -* This class is derived from the `BookStorePageModelBase` instead of standard `PageModel`. `BookStorePageModelBase` inherits the `PageModel` and adds some common properties/methods those can be used by your page model classes. +* This class is derived from the `BookStorePageModel` instead of standard `PageModel`. `BookStorePageModel` inherits the `PageModel` and adds some common properties/methods those can be used by your page model classes. * `[BindProperty]` attribute on the `Book` property binds post request data to this property. * This class simply injects the `IBookAppService` in its constructor and calls the `CreateAsync` method in the `OnPostAsync` handler. @@ -145,7 +145,7 @@ using Microsoft.AspNetCore.Mvc; namespace Acme.BookStore.Web.Pages.Books { - public class EditModalModel : BookStorePageModelBase + public class EditModalModel : BookStorePageModel { [HiddenInput] [BindProperty(SupportsGet = true)] From ae2c446ed70b8b6e07ef677052839367fd53d9a7 Mon Sep 17 00:00:00 2001 From: Steven Owen Nell <12516056+StevenOwenNell@users.noreply.github.com> Date: Sun, 23 Jun 2019 18:49:23 +0200 Subject: [PATCH 3/3] Corrected Documentation --- docs/en/Tutorials/AspNetCore-Mvc/Part-II.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md index 1f76d3bf38..eb583c2a51 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-II.md @@ -313,10 +313,12 @@ $(function () { ```` * Used `abp.localization.getResource('BookStore')` to be able to use the same localization texts defined on the server side. +* Added a new `ModalManager` named `createModal` to open the create modal dialog. * Added a new `ModalManager` named `editModal` to open the edit modal dialog. * Added a new column at the beginning of the `columnDefs` section. This column is used for the "Actions" dropdown button. +* "New Book" action simply calls `createModal.open` to open the create dialog. * "Edit" action simply calls `editModal.open` to open the edit dialog. - +` You can run the application and edit any book by selecting the edit action. ### Deleting an Existing Book @@ -355,6 +357,12 @@ $(function () { var editModal = new abp.ModalManager(abp.appPath + 'Books/EditModal'); var dataTable = $('#BooksTable').DataTable(abp.libs.datatables.normalizeConfiguration({ + processing: true, + serverSide: true, + paging: true, + searching: false, + autoWidth: false, + scrollCollapse: true, order: [[1, "asc"]], ajax: abp.libs.datatables.createAjax(acme.bookStore.book.getList), columnDefs: [