ManageIQ/manageiq-ui-classic

View on GitHub
app/javascript/oldjs/controllers/buttons/button_group_controller.js

Summary

Maintainability
A
0 mins
Test Coverage
ManageIQ.angular.app.controller('buttonGroupController', ['$scope', 'miqService', function($scope, miqService) {
  const init = function() {
    $scope.saveable = miqService.saveable;
    $scope.reactFormDirty = false;
  };
  init();

  listenToRx((event) => {
    if (event.name === 'dirty') {
      $scope.reactFormDirty = true;
      $scope.$apply();
    } else {
      $scope.reactFormDirty = false;
      $scope.$apply();
    }
  });
}]);