summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-02-24 17:20:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-24 23:35:44 +0000
commit1ea940f920371939527353061664b927243a7233 (patch)
treeeceb05e9153698f6409c44f7f27a1e551229cff0
parent1e0e700f4b52465ee0afd5b67222785b9a1a0055 (diff)
downloadpoky-1ea940f920371939527353061664b927243a7233.tar.gz
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 <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/toastergui/static/css/default.css6
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerdetails.js2
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/machines.js3
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/projectapp.js9
4 files changed, 17 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css
index f97e6c4b76..277888bc0c 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -237,4 +237,10 @@ div.add-deps { margin-top: 15px; }
237.animate-repeat.ng-enter.ng-enter-active { 237.animate-repeat.ng-enter.ng-enter-active {
238 opacity:1; 238 opacity:1;
239} 239}
240
241@keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
242@-webkit-keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
243
244.machines-highlight { -webkit-animation: machines-fade 7s 1; -moz-animation: machines-fade 7s 1; animation: machines-fade 7s 1; }
245
240.tab-pane table { margin-top: 10px; } 246.tab-pane table { margin-top: 10px; }
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) {
133 var data = { machineName : $(this).data('machine-name') }; 133 var data = { machineName : $(this).data('machine-name') };
134 libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data, 134 libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
135 function (){ 135 function (){
136 window.location.replace(ctx.projectPageUrl); 136 window.location.replace(ctx.projectPageUrl+"#/machineselected");
137 }, null); 137 }, null);
138 }); 138 });
139 139
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) {
77 show_layer_deps_modal(ctx.projectId, layer, data.list, null, null, true, function () { 77 show_layer_deps_modal(ctx.projectId, layer, data.list, null, null, true, function () {
78 /* Success add deps and layer */ 78 /* Success add deps and layer */
79 setLayerInCurrentPrj(btn, data.list); 79 setLayerInCurrentPrj(btn, data.list);
80 console.log ("TODO SUCCESS");
81 }); 80 });
82 } 81 }
83 }, null); 82 }, null);
@@ -87,7 +86,7 @@ function machinesPageInit (ctx) {
87 var data = { machineName : $(this).data('machine-name') }; 86 var data = { machineName : $(this).data('machine-name') };
88 libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data, 87 libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data,
89 function (){ 88 function (){
90 window.location.replace(ctx.projectPageUrl); 89 window.location.replace(ctx.projectPageUrl+"#/machineselected");
91 }, null); 90 }, null);
92 }); 91 });
93 92
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
665 "\">select targets</a> you want to build.", "alert-success"); 665 "\">select targets</a> you want to build.", "alert-success");
666 }); 666 });
667 667
668 _cmdExecuteWithParam("/machineselected", function () {
669 $scope.displayAlert($scope.zone2alerts, "You have changed the machine to: <strong>" + $scope.machine.name + "</strong>", "alert-info");
670 var machineDistro = angular.element("#machine-distro");
671
672 angular.element("html, body").animate({ scrollTop: machineDistro.position().top }, 700).promise().done(function() {
673 $animate.addClass(machineDistro, "machines-highlight");
674 });
675 });
676
668 _cmdExecuteWithParam("/layerimported", function (layer) { 677 _cmdExecuteWithParam("/layerimported", function (layer) {
669 var imported = $cookieStore.get("layer-imported-alert"); 678 var imported = $cookieStore.get("layer-imported-alert");
670 var text; 679 var text;