From 1824b1d69a4ad48dfede69d2da73322f7aeac762 Mon Sep 17 00:00:00 2001
From: esp
Date: Fri, 21 Aug 2015 21:00:18 +0800
Subject: [PATCH] =?UTF-8?q?[=E5=89=8D=E7=AB=AF]=E6=AF=94=E8=B5=9B=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2(=E5=90=8E=E5=8F=B0)=E7=9A=84?=
=?UTF-8?q?=E8=BF=9B=E4=B8=80=E6=AD=A5=E5=AE=8C=E5=96=84,=E4=B8=8D?=
=?UTF-8?q?=E5=8C=85=E5=90=ABapi?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/js/app/admin/contest/contest_list.js | 27 ++++++-----
template/admin/contest/contest_list.html | 45 ++++++++++++++-----
2 files changed, 50 insertions(+), 22 deletions(-)
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
fun
"}];
+ vm.contestList =[{
+ id: 1, title:"The first contest",
+ created_by: {username:"owen"},
+ description:"this contest is just for
fun
",
+ problemList:[{title:"A+B problem", id:1, testCaseList:[1,2], samples:[1,2]}]
+ }];
vm.totalPage = 1;
vm.previousPage = false;
vm.nextPage = false;
diff --git a/template/admin/contest/contest_list.html b/template/admin/contest/contest_list.html
index 0df7ba3..9fd4874 100644
--- a/template/admin/contest/contest_list.html
+++ b/template/admin/contest/contest_list.html
@@ -52,32 +52,32 @@
请填写比赛描述
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -86,10 +86,31 @@
+
+
+
+ | 编号 |
+ 题目 |
+ 测试数据 |
+ |
+
+
+ | 题目{{ $index+1 }} |
+ {{ el.title }} |
+ {{ el.testCaseList.length }}组 |
+
+ 编辑
+ 删除
+ |
+
+
+