]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: Add machine selection notification
authorMichael Wood <michael.g.wood@intel.com>
Tue, 24 Feb 2015 17:20:54 +0000 (17:20 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Feb 2015 23:35:39 +0000 (23:35 +0000)
This adds a notification to the project page to notify users of the
change in project configuration.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/static/css/default.css
lib/toaster/toastergui/static/js/layerdetails.js
lib/toaster/toastergui/static/js/machines.js
lib/toaster/toastergui/static/js/projectapp.js

index f97e6c4b76cf15eab246f8afb96fa9dd215366d2..277888bc0c215cee77f6f71ce949cb37817299dc 100644 (file)
@@ -237,4 +237,10 @@ div.add-deps { margin-top: 15px; }
 .animate-repeat.ng-enter.ng-enter-active {
   opacity:1;
 }
+
+@keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
+@-webkit-keyframes machines-fade { 0% { background-color: #D9EDF7; } 25% { background-color: #D9EDF7; } 100% { background-color: white; } }
+
+.machines-highlight { -webkit-animation: machines-fade 7s 1; -moz-animation: machines-fade 7s 1; animation: machines-fade 7s 1; }
+
 .tab-pane table { margin-top: 10px; }
index 2e713d5a0f5a9105cdf3412763ec0cc75c00852b..22c40d971a83297edc7ae107f6f17b8307e8b6df 100644 (file)
@@ -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);
   });
 
index ee8c9804cc2b71640c479fe4b208ff8f27dc8e7e..973a037be70794fbad8304388d3e43e4db8e17ab 100644 (file)
@@ -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);
   });
 
index 4d00f40ff1435015d237baffb07136156c74c748..df811fb4a302888b72c0bf0179aee52484c1ec46 100644 (file)
@@ -665,6 +665,15 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
                     "\">select targets</a> you want to build.", "alert-success");
         });
 
+        _cmdExecuteWithParam("/machineselected", function () {
+            $scope.displayAlert($scope.zone2alerts, "You have changed the machine to: <strong>" + $scope.machine.name + "</strong>", "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;