ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 6 replies, has 4 voices, and was last updated by Yevhen Shyshkin Yevhen Shyshkin 1 year, 3 months ago.

  • Creator
    Topic
  • #6694

    stalxed
    Participant

    Hello!

    I create custom mass action, but JavaScipt not work.

    I create:
    1) Mass action

    2) Register mass action

    3) Use it in datagrid.
    4) Create file Resources/config/requirejs.yml

    5) Create file Resources/config/oro/assetic.yml

    6) Create file Resources/public/js/datagrid/action/test123-action.js

    7) Clear cache.
    8) Performs commands:
    php app/console assets:install
    php app/console assetic:dump
    php app/console oro:requirejs:build

    Action work good as Ajax Action, but extend of JavaScript action not work. Why?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #6714

    Alexandr Smaga
    Participant

    Hello @stalxed!

    Not sure that I got your issue well. Code looks OK for me, did you add your test123 thru grid config to some grid ? Could you please give mroe details what doesnot work ?

    I see that “delete mass action” inherited from MassAction class(see)

    #6728

    stalxed
    Participant

    Thank for answer!

    I found a bug, need set frontend_type:

    Now work fine!

    #6733

    Alexandr Smaga
    Participant

    Hello !

    Thank you for your reply, hope this topic will be useful to someone from community. It will be nice to have this in bundle doc!

    #6764

    stalxed
    Participant

    I wrote several types of mass action for data grid.
    I want to say thank you so much!!!

    Very powerful system in the extension! A number of complex actions made ​​simple and elegant!

    #17668
    golriz.nourani
    golriz.nourani
    Participant

    I am try to write a mass action of widget type as below

    mass action

    — mass-action.yml

    Resources/config/requirejs.yml

    Resources/config/oro/assetic.yml

    — Resources/public/js/datagrid/action/change-action.js

    add below mass-action to datagrid.yml of OroCrmContactBundle

    but when I want to load contact grid I have below JavaScript error on browser
    Uncaught TypeError: “model” is required

    could you help me?
    thanks a lot

    #17677
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello.

    Each action is associated with the appropriate grid row model (that contains row data). Please, check where it is not passed and pass it there (see other grid actions for example).

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.