aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpzread <netfirewall@gmail.com>2013-04-10 22:01:41 +0800
committerpzread <netfirewall@gmail.com>2013-04-10 22:01:41 +0800
commitcbbd96b248b6d1d14ec8f4952042b976c8b50ca9 (patch)
treed3760afb7bcb26226e3968358cd8404a279b0fd4
parent12f106053c740962fe9d3f80f2a5f77b52154f44 (diff)
downloadtaiwan-online-judge-cbbd96b248b6d1d14ec8f4952042b976c8b50ca9.tar
taiwan-online-judge-cbbd96b248b6d1d14ec8f4952042b976c8b50ca9.tar.gz
taiwan-online-judge-cbbd96b248b6d1d14ec8f4952042b976c8b50ca9.tar.bz2
taiwan-online-judge-cbbd96b248b6d1d14ec8f4952042b976c8b50ca9.tar.lz
taiwan-online-judge-cbbd96b248b6d1d14ec8f4952042b976c8b50ca9.tar.xz
taiwan-online-judge-cbbd96b248b6d1d14ec8f4952042b976c8b50ca9.tar.zst
taiwan-online-judge-cbbd96b248b6d1d14ec8f4952042b976c8b50ca9.zip
Improve submit list result filter
-rwxr-xr-xtoj/index.html14
-rwxr-xr-xtoj/jcs/common.js10
-rwxr-xr-xtoj/jcs/stat.css9
-rwxr-xr-xtoj/jcs/stat.js30
-rwxr-xr-xtoj/jcs/user.css14
-rwxr-xr-xtoj/jcs/user.js4
6 files changed, 72 insertions, 9 deletions
diff --git a/toj/index.html b/toj/index.html
index d158e40..11a7a97 100755
--- a/toj/index.html
+++ b/toj/index.html
@@ -176,7 +176,18 @@ input,select{
</tr>
<tr class="item result">
<td class="key">Result</td>
- <td class="value">None</td>
+ <td class="value">
+ <select>
+ <option value=null>None</option>
+ <option value=0>AC</option>
+ <option value=1>WA</option>
+ <option value=2>TLE</option>
+ <option value=3>MLE</option>
+ <option value=4>RF</option>
+ <option value=5>RE</option>
+ <option value=6>CE</option>
+ </select>
+ </td>
</tr>
</table>
</div>
@@ -199,6 +210,7 @@ input,select{
<div class="user_page">
<div class="com_pbox main_pbox">
<div class="info_box">
+ <div class="name"></div>
<img class="avatar"></img>
<div class="aboutme"></div>
</div>
diff --git a/toj/jcs/common.js b/toj/jcs/common.js
index 3cecce7..c55eaa7 100755
--- a/toj/jcs/common.js
+++ b/toj/jcs/common.js
@@ -160,6 +160,7 @@ var com = new function(){
var j;
var ret;
var len;
+ var stop_flag;
var url_old;
var url_new;
@@ -232,6 +233,7 @@ var com = new function(){
}
is_mbox_curr = check_mbox_url(that.url_curr);
+ stop_flag = false;
if(that.url_prev == null || (is_mbox_prev == false && is_mbox_curr == true)){
i = 0;
node_curr = that.vus_root;
@@ -279,7 +281,11 @@ var com = new function(){
break;
}
url_upart.push(url_dpart.shift());
- node_curr.url_chg('same',url_upart,url_dpart);
+ ret = node_curr.url_chg('same',url_upart,url_dpart);
+ if(ret == 'stop'){
+ stop_flag = true;
+ break;
+ }
i++;
}
}
@@ -287,7 +293,7 @@ var com = new function(){
if(that.url_prev != null && is_mbox_prev == false && is_mbox_curr == false){
index.page_scroll_reset();
}
- if(that.url_prev == null || that.pbox_exist == false || !(is_mbox_prev == true && is_mbox_curr == false)){
+ if(stop_flag == false && (that.url_prev == null || that.pbox_exist == false || !(is_mbox_prev == true && is_mbox_curr == false))){
_chg_in(url_cpart,i,node_curr,url_upart,url_dpart);
}
diff --git a/toj/jcs/stat.css b/toj/jcs/stat.css
index 6d4d992..3293a98 100755
--- a/toj/jcs/stat.css
+++ b/toj/jcs/stat.css
@@ -45,8 +45,13 @@ div.stat_page > div.sub_pbox > table.sublist th,div.stat_page > div.sub_pbox > t
div.stat_page > div.sub_pbox > table.sublist th.nickname,div.stat_page > div.sub_pbox > table.sublist td.nickname{
width:auto;
}
-div.stat_page > div.sub_pbox > table.sublist th.time,div.stat_page > div.sub_pbox > table.sublist td.time{
- width:237px;
+div.stat_page > div.sub_pbox > table.sublist th.time{
+ width:158px;
+}
+div.stat_page > div.sub_pbox > table.sublist td.time{
+ width:158px;
+ color:#BDC0BA;
+ font-size:12px;
}
div.stat_page > div.sub_pbox > table.sublist th.lang,div.stat_page > div.sub_pbox > table.sublist td.lang{
width:76px;
diff --git a/toj/jcs/stat.js b/toj/jcs/stat.js
index 44d1981..046c27f 100755
--- a/toj/jcs/stat.js
+++ b/toj/jcs/stat.js
@@ -358,6 +358,19 @@ var class_stat_sub_pbox = function(pbox_name){
);
}
};
+ var filter_getparam = function(){
+ var ret;
+
+ ret = '';
+ if(filter.uid != null){
+ ret += 'uid:' + filter.uid;
+ }
+ if(filter.result != null){
+ ret += 'result:' + filter.result;
+ }
+
+ return ret;
+ };
that.node = new vus.node(pbox_name);
@@ -369,7 +382,8 @@ var class_stat_sub_pbox = function(pbox_name){
var _clear = function(){
$(window).off('scorll');
- j_filter.find('td.value').text('None');
+ j_filter.find('tr.uid > td.value').text('None');
+ j_filter.find('tr.result select').val(null);
j_table.find('tr.item').remove();
if(j_ajax != null){
@@ -415,7 +429,7 @@ var class_stat_sub_pbox = function(pbox_name){
j_filter.find('tr.uid > td.value').text(filter.uid);
}
if(filter.result != null){
- j_filter.find('tr.result > td.value').text(filter.result);
+ j_filter.find('tr.result select').val(filter.result);
}
sub_update(1);
@@ -428,6 +442,18 @@ var class_stat_sub_pbox = function(pbox_name){
return 'stop';
};
+ j_pbox.find('div.subset > table.filter tr.result select').on('change',function(e){
+ var param;
+
+ if((filter.result = $(this).val()) == 'null'){
+ filter.result = null;
+ }
+ if((param = filter_getparam()) != ''){
+ com.url_push('/toj/stat/sub/' + param + '/');
+ }else{
+ com.url_push('/toj/stat/sub/');
+ }
+ });
j_pbox.find('div.subset > table.filter button.clear').on('click',function(e){
com.url_push('/toj/stat/sub/');
});
diff --git a/toj/jcs/user.css b/toj/jcs/user.css
index 0bd7e69..37dd3f7 100755
--- a/toj/jcs/user.css
+++ b/toj/jcs/user.css
@@ -3,14 +3,23 @@ div.user_page > div.main_pbox > div.info_box{
padding:32px 0px 32px 0px;
float:left;
}
-div.user_page > div.main_pbox > div.info_box > div.aboutme{
- padding:6px 0px 6px 0px;
+div.user_page > div.main_pbox > div.info_box > div.name{
+ width:100%;
+ height:32px;
+ padding:0px 0px 6px 0px;
+ font-weight:bold;
+ line-height:32px;
word-break:break-all;
}
div.user_page > div.main_pbox > div.info_box > img.avatar{
width:100%;
display:block;
}
+div.user_page > div.main_pbox > div.info_box > div.aboutme{
+ width:100%;
+ padding:6px 0px 6px 0px;
+ word-break:break-all;
+}
div.user_page > div.main_pbox > div.data_box{
width:978px;
margin:0px 0px 0px 6px;
@@ -71,6 +80,7 @@ div.user_page > div.mgsq_pbox div.item > div.info{
div.user_page > div.mgsq_pbox div.item > div.info > span.time{
width:237px;
height:32px;
+ color:#BDC0BA;
font-size:12px;
line-height:32px;
float:right;
diff --git a/toj/jcs/user.js b/toj/jcs/user.js
index b20bdf0..1a45a32 100755
--- a/toj/jcs/user.js
+++ b/toj/jcs/user.js
@@ -270,6 +270,7 @@ var class_user_main_pbox = function(){
com.url_update('/toj/none/');
}else{
reto = JSON.parse(res);
+ j_pbox.find('div.info_box > div.name').text(reto.nickname + ' (' + reto.username + ')');
if(reto.avatar == ''){
j_pbox.find('div.info_box > img.avatar').attr('src','http://i.imgur.com/ykkQD.png');
}else{
@@ -282,6 +283,9 @@ var class_user_main_pbox = function(){
}else if(direct == 'out'){
index.tab_ll('main');
that.fadeout(j_pbox);
+
+ j_pbox.find('div.info_box > div.name').text('');
+ j_pbox.find('div.info_box > img.avatar').attr('src','');
}
};