mod forum post deletion message with good old modal - WIP
parent
5b3f77e391
commit
999effd2c4
|
@ -204,7 +204,8 @@ object topic {
|
|||
}
|
||||
|
||||
private def deleteDialog(implicit ctx: Context) =
|
||||
dialog(cls := "forum__delete")(
|
||||
div(cls := "forum-delete-modal none")(
|
||||
p("Delete the post"),
|
||||
st.form(method := "dialog", cls := "form3")(
|
||||
st.select(
|
||||
name := "reason",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
@import '../../../common/css/plugin';
|
||||
@import '../../../common/css/component/slist';
|
||||
@import '../../../common/css/component/pagination';
|
||||
@import '../../../common/css/component/modal';
|
||||
@import '../../../common/css/form/form3';
|
||||
@import '../../../common/css/form/cmn-toggle';
|
||||
@import '../../../common/css/form/captcha';
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import * as xhr from 'common/xhr';
|
||||
import modal from 'common/modal';
|
||||
|
||||
lichess.load.then(() => {
|
||||
$('.forum')
|
||||
.on('click', 'a.delete', function (this: HTMLAnchorElement) {
|
||||
console.log(this);
|
||||
$('dialog.forum__delete').each(function (this: HTMLDialogElement) {
|
||||
this.showModal();
|
||||
});
|
||||
const $wrap = modal($('.forum-delete-modal'));
|
||||
$wrap.find('form').attr('action', this.href);
|
||||
// xhr.text(this.href, { method: 'post' });
|
||||
// $(this).closest('.forum-post').hide();
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue