Base solution for your next web application
Open Closed

abp.message.confirm shows callback code in message #8187


User avatar
0
fupanda created

A fresh template asp mvc jquery version 8.0.0 shows callback code in popup.

Seems that the confirm has an extra param now "title", but is called everywhere like this

abp.message.confirm( app.localize('yourmessage'), function (isConfirmed) { if (isConfirmed) { your code } } );


10 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    https://github.com/aspnetboilerplate/aspnetboilerplate/pull/4909

    The abp.message function has been refactored. If you use the latest version of abp-web-resources, please change your code about abp.message.

  • User Avatar
    0
    fupanda created

    @mailming I understand that it's refactored, but I downloaded a fresh template from the asp.net zero customer website and the template is broken.

    The documentation says that the second param is optional, but with the refactoring that doesn't seem the case https://aspnetboilerplate.com/Pages/Documents/Javascript-API/Message

  • User Avatar
    0
    maliming created
    Support Team

    I will update the documentation, but I did not find the wrong abp.message.confirm code in the v8 project template. Can you point it out?

  • User Avatar
    0
    fupanda created

    Everywhere where abp.message.confirm is used in the Web project

  • User Avatar
    0
    maliming created
    Support Team

    hi @fupanda I will upgrade abp-web-resources to the latest version and check them, thanks for feedback.

    Most developers use yarn to restore packages, they will not encounter this problem. But I will still update it.

  • User Avatar
    0
    fupanda created

    hi @maliming,

    We are upgrading from older asp.net zero version and use nuget packages. Al other resources like web need to be upgraded manually with file comparison because of own implementations. So we used fresh downloaded template to compare.

    I don't understand how yarn would help us here, because it will not update existing web resource.

  • User Avatar
    0
    maliming created
    Support Team

    When you use the latest version of abp-web-resources (4.1.0), you need to check the code in the project using the abp.message.confirm method, because its parameters have changed.

    If you use yarn restore package, it will not use the latest version of abp-web-resources, so this problem does not exist.

    I will upgrade the abp-web-resources in zero to the latest version. Also update the rad tool template.

  • User Avatar
    0
    fupanda created

    thank you @maliming!

  • User Avatar
    0
    maliming created
    Support Team

    https://github.com/aspnetzero/aspnet-zero-core/pull/2833

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.