Open Closed

Add a JavaScript File for a User Page (extending the user actions like delete, edit) #106


0
rajasekhard2015 created

Hi,

I want add one more option for seeting the each user loggedin info..
please suggest me the process how to add one modal (Actions like edit, claims and delete user) want add one more action.


8 Answer(s)
  • 1
    liangshiwei created
    Support Team

    Hi See https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface#example-add-a-javascript-file-for-a-specific-page for add a .js file to page.

  • 0
    rajasekhard2015 created

    Hi I have added the functionality like,

    $(function() { abp.log.info('My custom user script file has been loaded!');

    //TODO how to get user instance to add another action
    

    });

    JavaScript Then add this file to the bundle of the role management page:

    Configure<AbpBundlingOptions>(options => { options.ScriptBundles .Configure( typeof(Volo.Abp.Identity.Web.Pages.Identity.Users.IndexModel).FullName, bundleConfig => { bundleConfig.AddFiles("/Pages/Identity/Users/myuser.js"); }); });

    In Js file how can i get the user page instance please give me that steps

  • 0
    liangshiwei created
    Support Team

    I think you can directly overwrite index.js Copy the index.js source file and update it.

       rowAction: {
                            items:
                                [
                                      Add your actions
                                ]
                        }
    

    You can use js to dynamically add a action modal dom, or you can choose to overwrite the page.

  • 0
    rajasekhard2015 created

    index.js file where can i get that.

  • 0
    liangshiwei created
    Support Team

    You can find it in the browser's Developer Tools "Sources" window

  • 0
    rajasekhard2015 created

    Thank you liangshiwei its working.

  • 0
    rajasekhard2015 created

    Its not working in release mode. its showing the error like $ not found and abp notfound And also css also not coming.

  • 0
    liangshiwei created
    Support Team

    Hi I cannot reproduce your problem, can you use the CLI to create a simple project to reproduce the problem.