This commit is contained in:
masnn committed 2020-04-08 21:10:24 +08:00
1 parent 777a4bc927
commit 9c45527522
396 files changed
+13772

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { NamedPage } from 'vj/misc/PageLoader';
async function handleCategoryClick(ev) {
const $target = $(ev.currentTarget);
const $txt = $('[name="category"]');
console.log($target);
console.log($txt);
$txt.val(`${$txt.val()}, ${$target.data('category')}`);
}
const page = new NamedPage('problem_settings', async () => {
$(document).on('click', '.category-a', handleCategoryClick);
$(document).on('click', '[name="problem-sidebar__show-category"]', (ev) => {
$(ev.currentTarget).hide();
$('[name="problem-sidebar__categories"]').show();
});
});
export default page;