mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Merge pull request #339 from gconsidine/ui/fix/document-reference-on-start
Use $document instead of document for on fn
This commit is contained in:
commit
e7f4e79248
@ -1,9 +1,11 @@
|
||||
const templateUrl = require('~components/layout/side-nav.partial.html');
|
||||
|
||||
let $document;
|
||||
|
||||
function atSideNavLink (scope, element, attrs, ctrl) {
|
||||
scope.layoutVm = ctrl;
|
||||
|
||||
document.on('click', (e) => {
|
||||
$document.on('click', (e) => {
|
||||
if ($(e.target).parents('.at-Layout-side').length === 0) {
|
||||
scope.$emit('clickOutsideSideNav');
|
||||
}
|
||||
@ -35,7 +37,9 @@ function AtSideNavController ($scope, $window) {
|
||||
|
||||
AtSideNavController.$inject = ['$scope', '$window'];
|
||||
|
||||
function atSideNav () {
|
||||
function atSideNav (_$document_) {
|
||||
$document = _$document_;
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
@ -50,4 +54,6 @@ function atSideNav () {
|
||||
};
|
||||
}
|
||||
|
||||
atSideNav.$inject = ['$document'];
|
||||
|
||||
export default atSideNav;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user