mirror of
https://github.com/ansible/awx.git
synced 2026-06-29 10:28:01 -02:30
Cleanup inconsistencies in directives and dead code
This commit is contained in:
@@ -3,10 +3,7 @@ function atPanelBody (pathService) {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
templateUrl: pathService.getPartialPath('components/panel/body'),
|
||||
scope: {
|
||||
state: '='
|
||||
}
|
||||
templateUrl: pathService.getPartialPath('components/panel/body')
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +1,44 @@
|
||||
function atPanelLink (scope, el, attrs, controllers) {
|
||||
let panelController = controllers[0];
|
||||
|
||||
panelController.init(scope, el);
|
||||
}
|
||||
|
||||
function AtPanelController ($state) {
|
||||
let vm = this;
|
||||
|
||||
let scope;
|
||||
let el;
|
||||
|
||||
vm.init = (_scope_, _el_) => {
|
||||
scope = _scope_;
|
||||
el = _el_;
|
||||
};
|
||||
|
||||
vm.dismiss = () => {
|
||||
$state.go('^');
|
||||
};
|
||||
|
||||
vm.use = scope => {
|
||||
scope.dismiss = this.dismiss;
|
||||
vm.use = child => {
|
||||
child.dismiss = vm.dismiss;
|
||||
};
|
||||
}
|
||||
|
||||
AtPanelController.$inject = ['$state'];
|
||||
|
||||
function atPanel (pathService) {
|
||||
function atPanel (pathService, _$animate_) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
require: ['atPanel'],
|
||||
transclude: true,
|
||||
templateUrl: pathService.getPartialPath('components/panel/panel'),
|
||||
controller: AtPanelController,
|
||||
controllerAs: 'vm',
|
||||
link: atPanelLink,
|
||||
scope: {
|
||||
state: '='
|
||||
state: '=',
|
||||
animate: '@'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="panel panel-default at-Panel">
|
||||
<ng-transclude></ng-transclude>
|
||||
<ng-transclude></ng-transclude>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user