From 1ea940f920371939527353061664b927243a7233 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Tue, 24 Feb 2015 17:20:54 +0000 Subject: bitbake: toaster: Add machine selection notification This adds a notification to the project page to notify users of the change in project configuration. (Bitbake rev: fa5343cf867586c0e42517dd2ed0ec5a4c28c408) Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 2 +- bitbake/lib/toaster/toastergui/static/js/machines.js | 3 +-- bitbake/lib/toaster/toastergui/static/js/projectapp.js | 9 +++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/static/js') diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js index 2e713d5a0f..22c40d971a 100644 --- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js +++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js @@ -133,7 +133,7 @@ function layerDetailsPageInit (ctx) { var data = { machineName : $(this).data('machine-name') }; libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data, function (){ - window.location.replace(ctx.projectPageUrl); + window.location.replace(ctx.projectPageUrl+"#/machineselected"); }, null); }); diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js b/bitbake/lib/toaster/toastergui/static/js/machines.js index ee8c9804cc..973a037be7 100644 --- a/bitbake/lib/toaster/toastergui/static/js/machines.js +++ b/bitbake/lib/toaster/toastergui/static/js/machines.js @@ -77,7 +77,6 @@ function machinesPageInit (ctx) { show_layer_deps_modal(ctx.projectId, layer, data.list, null, null, true, function () { /* Success add deps and layer */ setLayerInCurrentPrj(btn, data.list); - console.log ("TODO SUCCESS"); }); } }, null); @@ -87,7 +86,7 @@ function machinesPageInit (ctx) { var data = { machineName : $(this).data('machine-name') }; libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data, function (){ - window.location.replace(ctx.projectPageUrl); + window.location.replace(ctx.projectPageUrl+"#/machineselected"); }, null); }); diff --git a/bitbake/lib/toaster/toastergui/static/js/projectapp.js b/bitbake/lib/toaster/toastergui/static/js/projectapp.js index 4d00f40ff1..df811fb4a3 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projectapp.js +++ b/bitbake/lib/toaster/toastergui/static/js/projectapp.js @@ -665,6 +665,15 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc "\">select targets you want to build.", "alert-success"); }); + _cmdExecuteWithParam("/machineselected", function () { + $scope.displayAlert($scope.zone2alerts, "You have changed the machine to: " + $scope.machine.name + "", "alert-info"); + var machineDistro = angular.element("#machine-distro"); + + angular.element("html, body").animate({ scrollTop: machineDistro.position().top }, 700).promise().done(function() { + $animate.addClass(machineDistro, "machines-highlight"); + }); + }); + _cmdExecuteWithParam("/layerimported", function (layer) { var imported = $cookieStore.get("layer-imported-alert"); var text; -- cgit v1.2.3-54-g00ecf