mirror of
https://github.com/ansible/awx.git
synced 2026-07-29 00:49:55 -02:30
Cleanup component communication
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
function atPanelBody (pathService) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
require: '^^atPanel',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: pathService.getPartialPath('components/panel/body'),
|
||||
scope: {
|
||||
state: '='
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,10 @@ function atPanelHeading (pathService) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
require: '^^atPanel',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: pathService.getPartialPath('components/panel/heading'),
|
||||
link,
|
||||
scope: {
|
||||
config: '='
|
||||
}
|
||||
link
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-10">
|
||||
<h3 class="at-Panel-headingTitle">
|
||||
{{ config.text }}
|
||||
<ng-transclude></ng-transclude>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
|
||||
@@ -6,24 +6,25 @@ function dismiss ($state) {
|
||||
$state.go('^');
|
||||
}
|
||||
|
||||
function controller ($state) {
|
||||
function AtPanelController ($state) {
|
||||
let vm = this;
|
||||
|
||||
vm.dismiss = dismiss.bind(vm, $state);
|
||||
vm.use = use;
|
||||
}
|
||||
|
||||
controller.$inject = ['$state'];
|
||||
AtPanelController.$inject = ['$state'];
|
||||
|
||||
function atPanel (pathService) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: pathService.getPartialPath('components/panel/panel'),
|
||||
controller,
|
||||
controller: AtPanelController,
|
||||
controllerAs: 'vm',
|
||||
scope: {
|
||||
config: '='
|
||||
state: '='
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user