]> iEval git - plack-app-gruntmaster.git/commitdiff
Hide tracker when not tracking
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Feb 2015 14:33:20 +0000 (16:33 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 28 Feb 2015 14:33:20 +0000 (16:33 +0200)
js/90-tracker.js
tmpl/skel.en

index 00312bdc7012da0c8cc6a9853eca847b41427085..50ba7d48baeea680432a49940d5419a8a20e6898 100644 (file)
@@ -75,7 +75,6 @@
                localStorage.setItem('tracker_username', user);
                $('#tracker_userlink').attr('href', '/us/' + user).html(user);
                $('#tracker_tracking').removeClass('hidden');
-               $('#tracker_form').addClass('hidden');
                update_tracker();
                var lastfetch = localStorage.getItem('tracker_lastfetch');
                if(Date.now() - lastfetch > 60 * 10 * 1000)
                localStorage.removeItem('tracker_data');
                localStorage.removeItem('tracker_lastfetch');
                $('#tracker_tracking').addClass('hidden');
-               $('#tracker_form').removeClass('hidden');
        }
 
        $( document ).ready(function(){
                $('#tracker').detach().prependTo($('#sidebar'));
-               $('#tracker_button').on('click', function() { start_tracking($('#tracker_username').val()) });
                $('#tracker_stop').on('click', stop_tracking);
                $('#track_user').on('click', function() { stop_tracking(); start_tracking($(this).data('user')) });
                $('#submitform').on('submit', function() { localStorage.removeItem('tracker_lastfetch') });
index e6ac878c374a8fd988fd448e46bd79d125e7c641..8987da72d028c23cbfda68a61793603bd1b649f5 100644 (file)
@@ -42,16 +42,8 @@ Themes:
 </div>
 
 <div id="tracker" class="reqjs">
-<h3>Track user</h3>
-<div id="tracker_form">
-<div class="form-group">
-<label for="tracker_username">Username</label>
-<input type="text" id="tracker_username" class="form-control">
-</div>
-<button id="tracker_button" class="btn btn-default">Start tracking</button>
-</div>
-
 <div id="tracker_tracking" class="hidden">
+<br>
 Tracking <a href="#" id="tracker_userlink"></a>.<br>
 <a href="#" id="tracker_stop">Stop tracking</a><br>
 <a href="#" id="tracker_log">Job log</a>
This page took 0.034116 seconds and 4 git commands to generate.