mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 08:52:15 +00:00
Template changes
This commit is contained in:
@@ -11,13 +11,24 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
$('[data-toggle="popover"]').popover();
|
$('[data-toggle="popover"]').popover();
|
||||||
|
|
||||||
$(function () {
|
// This keeps timeago values correct, but uses an insane amount of resources
|
||||||
$('.date').each(function (index, dateElem) {
|
// $(function () {
|
||||||
|
// setInterval(function() {
|
||||||
|
// $('.date').each(function (index, dateElem) {
|
||||||
|
// var $dateElem = $(dateElem);
|
||||||
|
// var formatted = moment($dateElem.attr('data-date')).fromNow();
|
||||||
|
// $dateElem.text(formatted);
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
// }, 10000);
|
||||||
|
|
||||||
|
|
||||||
|
$('.date').each(function (index, dateElem) {
|
||||||
var $dateElem = $(dateElem);
|
var $dateElem = $(dateElem);
|
||||||
var formatted = moment($dateElem.text()).fromNow();
|
var formatted = moment($dateElem.attr('data-date')).fromNow();
|
||||||
$dateElem.text(formatted);
|
$dateElem.text(formatted);
|
||||||
})
|
});
|
||||||
});
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -25,6 +36,8 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
{% comment "table view" %}
|
||||||
|
|
||||||
<h2>Rigboard Activity Stream</h2>
|
<h2>Rigboard Activity Stream</h2>
|
||||||
<br>
|
<br>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
@@ -94,7 +107,7 @@
|
|||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{% endcomment %}
|
||||||
<div>
|
<div>
|
||||||
<h2>Stream View</h2>
|
<h2>Stream View</h2>
|
||||||
{% for version in object_list %}
|
{% for version in object_list %}
|
||||||
@@ -144,7 +157,7 @@
|
|||||||
|
|
||||||
'>{{ key }}</button>
|
'>{{ key }}</button>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
in <button title="title" type="button" class="btn btn-default btn-xs">N{{ version.thisVersion.object_id_int|stringformat:"05d" }}</button> <small>(<span class="date">{{ version.revision.date_created|date:"Y-m-d H:i:s" }}</span>)</small>
|
in <button title="title" type="button" class="btn btn-default btn-xs">N{{ version.thisVersion.object_id_int|stringformat:"05d" }}</button> <small>(<span data-date='{{ version.revision.date_created|date:"Y-m-d H:i:s" }}' class="date">{{ version.revision.date_created|date:"Y-m-d H:i:s" }}</span>)</small>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Reference in New Issue
Block a user