This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/ui/manage-trigger-custom-git.js
Joseph Schorr 8e863b8cf5 Implement new create and manager trigger UI
Implements the new trigger setup user interface, which is now a linear workflow found on its own page, rather than a tiny modal dialog

Fixes #1187
2017-02-28 16:51:42 -05:00

27 lines
No EOL
748 B
JavaScript

/**
* An element which displays the setup and management workflow for a custom git trigger.
*/
angular.module('quay').directive('manageTriggerCustomGit', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/manage-trigger-custom-git.html',
replace: false,
transclude: true,
restrict: 'C',
scope: {
'trigger': '=trigger',
'activateTrigger': '&activateTrigger'
},
controller: function($scope, $element) {
$scope.config = {};
$scope.currentState = null;
$scope.$watch('trigger', function(trigger) {
if (trigger) {
$scope.config = trigger['config'] || {};
}
});
}
};
return directiveDefinitionObject;
});