mirror of
https://github.com/ansible/awx.git
synced 2026-08-04 03:50:01 -02:30
Use eslint on ui/lib and ui/features code
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
const templateUrl = require('@components/truncate/truncate.partial.html');
|
||||
const templateUrl = require('~components/truncate/truncate.partial.html');
|
||||
|
||||
function atTruncateLink (scope, el, attr, ctrl) {
|
||||
let truncateController = ctrl;
|
||||
let string = attr.string;
|
||||
let maxlength = attr.maxlength;
|
||||
const truncateController = ctrl;
|
||||
const { string } = attr;
|
||||
const { maxlength } = attr;
|
||||
|
||||
truncateController.init(el, string, maxlength);
|
||||
}
|
||||
|
||||
function AtTruncateController (strings) {
|
||||
let vm = this;
|
||||
const vm = this;
|
||||
let el;
|
||||
let string;
|
||||
let maxlength;
|
||||
@@ -29,14 +29,14 @@ function AtTruncateController (strings) {
|
||||
position: 'top',
|
||||
icon: 'fa fa-clone',
|
||||
resetOnExit: true,
|
||||
click: copyToClipboard
|
||||
click: vm.copyToClipboard
|
||||
}
|
||||
};
|
||||
|
||||
function copyToClipboard() {
|
||||
vm.copyToClipboard = () => {
|
||||
vm.tooltip.popover.text = vm.strings.get('truncate.COPIED');
|
||||
|
||||
let textarea = el[0].getElementsByClassName('at-Truncate-textarea')[0];
|
||||
const textarea = el[0].getElementsByClassName('at-Truncate-textarea')[0];
|
||||
textarea.value = string;
|
||||
textarea.select();
|
||||
|
||||
@@ -46,7 +46,7 @@ function AtTruncateController (strings) {
|
||||
|
||||
AtTruncateController.$inject = ['ComponentsStrings'];
|
||||
|
||||
function atTruncate() {
|
||||
function atTruncate () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
@@ -60,7 +60,7 @@ function atTruncate() {
|
||||
maxLength: '@',
|
||||
string: '@'
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default atTruncate;
|
||||
|
||||
Reference in New Issue
Block a user