+ @if (Model.Widgets.Count() > 1)
{
-
@await Component.InvokeAsync("CmsPolls")
- @*
*@
+
@await Component.InvokeAsync("CmsPolls")
diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Contents/addWidgetModal.js b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Contents/addWidgetModal.js
index 16a79d127e..acb44044c5 100644
--- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Contents/addWidgetModal.js
+++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Contents/addWidgetModal.js
@@ -14,9 +14,6 @@ $(function () {
var firstWidgetType = widgetTypes[0];
if (firstWidgetType.key == "Poll") {
$("#polls").removeAttr("hidden");
- let widgetKey = $('#Widget').find('option:selected').val();
- let html = "
"
- $("#PropertySideId").append(html);
}
else {
for (const property of firstWidgetType.properties) {
@@ -30,9 +27,9 @@ $(function () {
});
});
- $("#Widget").change(function () {
+ $("#WidgetCode").keyup(function (e) {
$("#PropertySideId").html('');
- let widgetKey = $(this).find('option:selected').val();
+ let widgetKey = $(this).val();
let html = "
"
$("#PropertySideId").append(html);
});