Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jesse Andrews 162 posts 639 karma points
    Jun 28, 2019 @ 00:44
    Jesse Andrews
    0

    How does Translation Manager transition between job states without a full refresh?

    I have some custom logic that moves the translation job successfully from the submitted step to the received step when run. However, I'm not sure how to automatically refresh the page to show the updated job information. The information refreshes properly when I manually refresh, but I would like this to happen automatically, like it does when moving from the reviewing to the accepted state. I looked at some of the existing javascript controllers and found

    vm.rootScope.$broadcast('translate-reloaded');
    

    inside "App_Plugins/TranslationManager/backoffice/tm/submitted.Controller.js." I tried running this script in my own angular controller and it didn't refresh the job unfortunately. Is there something I'm missing, or should I be doing something else to trigger this transition?

  • Kevin Jump 1896 posts 11907 karma points MVP 4x c-trib
    Jun 28, 2019 @ 08:03
    Kevin Jump
    0

    Hi,

    yeah, I would just check you have the reference to $RootScope setup - i can't remember why it's assigned to the VM object in that controller but just referencing it directly should work.

    $rootScope.$broadcast('translate-job-reloaded');
    
  • Jesse Andrews 162 posts 639 karma points
    Jun 28, 2019 @ 16:47
    Jesse Andrews
    100

    Looks like I need both events. I tried using just the "translate-job-reloaded" event and it properly refreshed the job status, but not the status of the pages within that job. Adding back in the "translate-reloaded" event fixed that.

Please Sign in or register to post replies

Write your reply to:

Draft