SmartIT_Extensions/BMC/smart-it-full-helix/scripts/app/change/rationale-controller.js

24 lines
759 B
JavaScript

"use strict";
/**
* Created by ygowtham on 6/26/2015.
*/
(function () {
'use strict';
angular.module('changeModule')
.controller('RationaleController', ['$scope', '$modalInstance', 'isRationalRequired', function ($scope, $modalInstance, isRationalRequired) {
$scope.textAreaIsFocused = false;
$scope.rationale = "";
$scope.isRationalRequired = isRationalRequired;
$scope.done = function () {
$modalInstance.close($scope.rationale);
};
$scope.cancel = function () {
$modalInstance.dismiss();
};
$scope.$on('$stateChangeStart', function () {
$scope.cancel();
});
}
]);
})();