mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add clarification (#669)
This commit is contained in:
1 parent
bc4f5115d2
commit
c8c8063240
14 files changed
+373
-80
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import $ from 'jquery';
|
||||
import { NamedPage } from 'vj/misc/Page';
|
||||
function handleReplyOrBroadcast(ev) {
|
||||
const title = $(ev.currentTarget).data('title');
|
||||
const did = $(ev.currentTarget).data('did');
|
||||
|
||||
$('#reply_or_broadcast .section_title').text(title);
|
||||
$('#reply_or_broadcast [name="did"]').val(did ?? '');
|
||||
const $item = $(`#clarification_${did} .media`);
|
||||
if ($item.length) {
|
||||
$('#reply_or_broadcast .form__item_subject').hide();
|
||||
$('#reply_or_broadcast .clarification-container').empty().append($item.clone());
|
||||
} else {
|
||||
$('#reply_or_broadcast .form__item_subject').show();
|
||||
$('#reply_or_broadcast .clarification-container').empty();
|
||||
}
|
||||
}
|
||||
|
||||
const page = new NamedPage('contest_manage', () => {
|
||||
$(document).on('click', '[name="broadcast"]', handleReplyOrBroadcast);
|
||||
$(document).on('click', '[name="reply"]', handleReplyOrBroadcast);
|
||||
});
|
||||
|
||||
export default page;
|
||||
Reference in new issue
Block a user