]> iEval git - plack-app-gruntmaster.git/commitdiff
Mark everything that requires javascript with class reqjs
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Feb 2015 10:48:02 +0000 (12:48 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Feb 2015 10:48:02 +0000 (12:48 +0200)
css/custom.css
js/90-reqjs.js [new file with mode: 0644]
js/90-themes.js
js/90-tracker.js
js/95-login.js
tmpl/ct_entry.en
tmpl/pb_entry.en
tmpl/skel.en
tmpl/us_entry.en

index f784c4e0414c41deae6f116a9bdb07a1e4b5da75..f9ccad3dc93d90b49bc40d248c98972e987ac3f5 100644 (file)
@@ -91,4 +91,8 @@ ul.inline li:last-child:after {
 #ctcountdown {
        text-align: center;
        font-size: 200%;
+}
+
+.reqjs {
+       display: none !important;
 }
\ No newline at end of file
diff --git a/js/90-reqjs.js b/js/90-reqjs.js
new file mode 100644 (file)
index 0000000..df21b15
--- /dev/null
@@ -0,0 +1,7 @@
+(function(){
+       'use strict';
+
+       $( document ).ready(function() {
+               $('.reqjs').removeClass('reqjs');
+       });
+})();
index 74506c83b98ba7e951d92a5749955c4f1a3d1ec5..5ec968a4552821ba55119ec759b007f5057d0826 100644 (file)
@@ -6,7 +6,6 @@
        }
 
        $( document ).ready(function() {
-               $('#theme-selector').removeClass('hidden');
                $('#theme_slate'   ).on('click', function () { set_style("slate"); });
                $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
                $('#theme_cyborg'  ).on('click', function () { set_style("cyborg"); });
index 3ef0ac171d7ef652f963d702ee292e5af8741e81..2f8271c12ab8295ad7d300e8e5d4c90603b90117 100644 (file)
        }
 
        $( document ).ready(function(){
-               $('#tracker').detach().prependTo($('#sidebar')).removeClass('hidden');
+               $('#tracker').detach().prependTo($('#sidebar'));
                $('#tracker_button').on('click', function() { start_tracking($('#tracker_username').val()) });
                $('#tracker_stop').on('click', stop_tracking);
-               $('#track_user').removeClass('hidden');
                $('#track_user').on('click', function() { stop_tracking(); start_tracking($(this).data('user')) });
 
                if(localStorage.getItem('tracker_username'))
index adbeb1dde858de945f47b0f97d8d08fd7065f623..81e4533f0b3df969599c0724b399108153a955ca 100644 (file)
@@ -2,7 +2,7 @@
        'use strict';
 
        $( document ).ready(function(){
-               $('#login').detach().prependTo($('#sidebar')).removeClass('hidden');
+               $('#login').detach().prependTo($('#sidebar'));
 
                document.cookie = "cookietest=1";
                var cookie = document.cookie.indexOf("cookietest=") != -1;
index c30a5037d3ec65dd3585c0ca45cd8fb5350845d9..c18fba22885f54443b2cbc1df6fd78284165fc6b 100644 (file)
@@ -3,7 +3,7 @@
 <dt>Contest stop time</dt>  <dd id="stop">stop</dd>
 </dl>
 
-<div id="ctcountdown">
+<div id="ctcountdown" class="reqjs">
 Contest <span id="status">starts/ends</span> in: <span class="timer" data-stop="...">
 </div>
 <div id="description">description</div>
index 0d7c2a1af01b0f6f0312fa11a028d344e49ba0c2..27985443074c132e60637fc303c56453d6f49955 100644 (file)
@@ -9,8 +9,8 @@
 <dt>Owner</dt> <dd id="owner">owner</dd>
 <dt>Level</dt> <dd id="level">Easy</dd>
 <dt>Time limit (seconds)</dt> <dd smap="timeout">1</dd>
-<dt class="rc">Score</dt> <dd id="score" class="timer" data-start="..." data-stop="..." data-value="100" class="rc">50</dd>
-<dt class="rc">Contest ends in</dt> <dd id="countdown" class="timer" data-stop="..." class="rc">01:30</dd>
+<dt class="rc reqjs">Score</dt> <dd id="score" class="timer reqjs rc" data-start="..." data-stop="..." data-value="100">50</dd>
+<dt class="rc reqjs">Contest ends in</dt> <dd id="countdown" class="timer reqjs rc" data-stop="...">01:30</dd>
 </dl>
 
 <a href="/log/?problem=problem_id" id="job_log">Job log</a><br>
index d7263453570f89927307c7ebd7a760f67345ab93..19f3180712c4ec1d3f116d84d1873763e2f80418 100644 (file)
@@ -16,7 +16,7 @@
 <li id="nav-log"><a href="/log/">Job log</a>
 <li id="nav-us"><a href="/us/">Users</a>
 <li id="nav-account"><a href="/account">Account</a>
-<li id="theme-selector" class="hidden"><a class="dropdown-toggle" data-toggle="dropdown"> Theme <span class="caret"></span></a>
+<li id="theme-selector" class="reqjs"><a class="dropdown-toggle" data-toggle="dropdown"> Theme <span class="caret"></span></a>
 <ul class="dropdown-menu" role="menu">
 <li><a href="#" id="theme_slate">Gunmetal gray</a>
 <li><a href="#" id="theme_cyborg">Black</a>
@@ -35,9 +35,9 @@
 
 <div id="content">Content goes here</div>
 
-<div id="login" class="hidden"><a href="/login">Log in</a></div>
+<div id="login" class="reqjs"><a href="/login">Log in</a></div>
 
-<div id="tracker" class="hidden">
+<div id="tracker" class="reqjs">
 <h3>Track user</h3>
 <div id="tracker_form">
 <div class="form-group">
index 3d56654fa08ee0ea861bebacc4efddd4da199490..7b261eda59dee350e461a6a0d3a75b57712988ad 100644 (file)
@@ -5,7 +5,7 @@
 <dt>Level</dt> <dd smap="level">Level</dd>
 </dl>
 
-<a href="#" id="track_user" data-user="id" class="hidden">Track user</a><br>
+<a href="#" id="track_user" data-user="id" class="reqjs">Track user</a><br>
 <a href="/log/?owner=id" id="log">Job log</a><br>
 <a href="/pb/?owner=id" id="pb">Owned problems</a>
 
This page took 0.035676 seconds and 4 git commands to generate.