From e51cdd7ceeda8becfda9e1855b39ee6de170340b Mon Sep 17 00:00:00 2001 From: volkanceylan Date: Thu, 10 Oct 2024 12:58:24 +0300 Subject: [PATCH] Remove _NorthwindLayout, use esbuild's css import system, remove Northwind/index.css, use Html.ModulePageInit extension so that css files are also included automatically --- .gitignore | 2 + .../Dialogs/ChartInDialog/Index.cshtml | 5 +-- .../CloneableEntityDialog/Index.cshtml | 5 +-- .../DefaultValuesInNewDialog/Index.cshtml | 5 +-- .../Dialogs/DialogBoxes/Index.cshtml | 5 +-- .../Dialogs/EntityDialogAsPanel/Index.cshtml | 5 +-- .../Dialogs/GetInsertedRecordId/Index.cshtml | 7 +--- .../Dialogs/OtherFormInTab/Index.cshtml | 5 +-- .../Dialogs/OtherFormInTabOneBar/Index.cshtml | 5 +-- .../Dialogs/PopulateLinkedData/Index.cshtml | 5 +-- .../Dialogs/ReadOnlyDialog/Index.cshtml | 5 +-- .../Dialogs/SerialAutoNumber/Index.cshtml | 8 ++-- .../Editors/ChangingLookupText/Index.cshtml | 5 +-- .../FilteredLookupInDetail/Index.cshtml | 5 +-- .../LookupFilterByMultipleValues/Index.cshtml | 5 +-- .../SelectWithHardcodedValues/Index.cshtml | 5 +-- .../Editors/StaticTextBlock/Index.cshtml | 5 +-- .../Grids/CustomLinksInGrid/Index.cshtml | 5 +-- .../Grids/EnablingRowSelection/Index.cshtml | 5 +-- .../Grids/GridFilteredByCriteria/Index.cshtml | 5 +-- .../GroupingAndSummariesInGrid/Index.cshtml | 7 +--- .../InitialValuesForQuickFilters/Index.cshtml | 5 +-- .../Grids/InlineActionButtons/Index.cshtml | 5 +-- .../Grids/InlineImageInGrid/Index.cshtml | 5 +-- .../Grids/RemovingAddButton/Index.cshtml | 5 +-- .../Grids/ViewWithoutID/Index.cshtml | 5 +-- .../Grids/WrappedHeaders/Index.cshtml | 5 +-- .../_ViewStart.cshtml | 1 - .../SerialAutoNumber/SerialAutoNumberPage.ts | 1 + .../Order/OrderIndex.cshtml | 5 +-- .../Product/ProductIndex.cshtml | 5 +-- .../_NorthwindLayout.cshtml | 6 --- .../Serenity.Demo.Northwind/_ViewStart.cshtml | 3 +- .../Imports/MVC/MVC.cs | 1 - .../Modules/Category/CategoryPage.cs | 2 +- .../Modules/Customer/CustomerDialog.css | 3 ++ .../Modules/Customer/CustomerDialog.tsx | 1 + .../Modules/Customer/CustomerPage.cs | 2 +- .../Note/NotesEditor.css} | 39 +------------------ .../Modules/Note/NotesEditor.tsx | 1 + .../Modules/Order/OrderDialog.css | 5 +++ .../Modules/Order/OrderDialog.ts | 1 + .../Modules/Order/OrderGrid.css | 5 +++ .../Modules/Order/OrderGrid.tsx | 1 + .../Modules/OrderDetail/OrderDetailDialog.css | 4 ++ .../Modules/OrderDetail/OrderDetailDialog.ts | 4 +- .../Modules/Product/ProductDialog.css | 7 ++++ .../Modules/Product/ProductDialog.ts | 1 + .../Modules/Product/ProductGrid.css | 9 +++++ .../Modules/Product/ProductGrid.ts | 4 +- .../Modules/Region/RegionPage.cs | 2 +- .../Modules/Shipper/ShipperPage.cs | 2 +- .../Modules/Supplier/SupplierPage.cs | 2 +- .../Modules/Territory/TerritoryPage.cs | 2 +- 54 files changed, 87 insertions(+), 171 deletions(-) delete mode 100644 src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_NorthwindLayout.cshtml create mode 100644 src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.css rename src/Serenity.Demo.Northwind/{wwwroot/index.css => Modules/Note/NotesEditor.css} (62%) create mode 100644 src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.css create mode 100644 src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.css create mode 100644 src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.css create mode 100644 src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.css create mode 100644 src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.css diff --git a/.gitignore b/.gitignore index 5d5c418c..a51b67cc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ out/ .vs/ /build/.nupkg/ node_modules/ +/src/*/dist/index.css +/src/*/dist/index.css.map /src/*/dist/index.js /src/*/dist/index.min.js /src/*/dist/index.js.map diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ChartInDialog/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ChartInDialog/Index.cshtml index 16b89a5c..2021ed15 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ChartInDialog/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ChartInDialog/Index.cshtml @@ -20,7 +20,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.ChartInDialogPage) diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/CloneableEntityDialog/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/CloneableEntityDialog/Index.cshtml index 1ce606bd..acf63f34 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/CloneableEntityDialog/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/CloneableEntityDialog/Index.cshtml @@ -29,7 +29,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.CloneableEntityDialogPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DefaultValuesInNewDialog/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DefaultValuesInNewDialog/Index.cshtml index ccaf4d98..f984fd74 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DefaultValuesInNewDialog/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DefaultValuesInNewDialog/Index.cshtml @@ -22,7 +22,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.DefaultValuesInNewDialogPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DialogBoxes/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DialogBoxes/Index.cshtml index 13862e61..80cfe6d6 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DialogBoxes/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/DialogBoxes/Index.cshtml @@ -20,7 +20,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.DialogBoxesPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/EntityDialogAsPanel/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/EntityDialogAsPanel/Index.cshtml index 43b064a1..20ef797c 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/EntityDialogAsPanel/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/EntityDialogAsPanel/Index.cshtml @@ -29,7 +29,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.EntityDialogAsPanelPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/GetInsertedRecordId/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/GetInsertedRecordId/Index.cshtml index deeef8b1..a1c88735 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/GetInsertedRecordId/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/GetInsertedRecordId/Index.cshtml @@ -1,4 +1,4 @@ -@{ +@{ ViewData["Title"] = "Get Inserted Record Id From Dialog"; } @@ -26,7 +26,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.GetInsertedRecordIdPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTab/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTab/Index.cshtml index 281a3c79..386c4d73 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTab/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTab/Index.cshtml @@ -21,7 +21,4 @@
- \ No newline at end of file +@HTML.ModulePageInit(ESM.OtherFormInTabPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTabOneBar/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTabOneBar/Index.cshtml index ed15ec45..9bfa3db9 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTabOneBar/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/OtherFormInTabOneBar/Index.cshtml @@ -23,7 +23,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.OtherFormInTabOneBarPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/PopulateLinkedData/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/PopulateLinkedData/Index.cshtml index cff357f9..81712991 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/PopulateLinkedData/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/PopulateLinkedData/Index.cshtml @@ -21,7 +21,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.PopulateLinkedDataPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ReadOnlyDialog/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ReadOnlyDialog/Index.cshtml index 39c0b0a5..f10f525d 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ReadOnlyDialog/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/ReadOnlyDialog/Index.cshtml @@ -19,7 +19,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.ReadOnlyDialogPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/SerialAutoNumber/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/SerialAutoNumber/Index.cshtml index 23fee42b..ffab7233 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/SerialAutoNumber/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Dialogs/SerialAutoNumber/Index.cshtml @@ -1,4 +1,4 @@ -@{ +@{ ViewData["Title"] = "Serial Auto Numbering"; } @@ -28,9 +28,7 @@

+
- \ No newline at end of file +@Html.ModulePageInit(ESM.SerialAutoNumberPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/ChangingLookupText/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/ChangingLookupText/Index.cshtml index 0604fb67..5eb11506 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/ChangingLookupText/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/ChangingLookupText/Index.cshtml @@ -20,7 +20,4 @@

- \ No newline at end of file +@Html.ModulePageInit(ESM.ChangingLookupTextPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/FilteredLookupInDetail/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/FilteredLookupInDetail/Index.cshtml index 3fbb4f40..41d5960c 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/FilteredLookupInDetail/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/FilteredLookupInDetail/Index.cshtml @@ -25,7 +25,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.FilteredLookupInDetailPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/LookupFilterByMultipleValues/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/LookupFilterByMultipleValues/Index.cshtml index d2194fe9..8c9e57fd 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/LookupFilterByMultipleValues/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/LookupFilterByMultipleValues/Index.cshtml @@ -30,7 +30,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.LookupFilterByMultipleValuesPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/SelectWithHardcodedValues/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/SelectWithHardcodedValues/Index.cshtml index 658c5c29..8e96d061 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/SelectWithHardcodedValues/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/SelectWithHardcodedValues/Index.cshtml @@ -27,7 +27,4 @@ - \ No newline at end of file +@Html.ModulePageInit(ESM.SelectWithHardcodedValuesPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/StaticTextBlock/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/StaticTextBlock/Index.cshtml index 3b27a463..5a6152f5 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/StaticTextBlock/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Editors/StaticTextBlock/Index.cshtml @@ -20,7 +20,4 @@

- \ No newline at end of file +@Html.ModulePageInit(ESM.StaticTextBlockPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/CustomLinksInGrid/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/CustomLinksInGrid/Index.cshtml index d05b80bc..82f1877f 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/CustomLinksInGrid/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/CustomLinksInGrid/Index.cshtml @@ -27,7 +27,4 @@
- +@Html.ModulePageInit(ESM.CustomLinksInGridPage) diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/EnablingRowSelection/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/EnablingRowSelection/Index.cshtml index dadea3c3..169b5f4a 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/EnablingRowSelection/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/EnablingRowSelection/Index.cshtml @@ -30,7 +30,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.EnablingRowSelectionPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GridFilteredByCriteria/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GridFilteredByCriteria/Index.cshtml index 12edcac0..b5f47af9 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GridFilteredByCriteria/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GridFilteredByCriteria/Index.cshtml @@ -28,7 +28,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.GridFilteredByCriteriaPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GroupingAndSummariesInGrid/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GroupingAndSummariesInGrid/Index.cshtml index 73c4e7ab..405ca7b0 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GroupingAndSummariesInGrid/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/GroupingAndSummariesInGrid/Index.cshtml @@ -1,4 +1,4 @@ -@{ +@{ ViewData["Title"] = "Grouping and Summaries In Grid"; } @@ -19,7 +19,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.GroupingAndSummariesInGridPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InitialValuesForQuickFilters/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InitialValuesForQuickFilters/Index.cshtml index ab0b9231..4eb09eba 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InitialValuesForQuickFilters/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InitialValuesForQuickFilters/Index.cshtml @@ -21,7 +21,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.InitialValuesForQuickFiltersPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineActionButtons/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineActionButtons/Index.cshtml index 830632be..c282cf21 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineActionButtons/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineActionButtons/Index.cshtml @@ -20,7 +20,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.InlineActionButtonsPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineImageInGrid/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineImageInGrid/Index.cshtml index b364403c..fef6a0a4 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineImageInGrid/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/InlineImageInGrid/Index.cshtml @@ -19,7 +19,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.InlineImageInGridPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/RemovingAddButton/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/RemovingAddButton/Index.cshtml index fe75698b..21e6606a 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/RemovingAddButton/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/RemovingAddButton/Index.cshtml @@ -23,7 +23,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.RemovingAddButtonPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/ViewWithoutID/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/ViewWithoutID/Index.cshtml index 7f5b1779..2d8f8527 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/ViewWithoutID/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/ViewWithoutID/Index.cshtml @@ -19,7 +19,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.ViewWithoutIDPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/WrappedHeaders/Index.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/WrappedHeaders/Index.cshtml index 28cc370b..53c711ca 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/WrappedHeaders/Index.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/Grids/WrappedHeaders/Index.cshtml @@ -25,7 +25,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.WrappedHeadersPage) \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/_ViewStart.cshtml b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/_ViewStart.cshtml index 07a973a7..af6fd53d 100644 --- a/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/_ViewStart.cshtml +++ b/src/Serenity.Demo.BasicSamples/Areas/Serenity.Demo.BasicSamples/_ViewStart.cshtml @@ -1,5 +1,4 @@ @{ Layout = "_Layout"; } -@Html.Stylesheet("~/Serenity.Demo.Northwind/index.css") @Html.Stylesheet("~/Serenity.Demo.BasicSamples/index.css") \ No newline at end of file diff --git a/src/Serenity.Demo.BasicSamples/Modules/Dialogs/SerialAutoNumber/SerialAutoNumberPage.ts b/src/Serenity.Demo.BasicSamples/Modules/Dialogs/SerialAutoNumber/SerialAutoNumberPage.ts index 46d5e4ad..4eca4610 100644 --- a/src/Serenity.Demo.BasicSamples/Modules/Dialogs/SerialAutoNumber/SerialAutoNumberPage.ts +++ b/src/Serenity.Demo.BasicSamples/Modules/Dialogs/SerialAutoNumber/SerialAutoNumberPage.ts @@ -1,5 +1,6 @@ import { Decorators, gridPageInit } from "@serenity-is/corelib"; import { CustomerDialog, CustomerGrid, CustomerService } from "@serenity-is/demo.northwind"; +import "@serenity-is/demo.northwind/dist/index.css"; export default () => gridPageInit(SerialAutoNumberGrid); diff --git a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Order/OrderIndex.cshtml b/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Order/OrderIndex.cshtml index b9573d53..9ccfa5d2 100644 --- a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Order/OrderIndex.cshtml +++ b/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Order/OrderIndex.cshtml @@ -17,7 +17,4 @@
- \ No newline at end of file +@Html.ModulePageInit(ESM.OrderPage) \ No newline at end of file diff --git a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Product/ProductIndex.cshtml b/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Product/ProductIndex.cshtml index e67c2613..6232714c 100644 --- a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Product/ProductIndex.cshtml +++ b/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Product/ProductIndex.cshtml @@ -9,7 +9,4 @@ }
- \ No newline at end of file +@Html.ModulePageInit(ESM.ProductPage) \ No newline at end of file diff --git a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_NorthwindLayout.cshtml b/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_NorthwindLayout.cshtml deleted file mode 100644 index 0e471d11..00000000 --- a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_NorthwindLayout.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - Layout = "_Layout"; -} - -@Html.Stylesheet("~/Serenity.Demo.Northwind/index.css") -@RenderBody() diff --git a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_ViewStart.cshtml b/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_ViewStart.cshtml index 3e070400..820a2f6e 100644 --- a/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_ViewStart.cshtml +++ b/src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_ViewStart.cshtml @@ -1,4 +1,3 @@ -@{ +@{ Layout = "_Layout"; } -@Html.Stylesheet("~/Serenity.Demo.Northwind/index.css") diff --git a/src/Serenity.Demo.Northwind/Imports/MVC/MVC.cs b/src/Serenity.Demo.Northwind/Imports/MVC/MVC.cs index 66bcf0f8..387d959c 100644 --- a/src/Serenity.Demo.Northwind/Imports/MVC/MVC.cs +++ b/src/Serenity.Demo.Northwind/Imports/MVC/MVC.cs @@ -3,7 +3,6 @@ namespace Serenity.Demo.Northwind.MVC; public static class Views { - public const string _NorthwindLayout = "~/Areas/Serenity.Demo.Northwind/_NorthwindLayout.cshtml"; public static class Order { public const string OrderDetailReport = "~/Areas/Serenity.Demo.Northwind/Order/OrderDetailReport.cshtml"; diff --git a/src/Serenity.Demo.Northwind/Modules/Category/CategoryPage.cs b/src/Serenity.Demo.Northwind/Modules/Category/CategoryPage.cs index e62a7d73..ab8eb960 100644 --- a/src/Serenity.Demo.Northwind/Modules/Category/CategoryPage.cs +++ b/src/Serenity.Demo.Northwind/Modules/Category/CategoryPage.cs @@ -8,6 +8,6 @@ public class CategoryPage : Controller [Route("Northwind/Category")] public ActionResult Index() { - return this.GridPage(ESM.CategoryPage, layout: MVC.Views._NorthwindLayout); + return this.GridPage(ESM.CategoryPage); } } diff --git a/src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.css b/src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.css new file mode 100644 index 00000000..514d22ad --- /dev/null +++ b/src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.css @@ -0,0 +1,3 @@ +.s-Demo-Northwind-CustomerDialog .s-NotesEditor { + flex: 1 1 auto; +} diff --git a/src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.tsx b/src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.tsx index aa0d55fe..9ded15d5 100644 --- a/src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.tsx +++ b/src/Serenity.Demo.Northwind/Modules/Customer/CustomerDialog.tsx @@ -2,6 +2,7 @@ import { CustomerForm, CustomerRow, CustomerService } from "../ServerTypes/Demo" import { Decorators, EntityDialog, TabsExtensions, WidgetProps, htmlEncode, localText, reloadLookup } from "@serenity-is/corelib"; import { DialogUtils } from "@serenity-is/extensions"; import { CustomerOrdersGrid } from "./CustomerOrdersGrid"; +import "./CustomerDialog.css"; @Decorators.registerClass('Serenity.Demo.Northwind.CustomerDialog') export class CustomerDialog

extends EntityDialog { diff --git a/src/Serenity.Demo.Northwind/Modules/Customer/CustomerPage.cs b/src/Serenity.Demo.Northwind/Modules/Customer/CustomerPage.cs index f29d2cc2..8b3800a9 100644 --- a/src/Serenity.Demo.Northwind/Modules/Customer/CustomerPage.cs +++ b/src/Serenity.Demo.Northwind/Modules/Customer/CustomerPage.cs @@ -8,7 +8,7 @@ public class CustomerPage : Controller [Route("Northwind/Customer")] public ActionResult Index() { - return this.GridPage(ESM.CustomerPage, layout: MVC.Views._NorthwindLayout); + return this.GridPage(ESM.CustomerPage); } } diff --git a/src/Serenity.Demo.Northwind/wwwroot/index.css b/src/Serenity.Demo.Northwind/Modules/Note/NotesEditor.css similarity index 62% rename from src/Serenity.Demo.Northwind/wwwroot/index.css rename to src/Serenity.Demo.Northwind/Modules/Note/NotesEditor.css index 65c5e3b0..9197bfb2 100644 --- a/src/Serenity.Demo.Northwind/wwwroot/index.css +++ b/src/Serenity.Demo.Northwind/Modules/Note/NotesEditor.css @@ -1,38 +1,3 @@ -.s-Demo-Northwind-ProductDialog > .size { - width: 650px; -} - -.s-Demo-Northwind-ProductDialog .caption { - width: 180px; -} - -.s-Demo-Northwind-CustomerDialog .s-NotesEditor { - flex: 1 1 auto; -} - -.s-Demo-Northwind-OrderDialog .caption, -.s-Demo-Northwind-CustomerOrderDialog .caption { - width: 130px; -} - -.s-Demo-Northwind-OrderDetailDialog .caption { - width: 80px; -} - -.s-Demo-Northwind-OrderGrid .s-CustomerEditor { - min-width: 250px; - width: 250px; -} - -.s-Demo-Northwind-ProductGrid .slick-cell input[type=text] { - text-align: right; - width: 100%; -} - -.s-Demo-Northwind-ProductGrid .slick-cell .dirty { - background-color: var(--s-input-dirty-bg, #ffe0e0); -} - .s-NotesEditor { border: 1px solid var(--bs-border-color, #ccc); border-radius: var(--bs-border-radius); @@ -65,7 +30,7 @@ position: absolute; right: 6px; top: 4px; - text-decoration:none; + text-decoration: none; } .s-NotesEditor .note-delete:after { @@ -95,4 +60,4 @@ .s-NoteDialog .ui-dialog-content { padding-bottom: 10px; -} \ No newline at end of file +} diff --git a/src/Serenity.Demo.Northwind/Modules/Note/NotesEditor.tsx b/src/Serenity.Demo.Northwind/Modules/Note/NotesEditor.tsx index 248686b6..c9ce80c6 100644 --- a/src/Serenity.Demo.Northwind/Modules/Note/NotesEditor.tsx +++ b/src/Serenity.Demo.Northwind/Modules/Note/NotesEditor.tsx @@ -2,6 +2,7 @@ import { NoteRow } from "../ServerTypes/Demo"; import { Authorization, Decorators, EditorWidget, IGetEditValue, ISetEditValue, PropertyItem, Toolbar, confirmDialog, formatDate, formatISODateTimeUTC, insert } from "@serenity-is/corelib"; import * as DOMPurify from 'dompurify'; import { NoteDialog } from "./NoteDialog"; +import "./NotesEditor.css"; @Decorators.registerEditor('Serenity.Demo.Northwind.NotesEditor', [IGetEditValue, ISetEditValue]) @Decorators.element("

") diff --git a/src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.css b/src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.css new file mode 100644 index 00000000..2a934ac3 --- /dev/null +++ b/src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.css @@ -0,0 +1,5 @@ + +.s-Demo-Northwind-OrderDialog .caption, +.s-Demo-Northwind-CustomerOrderDialog .caption { + width: 130px; +} diff --git a/src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.ts b/src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.ts index 0ad4cc49..4eec6a94 100644 --- a/src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.ts +++ b/src/Serenity.Demo.Northwind/Modules/Order/OrderDialog.ts @@ -1,6 +1,7 @@ import { OrderForm, OrderRow, OrderService } from "../ServerTypes/Demo"; import { Decorators, EntityDialog } from "@serenity-is/corelib"; import { ReportHelper } from "@serenity-is/extensions"; +import "./OrderDialog.css"; @Decorators.registerClass('Serenity.Demo.Northwind.OrderDialog') export class OrderDialog

extends EntityDialog { diff --git a/src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.css b/src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.css new file mode 100644 index 00000000..41fc367b --- /dev/null +++ b/src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.css @@ -0,0 +1,5 @@ + +.s-Demo-Northwind-OrderGrid .s-CustomerEditor { + min-width: 250px; + width: 250px; +} diff --git a/src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.tsx b/src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.tsx index d13aa5d3..56bb7dc2 100644 --- a/src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.tsx +++ b/src/Serenity.Demo.Northwind/Modules/Order/OrderGrid.tsx @@ -2,6 +2,7 @@ import { Decorators, EntityGrid, EnumEditor, Fluent, LookupEditor, ToolButton, f import { ExcelExportHelper, PdfExportHelper, ReportHelper } from "@serenity-is/extensions"; import { OrderColumns, OrderListRequest, OrderRow, OrderService, ProductRow } from "../ServerTypes/Demo"; import { OrderDialog } from "./OrderDialog"; +import "./OrderGrid.css"; @Decorators.registerClass('Serenity.Demo.Northwind.OrderGrid') @Decorators.filterable() diff --git a/src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.css b/src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.css new file mode 100644 index 00000000..1c111ae8 --- /dev/null +++ b/src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.css @@ -0,0 +1,4 @@ + +.s-Demo-Northwind-OrderDetailDialog .caption { + width: 80px; +} diff --git a/src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.ts b/src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.ts index e779727c..b01cf98e 100644 --- a/src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.ts +++ b/src/Serenity.Demo.Northwind/Modules/OrderDetail/OrderDetailDialog.ts @@ -3,7 +3,9 @@ import { toId } from "@serenity-is/corelib"; import { GridEditorDialog } from "@serenity-is/extensions"; import { OrderDetailForm, OrderDetailRow, ProductRow } from "../ServerTypes/Demo"; -@Decorators.registerClass() +import "./OrderDetailDialog.css"; + +@Decorators.registerClass("Serenity.Demo.Northwind.OrderDetailDialog") export class OrderDetailDialog extends GridEditorDialog { protected getFormKey() { return OrderDetailForm.formKey; } protected getLocalTextPrefix() { return OrderDetailRow.localTextPrefix; } diff --git a/src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.css b/src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.css new file mode 100644 index 00000000..58f26cda --- /dev/null +++ b/src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.css @@ -0,0 +1,7 @@ +.s-Demo-Northwind-ProductDialog > .size { + width: 650px; +} + +.s-Demo-Northwind-ProductDialog .caption { + width: 180px; +} diff --git a/src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.ts b/src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.ts index 3266b8c8..c50edb20 100644 --- a/src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.ts +++ b/src/Serenity.Demo.Northwind/Modules/Product/ProductDialog.ts @@ -1,5 +1,6 @@ import { Decorators, EntityDialog } from "@serenity-is/corelib"; import { ProductForm, ProductRow, ProductService } from "../ServerTypes/Demo"; +import "./ProductDialog.css"; @Decorators.registerClass() @Decorators.maximizable() diff --git a/src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.css b/src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.css new file mode 100644 index 00000000..1b1cc98a --- /dev/null +++ b/src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.css @@ -0,0 +1,9 @@ + +.s-Demo-Northwind-ProductGrid .slick-cell input[type=text] { + text-align: right; + width: 100%; +} + +.s-Demo-Northwind-ProductGrid .slick-cell .dirty { + background-color: var(--s-input-dirty-bg, #ffe0e0); +} diff --git a/src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.ts b/src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.ts index e4bd5c88..0c07d6be 100644 --- a/src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.ts +++ b/src/Serenity.Demo.Northwind/Modules/Product/ProductGrid.ts @@ -3,8 +3,7 @@ import { ExcelExportHelper, PdfExportHelper } from "@serenity-is/extensions"; import { Column, FormatterContext, NonDataRow } from "@serenity-is/sleekgrid"; import { CategoryRow, ProductColumns, ProductRow, ProductService, SupplierRow } from "../ServerTypes/Demo"; import { ProductDialog } from "./ProductDialog"; - -const fld = ProductRow.Fields; +import "./ProductGrid.css"; @Decorators.registerClass() @Decorators.filterable() @@ -166,6 +165,7 @@ export class ProductGrid

extends EntityGrid { var num = (ctx: FormatterContext) => this.numericInputFormatter(ctx); var str = (ctx: FormatterContext) => this.stringInputFormatter(ctx); + const fld = ProductRow.Fields; columns.QuantityPerUnit && (columns.QuantityPerUnit.format = str); columns.CategoryName && (columns.CategoryName.referencedFields = [fld.CategoryID]) && (columns.CategoryName.format = ctx => this.selectFormatter(ctx, fld.CategoryID, (CategoryRow as any).getLookup())); diff --git a/src/Serenity.Demo.Northwind/Modules/Region/RegionPage.cs b/src/Serenity.Demo.Northwind/Modules/Region/RegionPage.cs index 549b5495..35cebadb 100644 --- a/src/Serenity.Demo.Northwind/Modules/Region/RegionPage.cs +++ b/src/Serenity.Demo.Northwind/Modules/Region/RegionPage.cs @@ -8,6 +8,6 @@ public class RegionPage : Controller [Route("Northwind/Region")] public ActionResult Index() { - return this.GridPage(ESM.RegionPage, layout: MVC.Views._NorthwindLayout); + return this.GridPage(ESM.RegionPage); } } diff --git a/src/Serenity.Demo.Northwind/Modules/Shipper/ShipperPage.cs b/src/Serenity.Demo.Northwind/Modules/Shipper/ShipperPage.cs index 4f339a8c..a79f33d5 100644 --- a/src/Serenity.Demo.Northwind/Modules/Shipper/ShipperPage.cs +++ b/src/Serenity.Demo.Northwind/Modules/Shipper/ShipperPage.cs @@ -8,6 +8,6 @@ public class ShipperPage : Controller [Route("Northwind/Shipper")] public ActionResult Index() { - return this.GridPage(ESM.ShipperPage, layout: MVC.Views._NorthwindLayout); + return this.GridPage(ESM.ShipperPage); } } diff --git a/src/Serenity.Demo.Northwind/Modules/Supplier/SupplierPage.cs b/src/Serenity.Demo.Northwind/Modules/Supplier/SupplierPage.cs index 7c1ed3a3..2408e661 100644 --- a/src/Serenity.Demo.Northwind/Modules/Supplier/SupplierPage.cs +++ b/src/Serenity.Demo.Northwind/Modules/Supplier/SupplierPage.cs @@ -8,6 +8,6 @@ public class SupplierPage : Controller [Route("Northwind/Supplier")] public ActionResult Index() { - return this.GridPage(ESM.SupplierPage, layout: MVC.Views._NorthwindLayout); + return this.GridPage(ESM.SupplierPage); } } diff --git a/src/Serenity.Demo.Northwind/Modules/Territory/TerritoryPage.cs b/src/Serenity.Demo.Northwind/Modules/Territory/TerritoryPage.cs index 7af7a335..0b5af5df 100644 --- a/src/Serenity.Demo.Northwind/Modules/Territory/TerritoryPage.cs +++ b/src/Serenity.Demo.Northwind/Modules/Territory/TerritoryPage.cs @@ -8,6 +8,6 @@ public class TerritoryPage : Controller [Route("Northwind/Territory")] public ActionResult Index() { - return this.GridPage(ESM.TerritoryPage, layout: MVC.Views._NorthwindLayout); + return this.GridPage(ESM.TerritoryPage); } }