$scope.layerAddId = item.id;
};
+ $scope.machineSelect = function (machineName) {
+ $scope._makeXHRCall({
+ method: "POST", url: $scope.urls.xhr_edit,
+ data: {
+ machineName: machineName,
+ }
+ }).then(function () {
+ $scope.machine.name = machineName;
+
+ $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");
+ });
+ });
+ };
+
$scope.layerAddById = function (id) {
$scope.layerAddId = id;
_cmdExecuteWithParam("/machineselect=", function (machine) {
$scope.machineName = machine;
- $scope.toggle('#select-machine');
+ $scope.machine.name = machine;
+ $scope.machineSelect(machine);
+
});