File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -914,6 +914,10 @@ var DataStore = new function () {
914914 self . update_network_status ( 0 ) ;
915915 } ) ;
916916
917+ self . team_create . add ( function ( ) {
918+ $ ( document . body ) . removeClass ( "teams-hidden" ) ;
919+ } ) ;
920+
917921
918922 ////// Sorted contest list
919923
Original file line number Diff line number Diff line change @@ -265,6 +265,10 @@ abbr {
265265 outline : 0 ;
266266}
267267
268+ .teams-hidden # TeamSearch_input {
269+ display : none;
270+ }
271+
268272# TeamSearch_bg {
269273 display : none;
270274 position : absolute;
@@ -404,6 +408,10 @@ abbr {
404408 width : calc (2em + 20px );
405409}
406410
411+ .teams-hidden # Scoreboard .team {
412+ display : none;
413+ }
414+
407415# Scoreboard_head tr {
408416 height : 2.5em ;
409417}
Original file line number Diff line number Diff line change 2929 < script src ="Ranking.js "> </ script >
3030 < title > Ranking</ title >
3131 </ head >
32- < body >
32+ < body class =" teams-hidden " >
3333 < div id ="OuterFrame ">
3434 < div id ="LogoPanel ">
3535 < img src ="logo " alt ="Logo " />
Original file line number Diff line number Diff line change @@ -176,8 +176,12 @@ var Scoreboard = new function () {
176176<col class=\"score contest\" data-contest=\"" + c_id + "\" data-sort_key=\"c_" + c_id + "\"/> <col/><col/><col/>" ;
177177 }
178178
179- result += " \
179+ self . show_global_score = contests . length > 1 ;
180+
181+ if ( self . show_global_score ) {
182+ result += " \
180183<col class=\"score global\" data-sort_key=\"global\"/> <col/><col/><col/><col/>" ;
184+ }
181185
182186 return result ;
183187 } ;
@@ -212,9 +216,11 @@ var Scoreboard = new function () {
212216 <th colspan=\"4\" class=\"score contest\" data-contest=\"" + c_id + "\" data-sort_key=\"c_" + c_id + "\"><abbr title=\"" + escapeHTML ( contest [ "name" ] ) + "\">" + escapeHTML ( contest [ "name" ] ) + "</abbr></th>" ;
213217 }
214218
215- result += " \
219+ if ( self . show_global_score ) {
220+ result += " \
216221 <th colspan=\"5\" class=\"score global\" data-sort_key=\"global\">Global</th> \
217222</tr>" ;
223+ }
218224
219225 return result ;
220226 } ;
@@ -269,10 +275,12 @@ var Scoreboard = new function () {
269275 <td colspan=\"4\" class=\"score contest " + score_class + "\" data-contest=\"" + c_id + "\" data-sort_key=\"c_" + c_id + "\">" + round_to_str ( user [ "c_" + c_id ] , contest [ "score_precision" ] ) + "</td>" ;
270276 }
271277
272- var score_class = self . get_score_class ( user [ "global" ] , DataStore . global_max_score ) ;
273- result += " \
278+ if ( self . show_global_score ) {
279+ var score_class = self . get_score_class ( user [ "global" ] , DataStore . global_max_score ) ;
280+ result += " \
274281 <td colspan=\"5\" class=\"score global " + score_class + "\" data-sort_key=\"global\">" + round_to_str ( user [ "global" ] , DataStore . global_score_precision ) + "</td> \
275282</tr>" ;
283+ }
276284
277285 return result ;
278286 } ;
You can’t perform that action at this time.
0 commit comments