X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=afm-client%2Fapp%2FFrontend%2Fwidgets%2FActionButtons%2FAppliButton.js;h=e51b3b6bfa94c3424acbb50a7350b74637a242ea;hb=eac68b18429b5e8bfb2aa8823d4f9a93f4e2ef5d;hp=b2d42b00815367f1d6f730ca60a6bb62308745b3;hpb=ba3ec968e550e6db1f9753c000b4a81306d271f0;p=src%2Fapp-framework-demo.git diff --git a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js index b2d42b0..e51b3b6 100644 --- a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js +++ b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js @@ -34,6 +34,7 @@ '
  • Start
  • ' + '
  • Stop
  • ' + '
  • Info
  • ' + + '
  • Uninstall
  • ' + '' + ''; @@ -122,8 +123,18 @@ }); break; + + case "uninstall": + AppCall.get ("afm-main", "uninstall", {id: scope.appID}, function(response) { + if (response.status !== 200 || response.data.jtype !== "AJB_reply") { + notifyError ("uninstall", response); + return; + } - + notifySuccess ("uninstall", response); + }); + break; + default: console.log ("ActionModal unknown action=[%s]", action); break; @@ -149,7 +160,7 @@ // extract application information from AppID+Store if (attrs.handle && scope.store [attrs.handle].name) { - scope.icon = AppConfig.paths.icons + scope.store [attrs.handle].name.toLowerCase() + '-ico.png'; + scope.icon = AppConfig.paths.icons + attrs.handle; //scope.store [attrs.handle].name.toLowerCase() + '-ico.png'; scope.label = scope.store [attrs.handle].name; scope.appID= attrs.handle; } else {