Cleanup inconsistencies in directives and dead code

This commit is contained in:
gconsidine
2017-05-25 11:46:15 -04:00
parent 19fa782fb4
commit a322fe97f6
39 changed files with 426 additions and 453 deletions

View File

@@ -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')
};
}

View File

@@ -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: '@'
}
};
}

View File

@@ -1,3 +1,3 @@
<div class="panel panel-default at-Panel">
<ng-transclude></ng-transclude>
<ng-transclude></ng-transclude>
</div>