Browse Source

Revert "Make main menu support target attribute"

This reverts commit 05b62bfd22.
pull/6165/head
liangshiwei 6 years ago
parent
commit
65fbae19be
  1. 2
      docs/en/UI/AspNetCore/Navigation-Menu.md
  2. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/Default.cshtml
  3. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/_MenuItem.cshtml

2
docs/en/UI/AspNetCore/Navigation-Menu.md

@ -89,7 +89,7 @@ There are more options of a menu item (the constructor of the `ApplicationMenuIt
* `icon` (`string`): An icon name. Free [Font Awesome](https://fontawesome.com/) icon classes are supported out of the box. Example: `fa fa-book`. You can use any CSS font icon class as long as you include the necessary CSS files to your application.
* `order` (`int`): The order of the menu item. Default value is `1000`. Items are sorted by the adding order unless you specify an order value.
* `customData` (`object`): A custom object that you can associate to the menu item and use it while rendering the menu item.
* `target` (`string`): Target of the menu item. Can be `null` (default), "\_*blank*", "\_*self*", "\_*parent*", "\_*top*" or a frame name for web applications.
* `target` (`string`): Target of the menu item. Can be `null` (default), "_blank", "_*self*", "_parent", "_*top*" or a frame name for web applications.
* `elementId` (`string`): Can be used to render the element with a specific HTML `id` attribute.
* `cssClass` (`string`): Additional string classes for the menu item.

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/Default.cshtml

@ -11,7 +11,7 @@
if (menuItem.Url != null)
{
<li class="nav-item @cssClass @disabled" @elementId>
<a class="nav-link" href="@url" target="@menuItem.Target">
<a class="nav-link" href="@url">
@if (menuItem.Icon != null)
{
if (menuItem.Icon.StartsWith("fa"))

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/_MenuItem.cshtml

@ -10,7 +10,7 @@
{
if (Model.Url != null)
{
<a class="dropdown-item @cssClass @disabled" href="@url" target="@Model.Target" @Html.Raw(elementId)>
<a class="dropdown-item @cssClass @disabled" href="@url" @Html.Raw(elementId)>
@if (Model.Icon != null)
{
if (Model.Icon.StartsWith("fa"))
@ -40,5 +40,5 @@ else
@await Html.PartialAsync("~/Themes/Basic/Components/Menu/_MenuItem.cshtml", childMenuItem)
}
</div>
</div>
</div>
}

Loading…
Cancel
Save