Skip to content

Commit

Permalink
Added alert variable for the onClick callback
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlcf88 committed Jul 11, 2024
1 parent 01b85ac commit 6b51434
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0-preview.9</Version>
<Version>1.0.0-preview.10</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<AbpProjectType>module</AbpProjectType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
options.Actions.Add(new ProcessStateActionDefinition("FakeExport", "ExportFailed",
new LocalizableString("Action:Retry"),
"var l = abp.localization.getResource();abp.message.confirm(l('SureToRetry')).then(function(confirmed){if(confirmed){abp.notify.success(l('SuccessToRetry'),l('Success'));}});",
"var l = abp.localization.getResource();abp.message.confirm(l('SureToRetry')).then(function(confirmed){if(confirmed){abp.notify.success(l('SuccessToRetry'),l('Success'));var alert=new bootstrap.Alert(alertNode);alert.close();}})",
"var l = abp.localization.getResource();abp.message.confirm(l('SureToRetry')).then(function(confirmed){if(confirmed){abp.notify.success(l('SuccessToRetry'),l('Success'));alert.close();}})",
"abp.auth.isGranted('Demo.Exporting.Retry')"));
options.Actions.Add(new ProcessStateActionDefinition("FakeExport", "ExportFailed",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
for (var i in notificationOffcanvasAlertActions) {
var action = notificationOffcanvasAlertActions[i];
if (!action.visible(item)) continue;
var actionBtn = `<button type="button" id="action-btn-${i}-${item.id}" class="process-action-btn btn btn-link btn-sm">${action.text}</button><script>var actionBtn = document.getElementById('action-btn-${i}-${item.id}');actionBtn.addEventListener('click', function () {var alertNode = document.getElementById('${item.id}');return ${action.action}(${JSON.stringify(item)});});</script>`
var actionBtn = `<button type="button" id="action-btn-${i}-${item.id}" class="process-action-btn btn btn-link btn-sm">${action.text}</button><script>var actionBtn = document.getElementById('action-btn-${i}-${item.id}');actionBtn.addEventListener('click', function () {var alert=new bootstrap.Alert(document.getElementById('${item.id}'));return ${action.action}(${JSON.stringify(item)});});</script>`
actionBtns += actionBtn;
}
return $(`
Expand Down

0 comments on commit 6b51434

Please sign in to comment.