diff --git a/static/src/js/app/admin/contest/contest_list.js b/static/src/js/app/admin/contest/contest_list.js index 823179e..ceafce1 100644 --- a/static/src/js/app/admin/contest/contest_list.js +++ b/static/src/js/app/admin/contest/contest_list.js @@ -14,8 +14,9 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "editor", "datetimePicker"] page: 1, totalPage: 1, keyword: "", - editingContestId: 0, - editTitle: "", + editingContestId: 0, + editTitle: "", + editingProblemList: [], getNext: function () { if (!vm.nextPage) return; @@ -38,13 +39,14 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "editor", "datetimePicker"] getPageData(page_index); }, showEditContestArea: function (contestId) { - if (contestId == vm.editingContestId) - vm.editingContestId = 0; - else { - vm.editingContestId = contestId; - vm.editTitle = vm.contestList[contestId-1].title; - editor("#editor").setValue(vm.contestList[contestId-1].description); - } + if (contestId == vm.editingContestId) + vm.editingContestId = 0; + else { + vm.editingContestId = contestId; + vm.editTitle = vm.contestList[contestId-1].title; + editor("#editor").setValue(vm.contestList[contestId-1].description); + vm.editingProblemList = vm.contestList[contestId-1].problemList; + } } }); @@ -74,7 +76,12 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "editor", "datetimePicker"] } }); */ - vm.contestList =[{id: 1, title:"The first contest", created_by: {username:"owen"}, description:"
this contest is just for
this contest is just for