Commit a370d3dd authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos

Fix issues with caching. Correct templates

parent 3169d5b2
{% extends "base.html" %}
{% extends "b3theme/base.html" %}
{% load widget_tweaks %}
{% block title %}Access denied{% endblock %}
{% block content %}
<h3 align="center">Access denied</h3>
<h4 align="center">You do not have sufficient privileges</h4>
{% load i18n %}
{% block sidenav %}{% endblock %}
{% block extraheadbottom %}
<style>
@media (min-width: 768px) {
#page-wrapper {
border-left: none;
margin: 0;
}
}
</style>
{% endblock %}
{% block title %}Access denied{% endblock %}
{% block contentplaceholder %}
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Access denied</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-danger">
<div class="panel-heading">
<i class="fa fa-info-circle"></i> Access denied
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<div class="alert alert-danger">
You do not have sufficient privileges
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% extends "base.html" %}
{% extends "b3theme/base.html" %}
{% load widget_tweaks %}
{% block title %}Page not found{% endblock %}
{% block content %}
<h3 align="center">Page not found</h3>
<h4 align="center">The page that you requested was not found.</h4>
{% load i18n %}
{% block sidenav %}{% endblock %}
{% block extraheadbottom %}
<style>
@media (min-width: 768px) {
#page-wrapper {
border-left: none;
margin: 0;
}
}
</style>
{% endblock %}
{% block title %}Page not found{% endblock %}
{% block contentplaceholder %}
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Page not found</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-danger">
<div class="panel-heading">
<i class="fa fa-info-circle"></i> Page not found
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<div class="alert alert-danger">
The page that you requested was not found.
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
......@@ -188,6 +188,10 @@
$("#langsel").val(lang);
$("#langform").submit();
}
$(document).ready(function() {
$.ajaxSetup({ cache: false });
});
</script>
......
{% extends "base.html" %}
{% extends "b3theme/base.html" %}
{% block sidenav %}{% endblock %}
{% load i18n %}
{% block title %}{{ flatpage.title }}{% endblock %}
{% block breadcrumbs %}
<li class="active"><span class="divider">/</span>
{% trans flatpage.title %}
</li>
{% block extraheadbottom %}
<style>
@media (min-width: 768px) {
#page-wrapper {
border-left: none;
margin: 0;
}
}
</style>
{% endblock %}
{% block extrahead %}
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<style type="text/css">
.headtitle {font-family: "Franklin Gothic Demi", "Franklin Gothic", "ITC Franklin Gothic", Arial, sans-serif; letter-spacing: -1px; }
</style>
<script type="text/javascript" src="{{STATIC_URL}}js/jquery.min.js"></script>
<script type="text/javascript">
{% block pagejsbottom %}
<script type="text/javascript">
function setlang(lang) {
$("#langsel").val(lang);
......@@ -34,15 +30,42 @@
}
</script>
{% endblock %}
{% block extrahead %}
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
{% endblock %}
{% block content %}
<h4 class='muted'>{{ flatpage.title }}</h4>
<hr>
<div class="span9">
{{ flatpage.content|linebreaks }}
</div>
{% block contentplaceholder %}
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">{{ flatpage.title }}</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-lg-8">
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-info fa-fw"></i> {{ flatpage.title }}
</div>
<!-- /.panel-heading -->
<div class="panel-body">
{{ flatpage.content|linebreaks }}
</div>
</div>
</div>
</div>
</div>
{% endblock %}
......@@ -5,10 +5,10 @@
{% if user.is_authenticated %}
<p>{% trans "If you have any questions or need help, contact GRNET Helpdesk at <a href='mailto:helpdesk@grnet.gr'>helpdesk@grnet.gr</a> or 800-11-47638." %}</p>
{% endif %}
<div style="padding-top: 10px;"><a href="https://code.grnet.gr/projects/flowspy">Vesrion: <strong>{{VERSION}}</strong></a> - {% trans "Designed and developed by GRNET NOC" %}
<div style="padding-top: 10px;"><a href="https://code.grnet.gr/projects/flowspy">Version: <strong>{{VERSION}}</strong></a> - {% trans "Designed and developed by GRNET NOC" %}
<a href="//facebook.com/noc.grnet.gr" target="_blank"><img src="{{STATIC_URL}}img/facebook_img.png" alt="GRNET NOC on Facebook" title="GRNET NOC on Facebook"/></a> <a href="//twitter.com/grnetnoc" target="_blank"><img src="{{STATIC_URL}}img/twitter_img.png" alt="GRNET NOC on Twitter" title="GRNET NOC on Twitter"/></a>
</div>
<div class="row"><a href="http://noc.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="/fod/info/{{LANGUAGE_CODE}}/">{% trans "Info" %}</a> | <a href="/fod/tos/{{LANGUAGE_CODE}}/">{% trans "Service Terms" %}</a></div>
<div class="row"><a href="http://noc.grnet.gr">{% trans "GRNET" %} NOC</a> | <a href="/info/{{LANGUAGE_CODE}}/">{% trans "Info" %}</a> | <a href="/tos/{{LANGUAGE_CODE}}/">{% trans "Service Terms" %}</a></div>
<div style="padding-top: 10px;">
</div>
......
{% extends "b3theme/base.html" %}
{% load widget_tweaks %}
{% block sidenav %}{% endblock %}
{% load i18n %}
{% block extraheadbottom %}
<style>
......
......@@ -27,7 +27,9 @@ function newMessage(form) {
var message = form.formToDict();
var disabled = form.find("input[type=submit]");
disabled.disable();
$.postJSON("{% url fetch-new %}", message, function(response) {
var date = new Date();
var timestamp = date.getTime();
$.postJSON("{% url fetch-new %}?="+timestamp, message, function(response) {
updater.showMessage(response);
if (message.id) {
form.parent().remove();
......@@ -44,7 +46,7 @@ function getCookie(name) {
}
jQuery.postJSON = function(url, args, callback) {
$.ajax({url: url, dataType: "json", type: "POST",
$.ajax({url: url, dataType: "json", type: "POST", cache: false,
success: function(response) {
if (callback) callback(response);
}, error: function(response) {
......@@ -80,7 +82,9 @@ var updater = {
errorSleepTime: 500,
cursor: null,
start: function() {
$.ajax({url: "{% url fetch-existing %}", type: "POST", dataType: "json",
var date = new Date();
var timestamp = date.getTime();
$.ajax({url: "{% url fetch-existing %}?="+timestamp, type: "POST", dataType: "json", cache:false,
success: updater.onFetchExisting,
error: updater.onError});
},
......@@ -91,7 +95,9 @@ var updater = {
oTable.fnReloadAjax(refreshUrl);
}
timeout = {{timeout}};
$.ajax({url: "{% url fetch-updates %}", type: "POST", dataType: "json",
var date = new Date();
var timestamp = date.getTime();
$.ajax({url: "{% url fetch-updates %}?="+timestamp, type: "POST", dataType: "json", cache:false,
success: updater.onSuccess,
timeout: timeout,
error: updater.onError});
......
......@@ -28,7 +28,9 @@ function newMessage(form) {
var message = form.formToDict();
var disabled = form.find("input[type=submit]");
disabled.disable();
$.postJSON("{% url fetch-new %}", message, function(response) {
var date = new Date();
var timestamp = date.getTime();
$.postJSON("{% url fetch-new %}?="+timestamp, message, function(response) {
updater.showMessage(response);
if (message.id) {
form.parent().remove();
......@@ -45,7 +47,7 @@ function getCookie(name) {
}
jQuery.postJSON = function(url, args, callback) {
$.ajax({url: url, dataType: "json", type: "POST",
$.ajax({url: url, dataType: "json", type: "POST", cache: false,
success: function(response) {
if (callback) callback(response);
}, error: function(response) {
......@@ -81,7 +83,9 @@ var updater = {
errorSleepTime: 500,
cursor: null,
start: function() {
$.ajax({url: "{% url fetch-existing %}", type: "POST", dataType: "json",
var date = new Date();
var timestamp = date.getTime();
$.ajax({url: "{% url fetch-existing %}?="+timestamp, type: "POST", dataType: "json", cache: false,
success: updater.onFetchExisting,
error: updater.onError});
},
......@@ -92,7 +96,10 @@ var updater = {
window.setTimeout('location.reload()', 500);
}
timeout = {{timeout}};
$.ajax({url: "{% url fetch-updates %}", type: "POST", dataType: "json",
var date = new Date();
var timestamp = date.getTime();
$.ajax({url: "{% url fetch-updates %}?="+timestamp, type: "POST", dataType: "json", cache: false,
success: updater.onSuccess,
timeout: timeout,
error: updater.onError});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment