Browse Source

Upgrade to Bootstrap 5.

pull/10355/head
maliming 5 years ago
parent
commit
1a46941a80
  1. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Alert/AbpAlertTagHelperService.cs
  2. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonSize.cs
  3. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonSizeExtensions.cs
  4. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs
  5. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs
  6. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseButtonTagHelperService.cs
  7. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs
  8. 34
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs
  9. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpRadioInputTagHelperService.cs
  10. 18
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs
  11. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpRowTagHelperService.cs
  12. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalFooterTagHelperService.cs
  13. 9
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalHeaderTagHelperService.cs
  14. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalTagHelperService.cs
  15. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Nav/AbpNavbarToggleTagHelperService.cs
  16. 146
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Popover/AbpPopoverTagHelperService.cs
  17. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs
  18. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs
  19. 12
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tooltip/AbpTooltipTagHelperService.cs
  20. 3
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml
  21. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs
  22. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Bootstrap/BootstrapScriptContributor.cs
  23. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Bootstrap/BootstrapStyleContributor.cs
  24. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/DatatablesNet/DatatablesNetScriptContributor.cs
  25. 18
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/DatatablesNetBs5/DatatablesNetBs5ScriptContributor.cs
  26. 16
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/DatatablesNetBs5/DatatablesNetBs5StyleContributor.cs
  27. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Popper/PopperJsScriptBundleContributor.cs
  28. 1
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Select2/Select2ScriptContributor.cs
  29. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/CardsDemo/Default.cshtml
  30. 8
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/TagHelpers/AbpComponentDemoSectionTagHelper.cs
  31. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs
  32. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs
  33. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js
  34. 2
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml
  35. 2
      modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml
  36. 2
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Alerts.cshtml
  37. 8
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Modals.cshtml
  38. 2
      modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml
  39. 24
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml
  40. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Host/Pages/Index.cshtml
  41. 8
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml
  42. 4
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml
  43. 2
      modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml
  44. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml
  45. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml
  46. 2
      modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml
  47. 3
      npm/packs/select2/abp.resourcemapping.js
  48. 4
      npm/packs/select2/src/select2-bootstrap-modal-patch.js
  49. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/Pages/Index.cshtml
  50. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Pages/Index.cshtml

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Alert/AbpAlertTagHelperService.cs

@ -42,9 +42,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Alert
}
var buttonAsHtml =
"<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">" + Environment.NewLine +
" <span aria-hidden=\"true\">&times;</span>" + Environment.NewLine +
" </button>";
"<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>";
output.PostContent.SetHtmlContent(buttonAsHtml);
}

10
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonSize.cs

@ -1,4 +1,6 @@
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Button
using System;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Button
{
public enum AbpButtonSize
{
@ -6,9 +8,13 @@
Small,
Medium,
Large,
[Obsolete("https://getbootstrap.com/docs/5.0/components/buttons/#block-buttons")]
Block,
[Obsolete("https://getbootstrap.com/docs/5.0/components/buttons/#block-buttons")]
Block_Small,
[Obsolete("https://getbootstrap.com/docs/5.0/components/buttons/#block-buttons")]
Block_Medium,
[Obsolete("https://getbootstrap.com/docs/5.0/components/buttons/#block-buttons")]
Block_Large,
}
}
}

12
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Button/AbpButtonSizeExtensions.cs

@ -7,19 +7,15 @@
switch (size)
{
case AbpButtonSize.Small:
case AbpButtonSize.Block_Small:
return "btn-sm";
case AbpButtonSize.Medium:
case AbpButtonSize.Block_Medium:
return "btn-md";
case AbpButtonSize.Large:
case AbpButtonSize.Block_Large:
return "btn-lg";
case AbpButtonSize.Block:
return "btn-block";
case AbpButtonSize.Block_Small:
return "btn-sm btn-block";
case AbpButtonSize.Block_Medium:
return "btn-md btn-block";
case AbpButtonSize.Block_Large:
return "btn-lg btn-block";
case AbpButtonSize.Default:
return "";
default:
@ -27,4 +23,4 @@
}
}
}
}
}

10
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Carousel/AbpCarouselTagHelperService.cs

@ -79,7 +79,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Carousel
prevAnchor.AddCssClass("carousel-control-prev");
prevAnchor.Attributes.Add("href", "#" + TagHelper.Id);
prevAnchor.Attributes.Add("role", "button");
prevAnchor.Attributes.Add("data-slide", "prev");
prevAnchor.Attributes.Add("data-bs-slide", "prev");
prevAnchor.InnerHtml.AppendHtml(prevIcon);
prevAnchor.InnerHtml.AppendHtml(prevText);
@ -97,7 +97,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Carousel
nextAnchor.AddCssClass("carousel-control-next");
nextAnchor.Attributes.Add("href", "#" + TagHelper.Id);
nextAnchor.Attributes.Add("role", "button");
nextAnchor.Attributes.Add("data-slide", "next");
nextAnchor.Attributes.Add("data-bs-slide", "next");
nextAnchor.InnerHtml.AppendHtml(nextIcon);
nextAnchor.InnerHtml.AppendHtml(nextText);
@ -120,8 +120,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Carousel
for (var i = 0; i < itemList.Count; i++)
{
var listItem = new TagBuilder("li");
listItem.Attributes.Add("data-target", "#" + TagHelper.Id);
listItem.Attributes.Add("data-slide-to", i.ToString());
listItem.Attributes.Add("data-bs-target", "#" + TagHelper.Id);
listItem.Attributes.Add("data-bs-slide-to", i.ToString());
if (itemList[i].Active)
{
@ -144,7 +144,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Carousel
protected virtual void AddBasicAttributes(TagHelperContext context, TagHelperOutput output)
{
output.Attributes.Add("data-ride", "carousel");
output.Attributes.Add("data-bs-ride", "carousel");
output.Attributes.Add("id", TagHelper.Id);
AddBasicClasses(context, output);
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpAccordionItemTagHelperService.cs

@ -28,8 +28,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
var button = new TagBuilder("button");
button.AddCssClass("btn btn-link");
button.Attributes.Add("type", "button");
button.Attributes.Add("data-toggle", "collapse");
button.Attributes.Add("data-target", "#" + GetContentId());
button.Attributes.Add("data-bs-toggle", "collapse");
button.Attributes.Add("data-bs-target", "#" + GetContentId());
button.Attributes.Add("aria-expanded", "true");
button.Attributes.Add("aria-controls", GetContentId());
button.InnerHtml.AppendHtml(TagHelper.Title);
@ -58,7 +58,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
wrapper.AddCssClass("collapse" + show);
wrapper.Attributes.Add("id", GetContentId());
wrapper.Attributes.Add("aria-labelledby", GetHeadingId());
wrapper.Attributes.Add("data-parent", "#" + AbpAccordionParentIdPlaceholder);
wrapper.Attributes.Add("data-bs-parent", "#" + AbpAccordionParentIdPlaceholder);
wrapper.InnerHtml.AppendHtml(cardBody);
return wrapper.ToHtmlString();

10
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Collapse/AbpCollapseButtonTagHelperService.cs

@ -8,7 +8,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
{
public override void Process(TagHelperContext context, TagHelperOutput output)
{
AddCommonAttributes(context, output);
@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
protected virtual void AddCommonAttributes(TagHelperContext context, TagHelperOutput output)
{
output.Attributes.Add("data-toggle", "collapse");
output.Attributes.Add("data-bs-toggle", "collapse");
output.Attributes.Add("aria-expanded", "false");
output.Attributes.Add("aria-controls", TagHelper.BodyId);
}
@ -33,11 +33,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
{
if (TagHelper.BodyId.Trim().Split(' ').Length > 1)
{
output.Attributes.Add("data-target", ".multi-collapse");
output.Attributes.Add("data-bs-target", ".multi-collapse");
return;
}
output.Attributes.Add("data-target", "#" + TagHelper.BodyId);
output.Attributes.Add("data-bs-target", "#" + TagHelper.BodyId);
}
protected virtual void AddLinkAttributes(TagHelperContext context, TagHelperOutput output)
@ -52,4 +52,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Collapse
}
}
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Dropdown/AbpDropdownButtonTagHelperService.cs

@ -105,7 +105,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown
if (TagHelper.DropdownStyle != DropdownStyle.Split)
{
attributes.AddClass("dropdown-toggle");
attributes.Add("data-toggle", "dropdown");
attributes.Add("data-bs-toggle", "dropdown");
attributes.Add("aria-haspopup", "true");
attributes.Add("aria-expanded", "false");
}
@ -117,7 +117,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Dropdown
{
var attributes = new TagHelperAttributeList
{
{"data-toggle", "dropdown"},
{"data-bs-toggle", "dropdown"},
{"aria-haspopup", "true"},
{"aria-expanded", "false"},
};

34
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs

@ -54,9 +54,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
output.TagMode = TagMode.StartTagAndEndTag;
output.TagName = "div";
LeaveOnlyGroupAttributes(context, output);
output.Attributes.AddClass(isCheckBox ? "custom-checkbox" : "form-group");
output.Attributes.AddClass(isCheckBox ? "custom-control" : "");
output.Attributes.AddClass(isCheckBox ? "mb-2" : "");
output.Attributes.AddClass("mb-3");
if (isCheckBox)
{
output.Attributes.AddClass("form-check");
}
output.Content.AppendHtml(innerHtml);
}
}
@ -102,7 +104,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
protected virtual string SurroundInnerHtmlAndGet(TagHelperContext context, TagHelperOutput output, string innerHtml, bool isCheckbox)
{
return "<div class=\"" + (isCheckbox ? "custom-checkbox custom-control mb-2" : "form-group") + "\">" +
return "<div class=\"" + (isCheckbox ? "mb-3 form-check" : "mb-3") + "\">" +
Environment.NewLine + innerHtml + Environment.NewLine +
"</div>";
}
@ -178,7 +180,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
if (isCheckbox)
{
className = "custom-control-input";
className = "form-check-input";
}
inputTagHelperOutput.Attributes.AddClass(className + " " + GetSize(context, output));
@ -267,10 +269,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
label.Attributes.Add("for", GetIdAttributeValue(inputTag));
label.InnerHtml.AppendHtml(TagHelper.Label);
if (isCheckbox)
{
label.AddCssClass("custom-control-label");
}
label.AddCssClass(isCheckbox ? "form-check-label" : "form-label");
return label.ToHtmlString();
}
@ -319,12 +318,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var idAttr = inputTag.Attributes.FirstOrDefault(a => a.Name == "id");
var localizedText = _tagHelperLocalizer.GetLocalizedText(text, TagHelper.AspFor.ModelExplorer);
var small = new TagBuilder("small");
small.Attributes.Add("id", idAttr?.Value?.ToString() + "InfoText");
small.AddCssClass("form-text text-muted");
small.InnerHtml.Append(localizedText);
var div = new TagBuilder("div");
div.Attributes.Add("id", idAttr?.Value + "InfoText");
div.AddCssClass("form-text");
div.InnerHtml.Append(localizedText);
return small.ToHtmlString();
inputTag.Attributes.Add("aria-describedby", idAttr?.Value + "InfoText");
return div.ToHtmlString();
}
protected virtual async Task<string> GetLabelAsHtmlUsingTagHelperAsync(TagHelperContext context, TagHelperOutput output, bool isCheckbox)
@ -337,10 +338,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var attributeList = new TagHelperAttributeList();
if (isCheckbox)
{
attributeList.AddClass("custom-control-label");
}
attributeList.AddClass(isCheckbox ? "form-check-label" : "form-label");
return await labelTagHelper.RenderAsync(attributeList, context, _encoder, "label", TagMode.StartTagAndEndTag);
}

8
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpRadioInputTagHelperService.cs

@ -50,12 +50,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
foreach (var selectItem in selectItems)
{
var inlineClass = (TagHelper.Inline ?? false) ? " custom-control-inline" : "";
var inlineClass = (TagHelper.Inline ?? false) ? " form-check-inline" : "";
var id = TagHelper.AspFor.Name + "Radio" + selectItem.Value;
var name = TagHelper.AspFor.Name;
var input = new TagBuilder("input");
input.AddCssClass("custom-control-input");
input.AddCssClass("form-check-input");
input.Attributes.Add("type", "radio");
input.Attributes.Add("id", id);
input.Attributes.Add("name", name);
@ -72,12 +72,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
}
var label = new TagBuilder("label");
label.AddCssClass("custom-control-label");
label.AddCssClass("form-check-label");
label.Attributes.Add("for", id);
label.InnerHtml.AppendHtml(selectItem.Text);
var wrapper = new TagBuilder("div");
wrapper.AddCssClass("custom-control custom-radio" + inlineClass);
wrapper.AddCssClass("form-check" + inlineClass);
wrapper.InnerHtml.AppendHtml(input);
wrapper.InnerHtml.AppendHtml(label);

18
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs

@ -8,7 +8,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers;
@ -54,7 +53,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
{
output.TagName = "div";
LeaveOnlyGroupAttributes(context, output);
output.Attributes.AddClass("form-group");
output.Attributes.AddClass("mb-3");
output.TagMode = TagMode.StartTagAndEndTag;
output.Content.SetHtmlContent(innerHtml);
}
@ -73,7 +72,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
protected virtual string SurroundInnerHtmlAndGet(TagHelperContext context, TagHelperOutput output, string innerHtml)
{
return "<div class=\"form-group\">" + Environment.NewLine + innerHtml + Environment.NewLine + "</div>";
return "<div class=\"mb-3\">" + Environment.NewLine + innerHtml + Environment.NewLine + "</div>";
}
protected virtual async Task<TagHelperOutput> GetSelectTagAsync(TagHelperContext context, TagHelperOutput output, TagHelperContent childContent)
@ -176,6 +175,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
if (!string.IsNullOrEmpty(TagHelper.Label))
{
var label = new TagBuilder("label");
label.AddCssClass("form-label");
label.Attributes.Add("for", GetIdAttributeValue(selectTag));
label.InnerHtml.AppendHtml(TagHelper.Label);
@ -307,10 +307,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var labelTagHelper = new LabelTagHelper(_generator)
{
For = TagHelper.AspFor,
ViewContext = TagHelper.ViewContext
ViewContext = TagHelper.ViewContext,
};
return await labelTagHelper.RenderAsync(new TagHelperAttributeList(), context, _encoder, "label", TagMode.StartTagAndEndTag);
return await labelTagHelper.RenderAsync(new TagHelperAttributeList { { "class", "form-label" } }, context, _encoder, "label", TagMode.StartTagAndEndTag);
}
protected virtual async Task<string> GetValidationAsHtmlAsync(TagHelperContext context, TagHelperOutput output, TagHelperOutput inputTag)
@ -338,11 +338,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
switch (TagHelper.Size)
{
case AbpFormControlSize.Small:
return "custom-select-sm";
return "form-select-sm";
case AbpFormControlSize.Medium:
return "custom-select-md";
return "form-select-md";
case AbpFormControlSize.Large:
return "custom-select-lg";
return "form-select-lg";
}
return "";
@ -360,7 +360,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
attrList.Add(tagHelperAttribute);
}
attrList.AddClass("custom-select");
attrList.AddClass("form-select");
return attrList;
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Grid/AbpRowTagHelperService.cs

@ -50,7 +50,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid
return;
}
output.Attributes.AddClass("no-gutters");
output.Attributes.AddClass("g-0");
}
}
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalFooterTagHelperService.cs

@ -82,7 +82,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
{
var element = new TagBuilder("button");
element.Attributes.Add("type", "button");
element.Attributes.Add("data-dismiss", "modal");
element.Attributes.Add("data-bs-dismiss", "modal");
element.AddCssClass("btn");
element.AddCssClass("btn-secondary");
element.InnerHtml.Append(_localizer["Close"]);
@ -94,7 +94,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
{
var element = new TagBuilder("button");
element.Attributes.Add("type", "button");
element.Attributes.Add("data-dismiss", "modal");
element.Attributes.Add("data-bs-dismiss", "modal");
element.AddCssClass("btn");
element.AddCssClass("btn-secondary");
element.InnerHtml.Append(_localizer["Cancel"]);

9
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalHeaderTagHelperService.cs

@ -34,16 +34,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
protected virtual string CreatePostContent()
{
var span = new TagBuilder("span");
span.Attributes.Add("aria-hidden", "true");
span.InnerHtml.AppendHtml("&times;");
var button = new TagBuilder("button");
button.AddCssClass("close");
button.AddCssClass("btn-close");
button.Attributes.Add("type", "button");
button.Attributes.Add("data-dismiss", "modal");
button.Attributes.Add("data-bs-dismiss", "modal");
button.Attributes.Add("aria-label", L["Close"].Value);
button.InnerHtml.AppendHtml(span);
return button.ToHtmlString();
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Modal/AbpModalTagHelperService.cs

@ -102,7 +102,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
{
if (TagHelper.Static == true)
{
return "data-backdrop=\"static\" ";
return "data-bs-backdrop=\"static\" ";
}
return string.Empty;
}
@ -111,7 +111,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
{
if (TagHelper.Static == true)
{
builder.Attributes.Add("data-backdrop", "static");
builder.Attributes.Add("data-bs-backdrop", "static");
}
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Nav/AbpNavbarToggleTagHelperService.cs

@ -34,8 +34,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav
var button = new TagBuilder("button");
button.AddCssClass("navbar-toggler");
button.Attributes.Add("type", "button");
button.Attributes.Add("data-toggle", "collapse");
button.Attributes.Add("data-target", "#" + TagHelper.Id);
button.Attributes.Add("data-bs-toggle", "collapse");
button.Attributes.Add("data-bs-target", "#" + TagHelper.Id);
button.Attributes.Add("aria-controls", TagHelper.Id);
button.Attributes.Add("aria-expanded", "false");
button.Attributes.Add("aria-label", L["ToggleNavigation"].Value);
@ -52,4 +52,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Nav
}
}
}
}
}

146
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Popover/AbpPopoverTagHelperService.cs

@ -1,18 +1,18 @@
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using System.Linq;
using System.Web;
using System.Web;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Popover
{
public class AbpPopoverTagHelperService : AbpTagHelperService<AbpPopoverTagHelper>
{
protected IHtmlGenerator HtmlGenerator { get; }
public AbpPopoverTagHelperService(IHtmlGenerator htmlGenerator)
{
HtmlGenerator = htmlGenerator;
{
protected IHtmlGenerator HtmlGenerator { get; }
public AbpPopoverTagHelperService(IHtmlGenerator htmlGenerator)
{
HtmlGenerator = htmlGenerator;
}
public override void Process(TagHelperContext context, TagHelperOutput output)
@ -29,79 +29,79 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Popover
{
SetDisabled(context, output);
}
}
}
protected virtual void SetDisabled(TagHelperContext context, TagHelperOutput output)
{
{
var triggerValue = TagHelper.Dismissible ?? false ? "focus" : "";
if (TagHelper.Hoverable ?? false)
{
if (triggerValue.Contains("focus"))
{
triggerValue = triggerValue.Replace("focus", "focus hover");
}
else
{
triggerValue = "hover";
}
}
if (TagHelper.Hoverable ?? false)
{
if (triggerValue.Contains("focus"))
{
triggerValue = triggerValue.Replace("focus", "focus hover");
}
else
{
triggerValue = "hover";
}
}
var dataPlacement = GetDirectory().ToString().ToLowerInvariant();
// data-placement="default" with data-trigger="focus" causes Cannot read property 'indexOf' of undefined at computeAutoPlacement(bootstrap.bundle.js?_v=637146714627330435:2185) error
if (IsDismissibleOrHoverable() && GetDirectory() == PopoverDirectory.Default)
{
//dataPlacementAsHtml = string.Empty; //bootstrap default placement is right, abp's is top.
dataPlacement = dataPlacement.Replace("default", "top");
}
// data-bs-placement="default" with data-trigger="focus" causes Cannot read property 'indexOf' of undefined at computeAutoPlacement(bootstrap.bundle.js?_v=637146714627330435:2185) error
if (IsDismissibleOrHoverable() && GetDirectory() == PopoverDirectory.Default)
{
//dataPlacementAsHtml = string.Empty; //bootstrap default placement is right, abp's is top.
dataPlacement = dataPlacement.Replace("default", "top");
}
var titleAttribute = output.Attributes.FirstOrDefault(at => at.Name == "title");
var span = new TagBuilder("span");
span.AddCssClass("d-inline-block");
span.Attributes.Add("tabindex", "0");
span.Attributes.Add("data-toggle", "popover");
span.Attributes.Add("data-content", GetDataContent());
span.Attributes.Add("data-trigger", triggerValue);
span.Attributes.Add("data-placement", dataPlacement);
if (titleAttribute != null)
{
span.Attributes.Add("title", HttpUtility.HtmlDecode(titleAttribute.Value.ToString()));
span.Attributes.Add("data-bs-toggle", "popover");
span.Attributes.Add("data-bs-content", GetDataContent());
span.Attributes.Add("data-bs-trigger", triggerValue);
span.Attributes.Add("data-bs-placement", dataPlacement);
if (titleAttribute != null)
{
span.Attributes.Add("title", HttpUtility.HtmlDecode(titleAttribute.Value.ToString()));
}
output.PreElement.SetHtmlContent(span.RenderStartTag());
output.PostElement.SetHtmlContent(span.RenderEndTag());
output.Attributes.Add("style", "pointer-events: none;");
}
}
protected virtual void SetDataTriggerIfDismissible(TagHelperContext context, TagHelperOutput output)
{
if (TagHelper.Dismissible ?? false)
{
output.Attributes.Add("data-trigger", "focus");
output.Attributes.Add("data-bs-trigger", "focus");
}
}
protected virtual void SetDataTriggerIfHoverable(TagHelperContext context, TagHelperOutput output)
{
if (TagHelper.Hoverable ?? false)
{
//If already has focus data trigger
if (output.Attributes.TryGetAttribute("data-bs-trigger", out _))
{
output.Attributes.SetAttribute(new TagHelperAttribute("data-bs-trigger", "focus hover"));
}
else
{
output.Attributes.Add("data-bs-trigger", "hover");
}
}
}
protected virtual void SetDataTriggerIfHoverable(TagHelperContext context, TagHelperOutput output)
{
if (TagHelper.Hoverable ?? false)
{
//If already has focus data trigger
if (output.Attributes.TryGetAttribute("data-trigger", out _))
{
output.Attributes.SetAttribute(new TagHelperAttribute("data-trigger", "focus hover"));
}
else
{
output.Attributes.Add("data-trigger", "hover");
}
}
}
protected virtual void SetDataToggle(TagHelperContext context, TagHelperOutput output)
{
output.Attributes.Add("data-toggle", "popover");
output.Attributes.Add("data-bs-toggle", "popover");
}
protected virtual void SetDataPlacement(TagHelperContext context, TagHelperOutput output)
@ -111,12 +111,12 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Popover
{
directory = PopoverDirectory.Bottom;
}
output.Attributes.Add("data-placement", directory.ToString().ToLowerInvariant());
output.Attributes.Add("data-bs-placement", directory.ToString().ToLowerInvariant());
}
protected virtual void SetPopoverData(TagHelperContext context, TagHelperOutput output)
{
output.Attributes.Add("data-content", GetDataContent());
output.Attributes.Add("data-bs-content", GetDataContent());
}
protected virtual string GetDataContent()
@ -157,17 +157,17 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Popover
return PopoverDirectory.Default;
}
protected virtual bool IsDismissibleOrHoverable()
{
if (TagHelper.Dismissible ?? false)
{
return true;
}
if (TagHelper.Hoverable ?? false)
{
return true;
}
return false;
protected virtual bool IsDismissibleOrHoverable()
{
if (TagHelper.Dismissible ?? false)
{
return true;
}
if (TagHelper.Hoverable ?? false)
{
return true;
}
return false;
}
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabDropdownTagHelperService.cs

@ -35,7 +35,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab
var anchor = new TagBuilder("a");
anchor.AddCssClass("nav-link dropdown-toggle");
anchor.Attributes.Add("id", id);
anchor.Attributes.Add("data-toggle", "dropdown");
anchor.Attributes.Add("data-bs-toggle", "dropdown");
anchor.Attributes.Add("href", "#" + link);
anchor.Attributes.Add("role", "button");
anchor.Attributes.Add("aria-haspopup", "true");

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabTagHelperService.cs

@ -43,7 +43,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab
anchor.AddCssClass("dropdown-item " + classAttributesAsString);
anchor.Attributes.Add("id", id);
anchor.Attributes.Add("href", "#" + link);
anchor.Attributes.Add("data-toggle", "tab");
anchor.Attributes.Add("data-bs-toggle", "tab");
anchor.Attributes.Add("role", "tab");
anchor.Attributes.Add("aria-controls", control);
anchor.Attributes.Add("aria-selected", "false");
@ -62,7 +62,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tab
var anchor = new TagBuilder("a");
anchor.AddCssClass("nav-link " + classAttributesAsString + " " + AbpTabItemActivePlaceholder);
anchor.Attributes.Add("id", id);
anchor.Attributes.Add("data-toggle", TabItemsDataTogglePlaceHolder);
anchor.Attributes.Add("data-bs-toggle", TabItemsDataTogglePlaceHolder);
anchor.Attributes.Add("href", "#" + link);
anchor.Attributes.Add("role", "tab");
anchor.Attributes.Add("aria-controls", control);

12
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tooltip/AbpTooltipTagHelperService.cs

@ -22,13 +22,13 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tooltip
protected virtual void SetParentElementWithTooltip(TagHelperContext context, TagHelperOutput output)
{
var directory = GetDirectory() != TooltipDirectory.Default ? GetDirectory() : TooltipDirectory.Top;
output.Attributes.Add("data-placement", directory.ToString().ToLowerInvariant());
output.Attributes.Add("data-bs-placement", directory.ToString().ToLowerInvariant());
var span = new TagBuilder("span");
span.AddCssClass("d-inline-block");
span.Attributes.Add("tabindex", "0");
span.Attributes.Add("data-toggle", "tooltip");
span.Attributes.Add("data-placement", directory.ToString().ToLowerInvariant());
span.Attributes.Add("data-bs-toggle", "tooltip");
span.Attributes.Add("data-bs-placement", directory.ToString().ToLowerInvariant());
span.Attributes.Add("title", GetTitle());
output.PreElement.SetHtmlContent(span.RenderStartTag());
@ -40,13 +40,13 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tooltip
protected virtual void SetDataToggle(TagHelperContext context, TagHelperOutput output)
{
output.Attributes.Add("data-toggle", "tooltip");
output.Attributes.Add("data-bs-toggle", "tooltip");
}
protected virtual void SetDataPlacement(TagHelperContext context, TagHelperOutput output)
{
var directory = GetDirectory() != TooltipDirectory.Default ? GetDirectory() : TooltipDirectory.Top;
output.Attributes.Add("data-placement", directory.ToString().ToLowerInvariant());
output.Attributes.Add("data-bs-placement", directory.ToString().ToLowerInvariant());
}
protected virtual void SetTooltipTitle(TagHelperContext context, TagHelperOutput output)
@ -98,4 +98,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Tooltip
return output.Attributes.Any(a => a.Name == "disabled");
}
}
}
}

3
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml

@ -13,9 +13,8 @@
<abp-modal-header title="@L["SwitchTenant"].Value"></abp-modal-header>
<abp-modal-body>
<abp-form-content />
<p>@L["SwitchTenantHint"]</p>
</abp-modal-body>
@* TODO: A "Submit" would be better than "Save"! *@
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
</abp-modal>
</abp-dynamic-form>
</abp-dynamic-form>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs

@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Volo.Abp;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Abp.MultiTenancy;
@ -63,6 +64,7 @@ namespace Pages.Abp.MultiTenancy
public class TenantInfoModel
{
[InputInfoText("SwitchTenantHint")]
public string Name { get; set; }
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Bootstrap/BootstrapScriptContributor.cs

@ -1,11 +1,13 @@
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Popper;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap
{
[DependsOn(typeof(JQueryScriptContributor))]
[DependsOn(typeof(PopperJsScriptBundleContributor))]
public class BootstrapScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
@ -13,4 +15,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap
context.Files.AddIfNotContains("/libs/bootstrap/js/bootstrap.bundle.js");
}
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Bootstrap/BootstrapStyleContributor.cs

@ -18,4 +18,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap
}
}
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/DatatablesNet/DatatablesNetScriptContributor.cs

@ -13,4 +13,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNet
context.Files.AddIfNotContains("/libs/datatables.net/js/jquery.dataTables.js");
}
}
}
}

18
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/DatatablesNetBs5/DatatablesNetBs5ScriptContributor.cs

@ -0,0 +1,18 @@
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNet;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs5
{
[DependsOn(typeof(DatatablesNetScriptContributor))]
[DependsOn(typeof(BootstrapScriptContributor))]
public class DatatablesNetBs5ScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/datatables.net-bs5/js/dataTables.bootstrap5.js");
}
}
}

16
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/DatatablesNetBs5/DatatablesNetBs5StyleContributor.cs

@ -0,0 +1,16 @@
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs5
{
[DependsOn(typeof(BootstrapStyleContributor))]
public class DatatablesNetBs5StyleContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/libs/datatables.net-bs5/css/dataTables.bootstrap5.css");
}
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Popper/PopperJsScriptBundleContributor.cs

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Popper

1
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/Select2/Select2ScriptContributor.cs

@ -12,7 +12,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2
{
//TODO: Add select2.full.min.js or localize!
context.Files.AddIfNotContains("/libs/select2/js/select2.min.js");
context.Files.AddIfNotContains("/libs/select2/js/select2-bootstrap-modal-patch.js");
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/Demos/CardsDemo/Default.cshtml

@ -160,7 +160,7 @@
<a abp-button="Primary" href="#"> Go somewhere</a>
</abp-card-body>
</abp-card>
<abp-card class="text-right" style="width: 18rem;">
<abp-card class="text-end" style="width: 18rem;">
<abp-card-body>
<abp-card-title> Special title treatment</abp-card-title>
<abp-card-text>With supporting text below as a natural lead-in to additional content.</abp-card-text>

8
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Views/Components/Themes/Shared/TagHelpers/AbpComponentDemoSectionTagHelper.cs

@ -48,8 +48,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.S
output.PreContent.AppendHtml("<div class=\"col-auto\">");
output.PreContent.AppendHtml("<nav>");
output.PreContent.AppendHtml("<div class=\"nav nav-pills\" role=\"tablist\">");
output.PreContent.AppendHtml($"<a class=\"nav-item nav-link active\" id=\"nav-preview-tab-{previewId}\" data-toggle=\"tab\" href=\"#nav-preview-{previewId}\" role=\"tab\" aria-controls=\"nav-preview-{previewId}\" aria-selected=\"true\">Preview</a>");
output.PreContent.AppendHtml($"<a class=\"nav-item nav-link\" id=\"nav-code-tab-{codeBlockId}\" data-toggle=\"tab\" href=\"#nav-code-{codeBlockId}\" role=\"tab\" aria-controls=\"nav-code-{codeBlockId}\" aria-selected=\"false\">Code</a>");
output.PreContent.AppendHtml($"<a class=\"nav-item nav-link active\" id=\"nav-preview-tab-{previewId}\" data-bs-toggle=\"tab\" href=\"#nav-preview-{previewId}\" role=\"tab\" aria-controls=\"nav-preview-{previewId}\" aria-selected=\"true\">Preview</a>");
output.PreContent.AppendHtml($"<a class=\"nav-item nav-link\" id=\"nav-code-tab-{codeBlockId}\" data-bs-toggle=\"tab\" href=\"#nav-code-{codeBlockId}\" role=\"tab\" aria-controls=\"nav-code-{codeBlockId}\" aria-selected=\"false\">Code</a>");
output.PreContent.AppendHtml("</div>");
output.PreContent.AppendHtml("</nav>");
output.PreContent.AppendHtml("</div>"); // col-auto
@ -68,10 +68,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.Views.Components.Themes.S
output.PostContent.AppendHtml($"<ul class=\"nav nav-tabs\" id=\"code-block-tab-{codeBlockTabId}\" role=\"tablist\">");
output.PostContent.AppendHtml("<li class=\"nav-item\">");
output.PostContent.AppendHtml($"<a class=\"nav-link active\" id=\"tag-helper-tab-{tagHelperCodeBlockId}\" data-toggle=\"pill\" href=\"#tag-helper-{tagHelperCodeBlockId}\" role=\"tab\" aria-controls=\"tag-helper-{tagHelperCodeBlockId}\" aria-selected=\"true\">Abp Tag Helper</a>");
output.PostContent.AppendHtml($"<a class=\"nav-link active\" id=\"tag-helper-tab-{tagHelperCodeBlockId}\" data-bs-toggle=\"pill\" href=\"#tag-helper-{tagHelperCodeBlockId}\" role=\"tab\" aria-controls=\"tag-helper-{tagHelperCodeBlockId}\" aria-selected=\"true\">Abp Tag Helper</a>");
output.PostContent.AppendHtml("</li>");
output.PostContent.AppendHtml("<li class=\"nav-item\">");
output.PostContent.AppendHtml($"<a class=\"nav-link\" id=\"bootstrap-tab-{bootstrapCodeBlockId}\" data-toggle=\"pill\" href=\"#bootstrap-{bootstrapCodeBlockId}\" role=\"tab\" aria-controls=\"bootstrap-{tagHelperCodeBlockId}\" aria-selected=\"true\">Bootstrap</a>");
output.PostContent.AppendHtml($"<a class=\"nav-link\" id=\"bootstrap-tab-{bootstrapCodeBlockId}\" data-bs-toggle=\"pill\" href=\"#bootstrap-{bootstrapCodeBlockId}\" role=\"tab\" aria-controls=\"bootstrap-{tagHelperCodeBlockId}\" aria-selected=\"true\">Bootstrap</a>");
output.PostContent.AppendHtml("</li>");
output.PostContent.AppendHtml("</ul>");
output.PostContent.AppendHtml($"<div class=\"tab-content\" id=\"code-block-tabContent-{codeBlockTabId}\">");

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalScriptContributor.cs

@ -1,7 +1,7 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.BootstrapDatepicker;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs4;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs5;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQuery;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQueryForm;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.JQueryValidationUnobtrusive;
@ -23,7 +23,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
typeof(JQueryValidationUnobtrusiveScriptContributor),
typeof(JQueryFormScriptContributor),
typeof(Select2ScriptContributor),
typeof(DatatablesNetBs4ScriptContributor),
typeof(DatatablesNetBs5ScriptContributor),
typeof(SweetalertScriptContributor),
typeof(ToastrScriptBundleContributor),
typeof(MalihuCustomScrollbarPluginScriptBundleContributor),
@ -49,4 +49,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
});
}
}
}
}

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Bundling/SharedThemeGlobalStyleContributor.cs

@ -2,7 +2,7 @@
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.BootstrapDatepicker;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Core;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs4;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.DatatablesNetBs5;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.FontAwesome;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.MalihuCustomScrollbar;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.Select2;
@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
typeof(ToastrStyleBundleContributor),
typeof(Select2StyleContributor),
typeof(MalihuCustomScrollbarPluginStyleBundleContributor),
typeof(DatatablesNetBs4StyleContributor),
typeof(DatatablesNetBs5StyleContributor),
typeof(BootstrapDatepickerStyleContributor)
)]
public class SharedThemeGlobalStyleContributor : BundleContributor
@ -31,4 +31,4 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling
});
}
}
}
}

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js

@ -139,7 +139,7 @@ var abp = abp || {};
$dropdownButton
.addClass('btn btn-primary btn-sm dropdown-toggle')
.attr('data-toggle', 'dropdown')
.attr('data-bs-toggle', 'dropdown')
.attr('aria-haspopup', 'true')
.attr('aria-expanded', 'false');
@ -168,7 +168,7 @@ var abp = abp || {};
if ($dropdownItemsContainer.find('li').length > 0) {
$dropdownItemsContainer.appendTo($container);
$dropdownButton.appendTo($container);
$dropdownButton.prependTo($container);
}
if ($dropdownItemsContainer.children().length === 0) {

2
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml

@ -33,7 +33,7 @@
<abp-column>
<abp-input asp-for="LoginInput.RememberMe" class="mb-4"/>
</abp-column>
<abp-column class="text-right">
<abp-column class="text-end">
<a href="@Url.Page("./ForgotPassword", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["ForgotPassword"]</a>
</abp-column>
</abp-row>

2
modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml

@ -57,7 +57,7 @@
<div class="@containerClass">
@(await Component.InvokeAsync<PageAlertsViewComponent>())
<div id="AbpContentToolbar">
<div class="text-right mb-2">
<div class="text-end mb-2">
@RenderSection("content_toolbar", false)
</div>
</div>

2
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Alerts.cshtml

@ -267,7 +267,7 @@
<pre><code>
&lt;div class=&quot;alert alert-warning alert-dismissible fade show&quot; role=&quot;alert&quot;&gt;
Holy guacamole! You should check in on some of those fields below.
&lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;alert&quot; aria-label=&quot;Close&quot;&gt;
&lt;button type=&quot;button&quot; class=&quot;close&quot; data-bs-dismiss=&quot;alert&quot; aria-label=&quot;Close&quot;&gt;
&lt;span aria-hidden=&quot;true&quot;&gt;&amp;times;&lt;/span&gt;
&lt;/button&gt;
&lt;/div&gt;

8
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/Modals.cshtml

@ -32,7 +32,7 @@
<div class="demo-with-code">
<div class="demo-area">
<abp-button button-type="Primary" data-toggle="modal" data-target="#myModal">Launch modal</abp-button>
<abp-button button-type="Primary" data-bs-toggle="modal" data-bs-target="#myModal">Launch modal</abp-button>
<abp-modal centered="true" scrollable="true" size="Large" id="myModal">
<abp-modal-header title="Modal title"></abp-modal-header>
@ -60,7 +60,7 @@
<abp-tab title="Rendered">
<pre><code>
&lt;!-- Button trigger modal --&gt;
&lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; data-toggle=&quot;modal&quot; data-target=&quot;#exampleModal&quot;&gt;
&lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#exampleModal&quot;&gt;
Launch demo modal
&lt;/button&gt;
@ -70,7 +70,7 @@
&lt;div class=&quot;modal-content&quot;&gt;
&lt;div class=&quot;modal-header&quot;&gt;
&lt;h5 class=&quot;modal-title&quot; id=&quot;exampleModalLabel&quot;&gt;Modal title&lt;/h5&gt;
&lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;modal&quot; aria-label=&quot;Close&quot;&gt;
&lt;button type=&quot;button&quot; class=&quot;close&quot; data-bs-dismiss=&quot;modal&quot; aria-label=&quot;Close&quot;&gt;
&lt;span aria-hidden=&quot;true&quot;&gt;&amp;times;&lt;/span&gt;
&lt;/button&gt;
&lt;/div&gt;
@ -78,7 +78,7 @@
...
&lt;/div&gt;
&lt;div class=&quot;modal-footer&quot;&gt;
&lt;button type=&quot;button&quot; class=&quot;btn btn-secondary&quot; data-dismiss=&quot;modal&quot;&gt;Close&lt;/button&gt;
&lt;button type=&quot;button&quot; class=&quot;btn btn-secondary&quot; data-bs-dismiss=&quot;modal&quot;&gt;Close&lt;/button&gt;
&lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot;&gt;Save&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;

2
modules/blogging/src/Volo.Blogging.Admin.Web/Pages/Blogging/Admin/Blogs/Index.cshtml

@ -27,7 +27,7 @@
<abp-column size-md="_6">
<h2>@L["Blogs"]</h2>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-column size-md="_6" class="text-end">
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Blogs.Create))
{
<abp-button icon="plus" text="@L["CreateANewBlog"].Value" button-type="Primary" id="CreateNewBlogButtonId"></abp-button>

24
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml

@ -152,11 +152,11 @@
<p class="float-left"><i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]</p>
@if (hasCommentingPermission)
{
<a abp-button="Primary" class="btn-rounded float-right active" href="#LeaveComment">@L["LeaveComment"]</a>
<a abp-button="Primary" class="btn-rounded float-end active" href="#LeaveComment">@L["LeaveComment"]</a>
}
else
{
<a abp-button="Primary" class="btn-rounded float-right active" href="/Account/Login?returnUrl=@System.Web.HttpUtility.UrlEncode(@Request.Path)">@L["LeaveComment"]</a>
<a abp-button="Primary" class="btn-rounded float-end active" href="/Account/Login?returnUrl=@System.Web.HttpUtility.UrlEncode(@Request.Path)">@L["LeaveComment"]</a>
}
</abp-column>
</abp-row>
@ -216,8 +216,8 @@
<div class="form-group">
<textarea class="form-control" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Comment"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" />
<abp-button button-type="Primary" class="btn-rounded float-end" type="submit" text="@L["Comment"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-end replyCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
@ -233,8 +233,8 @@
<div class="form-group">
<textarea class="form-control" name="text" id="textBoxId" rows="4">@commentWithRepliesDto.Comment.Text</textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" />
<abp-button button-type="Primary" class="btn-rounded float-end" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-end editCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
@ -292,8 +292,8 @@
<div class="form-group">
<textarea class="form-control" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" />
<abp-button button-type="Primary" class="btn-rounded float-end" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-end replyCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
@ -309,8 +309,8 @@
<div class="form-group">
<textarea class="form-control" name="text" id="textBoxId" rows="4">@reply.Text</textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" />
<abp-button button-type="Primary" class="btn-rounded float-end" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Danger" class="btn-rounded float-end editCancelButton" text="@L["Cancel"].Value" />
</form>
</div>
</div>
@ -339,7 +339,7 @@
<div class="form-group">
<textarea class="form-control" name="text" id="textBoxId" rows="4"></textarea>
</div>
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" />
<abp-button button-type="Primary" class="btn-rounded float-end" type="submit" text="@L["Submit"].Value" />
</form>
</div>
</div>
@ -347,7 +347,7 @@
}
else
{
<a abp-button="Primary" class="btn-rounded float-right active mt-3" href="/Account/Login?returnUrl=@System.Web.HttpUtility.UrlEncode(@Request.Path)">@L["LeaveComment"]</a>
<a abp-button="Primary" class="btn-rounded float-end active mt-3" href="/Account/Login?returnUrl=@System.Web.HttpUtility.UrlEncode(@Request.Path)">@L["LeaveComment"]</a>
}
</div>
</div>

2
modules/cms-kit/host/Volo.CmsKit.Web.Host/Pages/Index.cshtml

@ -21,6 +21,6 @@
@Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").OrderBy(x => x).JoinAsString(" <br /> "))
}
<hr />
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
<p class="text-end"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
</abp-card-body>
</abp-card>

8
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml

@ -20,7 +20,7 @@
@((string.IsNullOrWhiteSpace(author.Name)
? author.UserName
: author.Name + " " + author.Surname).Trim())
<small class="text-muted float-right" style="opacity: .5; font-size: 14px">@creationTime.ToString()</small>
<small class="text-muted float-end" style="opacity: .5; font-size: 14px">@creationTime.ToString()</small>
</span>;
}
@{
@ -37,7 +37,7 @@
</div>
</div>
<div class="col-auto">
<div class="text-right">
<div class="text-end">
<abp-button type="submit" button-type="Primary" size="Block">
<i class="fa fa-comment-alt mr-1"></i> @L["Send"]
</abp-button>
@ -101,7 +101,7 @@
</div>
</div>
<div class="col-auto">
<div class="text-right">
<div class="text-end">
<abp-button type="submit" button-type="Primary" size="Block"> @L["Update"] </abp-button>
<abp-button type="button" button-type="Light" size="Block_Small" class="comment-edit-cancel-button" data-id="@id.ToString()"><i class="fa fa-times mr-1"></i> @L["Cancel"] </abp-button>
@ -122,7 +122,7 @@
}
else if (!string.IsNullOrWhiteSpace(Model.LoginUrl))
{
<div class="text-right">
<div class="text-end">
<a href="@Model.LoginUrl" class="btn btn-primary"> @L["LoginToAddComment"]</a>
</div>
}

4
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Rating/Default.cshtml

@ -27,9 +27,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Rating Detail</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row text-center">

2
modules/docs/src/Volo.Docs.Admin.Web/Pages/Docs/Admin/Projects/Index.cshtml

@ -31,7 +31,7 @@
<abp-column size-md="_6">
<h2>@L["Projects"]</h2>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-column size-md="_6" class="text-end">
@if (await Authorization.IsGrantedAsync(DocsAdminPermissions.Projects.Create))
{
<abp-dropdown>

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/Index.cshtml

@ -33,7 +33,7 @@
<abp-column size-md="_6">
<abp-card-title>@L["Roles"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-column size-md="_6" class="text-end">
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
</abp-column>
</abp-row>

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml

@ -34,7 +34,7 @@
<abp-column size-md="_6">
<abp-card-title>@L["Users"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-column size-md="_6" class="text-end">
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
</abp-column>
</abp-row>

2
modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/Index.cshtml

@ -29,7 +29,7 @@
<abp-column size-md="_6">
<abp-card-title>@L["Tenants"]</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
<abp-column size-md="_6" class="text-end">
@await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new { pageName = typeof(IndexModel).FullName })
</abp-column>
</abp-row>

3
npm/packs/select2/abp.resourcemapping.js

@ -3,7 +3,6 @@
"@node_modules/select2/dist/css/select2.min.css": "@libs/select2/css/",
"@node_modules/select2/dist/js/select2.min.js": "@libs/select2/js/",
"@node_modules/select2/dist/js/select2.full.min.js": "@libs/select2/js/",
"@node_modules/select2/dist/js/i18n/*.js": "@libs/select2/js/i18n/",
"@node_modules/@abp/select2/src/*.*": "@libs/select2/js/"
"@node_modules/select2/dist/js/i18n/*.js": "@libs/select2/js/i18n/"
}
}

4
npm/packs/select2/src/select2-bootstrap-modal-patch.js

@ -1,4 +0,0 @@
/*
https://select2.org/troubleshooting/common-problems
*/
$.fn.modal.Constructor.prototype._enforceFocus = function () { };

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Host/Pages/Index.cshtml

@ -22,6 +22,6 @@
@Html.Raw(CurrentUser.GetAllClaims().Select(c => $"{c.Type}={c.Value}").OrderBy(x => x).JoinAsString(" <br /> "))
}
<hr />
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
<p class="text-end"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
</abp-card-body>
</abp-card>

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Pages/Index.cshtml

@ -19,7 +19,7 @@
<span>Welcome: @CurrentUser.UserName</span>
}
<hr />
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
<p class="text-end"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
</abp-card-body>
</abp-card>

Loading…
Cancel
Save