mirror of https://github.com/abpframework/abp.git
5 changed files with 49 additions and 11 deletions
@ -1,5 +1,12 @@ |
|||||
@model Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewModel |
@model Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewModel |
||||
@foreach (var reaction in Model.Reactions) |
<span class="cms-reaction-selection"> |
||||
{ |
<a class="cms-reaction-selection-button"> |
||||
<cms-icon name="@reaction.Icon" /> |
<i class="far fa-smile"></i> |
||||
} |
</a> |
||||
|
<div class="cms-reaction-selection-area" style="display: none"> |
||||
|
@foreach (var reaction in Model.Reactions) |
||||
|
{ |
||||
|
<cms-icon name="@reaction.Icon"/> |
||||
|
} |
||||
|
</div> |
||||
|
</span> |
||||
|
|||||
@ -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.Modularity; |
||||
|
|
||||
|
namespace Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.ReactionSelection |
||||
|
{ |
||||
|
[DependsOn( |
||||
|
typeof(BootstrapScriptContributor) |
||||
|
)] |
||||
|
public class ReactionSelectionScriptBundleContributor : BundleContributor |
||||
|
{ |
||||
|
public override void ConfigureBundle(BundleConfigurationContext context) |
||||
|
{ |
||||
|
context.Files.AddIfNotContains("/Pages/CmsKit/Shared/Components/ReactionSelection/default.js"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
(function () { |
||||
|
$(document).ready(function () { |
||||
|
|
||||
|
$('.cms-reaction-selection').each(function () { |
||||
|
var $this = $(this); |
||||
|
var $selectionButton = $this.find('.cms-reaction-selection-button'); |
||||
|
var $selectionArea = $this.find('.cms-reaction-selection-area'); |
||||
|
|
||||
|
$selectionButton.popover({ |
||||
|
html: true, |
||||
|
placement: 'right', |
||||
|
content: $selectionArea.html() |
||||
|
}); |
||||
|
}) |
||||
|
}); |
||||
|
})(); |
||||
Loading…
Reference in new issue