feat: on a phone the selection's zip and delete sit on the line of the blue buttons; moved to the next line they start on the left
This commit is contained in:
1 parent
01dc45ecad
commit
e05ff05015
2 files changed
+23
-4
No files matched your search
@@ -132,6 +132,7 @@
|
||||
const w = this.el.clientWidth;
|
||||
this.el.classList.toggle('narrow', w < 520);
|
||||
this.el.classList.toggle('mid', w < 760);
|
||||
this.fitSel();
|
||||
}).observe(this.el);
|
||||
this.start();
|
||||
}
|
||||
@@ -278,9 +279,19 @@
|
||||
tb.appendChild(tr);
|
||||
}
|
||||
}
|
||||
// fitSel: the selection's buttons on the right of the blue ones; moved to
|
||||
// a line of their own, they start on the left.
|
||||
fitSel() {
|
||||
const sel = this.q('.fp-sel');
|
||||
sel.classList.remove('wrapped');
|
||||
sel.classList.toggle('wrapped', sel.offsetTop > this.q('.fp-mkdir').offsetTop + 4);
|
||||
}
|
||||
updateSel() {
|
||||
const n = this.selected.size;
|
||||
this.q('.fp-selinfo').textContent = n ? 'Выбрано: ' + n : '';
|
||||
// A narrow pane (a phone) has room for the number alone.
|
||||
this.q('.fp-selinfo').textContent = n ? (this.el.classList.contains('narrow') ? n : 'Выбрано: ' + n) : '';
|
||||
this.q('.fp-selinfo').title = n ? 'Выбрано: ' + n : '';
|
||||
this.fitSel();
|
||||
this.q('.fp-zip').disabled = !n;
|
||||
this.q('.fp-delsel').disabled = !n;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user