X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-demo.git;a=blobdiff_plain;f=afm-client%2Fapp%2FFrontend%2Fwidgets%2FActionButtons%2FAppliButton.js;fp=afm-client%2Fapp%2FFrontend%2Fwidgets%2FActionButtons%2FAppliButton.js;h=b7acb6b6c0ccded451d2a1cdf42b3f99f9e39a95;hp=014fe4d4221dfdf70aaceb203d366762bfae6868;hb=d47fd84a6a16b1c9c4b4ce5a3279b9ecaea54c1b;hpb=3482263a53803b6e7662e67b39ed97bdd9fcef13 diff --git a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js index 014fe4d..b7acb6b 100644 --- a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js +++ b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js @@ -90,7 +90,7 @@ scope.runstatus="start"; notifySuccess (action, response); if(response.data.response.uri) - $window.open(response.data.response.uri.replace("%h", $location.host())); + scope.winapp= $window.open(response.data.response.uri.replace("%h", $location.host())); }); break; @@ -103,6 +103,13 @@ return; } scope.runstatus="stop"; + + // if a remote window app was open let's close it + if (scope.winapp) { + console.log ("Closing Application Window label=%s id=%s", scope.label, scope.appID); + scope.winapp.close(); + scope.winapp=false; + } notifySuccess (action, response); }); break;