mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
* Faster build times * Smaller bundle sizes * Adjust paths * Cleanup npm dependencies * Remove unneded Grunt tasks
45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
const templateUrl = require('@components/input/text.partial.html');
|
|
|
|
function atInputTextLink (scope, element, attrs, controllers) {
|
|
let formController = controllers[0];
|
|
let inputController = controllers[1];
|
|
|
|
if (scope.tab === '1') {
|
|
element.find('input')[0].focus();
|
|
}
|
|
|
|
inputController.init(scope, element, formController);
|
|
}
|
|
|
|
function AtInputTextController (baseInputController) {
|
|
let vm = this || {};
|
|
|
|
vm.init = (scope, element, form) => {
|
|
baseInputController.call(vm, 'input', scope, element, form);
|
|
|
|
vm.check();
|
|
};
|
|
}
|
|
|
|
AtInputTextController.$inject = ['BaseInputController'];
|
|
|
|
function atInputText () {
|
|
return {
|
|
restrict: 'E',
|
|
transclude: true,
|
|
replace: true,
|
|
require: ['^^atForm', 'atInputText'],
|
|
templateUrl,
|
|
controller: AtInputTextController,
|
|
controllerAs: 'vm',
|
|
link: atInputTextLink,
|
|
scope: {
|
|
state: '=',
|
|
col: '@',
|
|
tab: '@'
|
|
}
|
|
};
|
|
}
|
|
|
|
export default atInputText;
|