Skip to content

Commit

Permalink
Ensure start/end dates are updated real-time in the HTML output.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Jan 15, 2017
1 parent db50111 commit adf98a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ GoAccess.OverallStats = {
var idx = 0, row = null;

$('.last-updated').innerHTML = data.date_time;
$$('span.from', function (item) {
item.innerHTML = data.start_date
});
$$('span.to', function (item) {
item.innerHTML = data.end_date
});
// Iterate over general data object
for (var x in data) {
if (!data.hasOwnProperty(x) || !ui.items.hasOwnProperty(x))
Expand Down
4 changes: 2 additions & 2 deletions resources/tpls.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- TPL General -->
<script id="tpl-general" type="text/template">
<h3 class="hidden-xs">{{head}}</h3>
<h5 class="visible-xs hidden-sm hidden-md hidden-lg">{{head}}</h5>
<h3 class="hidden-xs">{{head}}<span class="pull-right"><span class="from"></span> &#8212; <span class="to"></span></span></h3>
<h5 class="visible-xs hidden-sm hidden-md hidden-lg">{{head}}<span class="from"></span> &#8212; <span class="to"></span></span></h5>
<div class="wrap-general-items"></div>
</script>

Expand Down

0 comments on commit adf98a8

Please sign in to comment.