mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
67 lines
1.9 KiB
HTML
67 lines
1.9 KiB
HTML
{% load static %}
|
|
|
|
{% block js %}
|
|
<script src="{% static "js/tooltip.js" %}"></script>
|
|
<script src="{% static "js/popover.js" %}"></script>
|
|
<script src="{% static "js/moment.min.js" %}"></script>
|
|
<script src="{% static "js/moment-twitter.js" %}"></script>
|
|
<script>
|
|
$(function () {
|
|
$('[data-toggle="popover"]').popover().click(function(){
|
|
if($(this).attr('href')){
|
|
window.location.href = $(this).attr('href');
|
|
}
|
|
});
|
|
|
|
// This keeps timeago values correct, but uses an insane amount of resources
|
|
// $(function () {
|
|
// setInterval(function() {
|
|
// $('.date').each(function (index, dateElem) {
|
|
// var $dateElem = $(dateElem);
|
|
// var formatted = moment($dateElem.attr('data-date')).fromNow();
|
|
// $dateElem.text(formatted);
|
|
// })
|
|
// });
|
|
// }, 10000);
|
|
moment().twitter();
|
|
|
|
})
|
|
$(document).ready(function() {
|
|
$(function () {
|
|
$( "#activity" ).hide();
|
|
$( "#activity" ).load( "{% url 'activity_feed' %}", function() {
|
|
$('#activity_loading').slideUp('slow',function(){
|
|
$('#activity').slideDown('slow');
|
|
});
|
|
|
|
$('#activity [data-toggle="popover"]').popover();
|
|
|
|
$('.date').each(function (index, dateElem) {
|
|
var $dateElem = $(dateElem);
|
|
var formatted = moment($dateElem.attr('data-date'),"DD/MM/YYYY HH:mm").twitterLong();
|
|
$dateElem.text(formatted);
|
|
});
|
|
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h4 class="panel-title">Recent Changes</h4>
|
|
</div>
|
|
|
|
<div class="list-group">
|
|
<div id="activity_loading" class="list-group-item loading-animation">
|
|
<div class="circle"></div>
|
|
<div class="circle1"></div>
|
|
</div>
|
|
<div id="activity">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|