mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
section UX complete
This commit is contained in:
parent
c12d66643c
commit
9dcaf697a8
18 changed files with 30 additions and 632 deletions
|
@ -24,40 +24,5 @@ export default Mixin.create({
|
|||
|
||||
removeTooltips() {
|
||||
$('[data-toggle="tooltip"]').tooltip('dispose');
|
||||
},
|
||||
|
||||
addTooltip(elem) {
|
||||
if (elem == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
let t = new Tooltip({
|
||||
target: elem
|
||||
});
|
||||
|
||||
let tt = this.get('tooltips');
|
||||
tt.push(t);
|
||||
|
||||
return t;
|
||||
},
|
||||
|
||||
destroyTooltip(t) {
|
||||
t.destroy();
|
||||
},
|
||||
|
||||
destroyTooltips() {
|
||||
if (this.get('isDestroyed') || this.get('isDestroying')) {
|
||||
return;
|
||||
}
|
||||
|
||||
let tt = this.get('tooltips');
|
||||
|
||||
tt.forEach(t => {
|
||||
t.destroy();
|
||||
});
|
||||
|
||||
tt.length = 0;
|
||||
|
||||
this.set('tooltips', tt);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue