Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
0be9458672
|
@ -11,7 +11,8 @@ export default class Controller extends Component {
|
||||||
element.tabIndex = 0;
|
element.tabIndex = 0;
|
||||||
|
|
||||||
element.addEventListener('focus', () => {
|
element.addEventListener('focus', () => {
|
||||||
if (this.field) return;
|
if (this.field || this.disabled) return;
|
||||||
|
|
||||||
$transclude((tClone, tScope) => {
|
$transclude((tClone, tScope) => {
|
||||||
this.field = tClone;
|
this.field = tClone;
|
||||||
this.tScope = tScope;
|
this.tScope = tScope;
|
||||||
|
@ -26,7 +27,7 @@ export default class Controller extends Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
element.addEventListener('focusout', event => {
|
element.addEventListener('focusout', event => {
|
||||||
this.destroyTimer();
|
if (this.field || this.disabled) return;
|
||||||
this.lastEvent = event;
|
this.lastEvent = event;
|
||||||
let target = event.relatedTarget;
|
let target = event.relatedTarget;
|
||||||
while (target && target != element)
|
while (target && target != element)
|
||||||
|
@ -57,6 +58,9 @@ Controller.$inject = ['$element', '$scope', '$transclude', '$timeout'];
|
||||||
ngModule.component('vnTdEditable', {
|
ngModule.component('vnTdEditable', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
|
bindings: {
|
||||||
|
disabled: '<?'
|
||||||
|
},
|
||||||
transclude: {
|
transclude: {
|
||||||
text: 'text',
|
text: 'text',
|
||||||
field: '?field'
|
field: '?field'
|
||||||
|
|
|
@ -4,7 +4,9 @@ vn-td-editable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
&:not([disabled="true"]) {
|
||||||
|
cursor: initial;
|
||||||
|
}
|
||||||
&.selected > .text {
|
&.selected > .text {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue