mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 05:01:09 -02:30
auto-focus first input in jt launch modal
This commit is contained in:
@@ -12,7 +12,7 @@ export default
|
|||||||
|
|
||||||
let scope;
|
let scope;
|
||||||
|
|
||||||
vm.init = (_scope_) => {
|
vm.init = (_scope_, controller, el) => {
|
||||||
scope = _scope_;
|
scope = _scope_;
|
||||||
|
|
||||||
scope.parseType = 'yaml';
|
scope.parseType = 'yaml';
|
||||||
@@ -102,6 +102,13 @@ export default
|
|||||||
return ToJSON(scope.parseType, scope.extraVariables, true);
|
return ToJSON(scope.parseType, scope.extraVariables, true);
|
||||||
}
|
}
|
||||||
scope.validate = validate;
|
scope.validate = validate;
|
||||||
|
|
||||||
|
angular.element(el).ready(() => {
|
||||||
|
const inputs = el.find('input, select');
|
||||||
|
if (inputs.length) {
|
||||||
|
inputs.get(0).focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default [ 'templateUrl',
|
|||||||
const launchController = controllers[0];
|
const launchController = controllers[0];
|
||||||
const promptOtherPromptsController = controllers[1];
|
const promptOtherPromptsController = controllers[1];
|
||||||
|
|
||||||
promptOtherPromptsController.init(scope, launchController);
|
promptOtherPromptsController.init(scope, launchController, el);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
|||||||
Reference in New Issue
Block a user