Merge pull request #1642 from LenAnderson/qr-settings-sortable-fix
This commit is contained in:
commit
ef3e51ccf2
|
@ -39,6 +39,8 @@ export class QuickReplySetLink {
|
||||||
}
|
}
|
||||||
const set = document.createElement('select'); {
|
const set = document.createElement('select'); {
|
||||||
set.classList.add('qr--set');
|
set.classList.add('qr--set');
|
||||||
|
// fix for jQuery sortable breaking childrens' touch events
|
||||||
|
set.addEventListener('touchstart', (evt)=>evt.stopPropagation());
|
||||||
set.addEventListener('change', ()=>{
|
set.addEventListener('change', ()=>{
|
||||||
this.set = QuickReplySet.get(set.value);
|
this.set = QuickReplySet.get(set.value);
|
||||||
this.update();
|
this.update();
|
||||||
|
|
|
@ -158,6 +158,7 @@ export class SettingsUi {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
$(qrsDom).sortable({
|
$(qrsDom).sortable({
|
||||||
delay: getSortableDelay(),
|
delay: getSortableDelay(),
|
||||||
|
handle: '.drag-handle',
|
||||||
stop: ()=>this.onQrListSort(),
|
stop: ()=>this.onQrListSort(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
}
|
}
|
||||||
|
#qr--settings .qr--setList > .qr--item > .drag-handle {
|
||||||
|
padding: 0.75em;
|
||||||
|
}
|
||||||
#qr--settings .qr--setList > .qr--item > .qr--visible {
|
#qr--settings .qr--setList > .qr--item > .qr--visible {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -189,6 +192,9 @@
|
||||||
#qr--settings #qr--set-qrList .qr--set-qrListContents > .qr--set-item > :nth-child(5) {
|
#qr--settings #qr--set-qrList .qr--set-qrListContents > .qr--set-item > :nth-child(5) {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
#qr--settings #qr--set-qrList .qr--set-qrListContents > .qr--set-item > .drag-handle {
|
||||||
|
padding: 0.75em;
|
||||||
|
}
|
||||||
#qr--settings #qr--set-qrList .qr--set-qrListContents > .qr--set-item .qr--set-itemLabel,
|
#qr--settings #qr--set-qrList .qr--set-qrListContents > .qr--set-item .qr--set-itemLabel,
|
||||||
#qr--settings #qr--set-qrList .qr--set-qrListContents > .qr--set-item .qr--action {
|
#qr--settings #qr--set-qrList .qr--set-qrListContents > .qr--set-item .qr--action {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -174,6 +174,9 @@
|
||||||
gap: 0.5em;
|
gap: 0.5em;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
|
> .drag-handle {
|
||||||
|
padding: 0.75em;
|
||||||
|
}
|
||||||
> .qr--visible {
|
> .qr--visible {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -200,6 +203,9 @@
|
||||||
> :nth-child(3) { flex: 0 0 auto; }
|
> :nth-child(3) { flex: 0 0 auto; }
|
||||||
> :nth-child(4) { flex: 1 1 75%; }
|
> :nth-child(4) { flex: 1 1 75%; }
|
||||||
> :nth-child(5) { flex: 0 0 auto; }
|
> :nth-child(5) { flex: 0 0 auto; }
|
||||||
|
> .drag-handle {
|
||||||
|
padding: 0.75em;
|
||||||
|
}
|
||||||
.qr--set-itemLabel, .qr--action {
|
.qr--set-itemLabel, .qr--action {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue