Go back to trunk intercooler, use body as ic-history-elt

This commit is contained in:
Jason McBrayer 2018-09-15 20:00:15 -04:00
parent 9605c04a5f
commit 203bd5070c
3 changed files with 7 additions and 11 deletions

View File

@ -4,7 +4,7 @@
define(["jquery"], function (a0) { define(["jquery"], function (a0) {
return (root['Intercooler'] = factory(a0)); return (root['Intercooler'] = factory(a0));
}); });
} else if (typeof module === 'object' && module.exports) { } else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but // Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports, // only CommonJS-like environments that support module.exports,
// like Node. // like Node.
@ -497,6 +497,7 @@ var Intercooler = Intercooler || (function() {
if (xhr.getResponseHeader("X-IC-PushURL") || closestAttrValue(elt, 'ic-push-url') == "true") { if (xhr.getResponseHeader("X-IC-PushURL") || closestAttrValue(elt, 'ic-push-url') == "true") {
try { try {
requestCleanup(indicator, elt); // clean up before snap-shotting HTML
var newUrl = xhr.getResponseHeader("X-IC-PushURL") || closestAttrValue(elt, 'ic-src'); var newUrl = xhr.getResponseHeader("X-IC-PushURL") || closestAttrValue(elt, 'ic-src');
if(_history) { if(_history) {
_history.snapshotForHistory(newUrl); _history.snapshotForHistory(newUrl);

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@
<link rel="stylesheet" <link rel="stylesheet"
href="{% static 'css/fork-awesome.min.css' %}"> href="{% static 'css/fork-awesome.min.css' %}">
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/intercooler.min.js' %}"></script> <script type="text/javascript" src="{% static 'js/intercooler.js' %}"></script>
<script type="text/javascript" src="{% static 'js/brutaldon-enhancements.js' %}"></script> <script type="text/javascript" src="{% static 'js/brutaldon-enhancements.js' %}"></script>
{% block page_scripts %} {% block page_scripts %}
{% endblock %} {% endblock %}
@ -39,10 +39,10 @@
<link rel="icon" href="{% static "images/brutaldon.png" %}" type="image/png"> <link rel="icon" href="{% static "images/brutaldon.png" %}" type="image/png">
{% endif %} {% endif %}
</head> </head>
<body class="has-navbar-fixed-top" <body class="has-navbar-fixed-top" ic-history-elt="true"
ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}' ic-global-include='{"csrfmiddlewaretoken": "{{ csrf_token }}"}'>
ic-history-elt="true"> <div id="page-load-indicator">&nbsp</div>
{% block navbar %} {% block navbar %}
<nav class="navbar is-fixed-top" role="navigation" <nav class="navbar is-fixed-top" role="navigation"
aria-label="main navigation"> aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
@ -158,7 +158,6 @@
{% endif %} {% endif %}
</nav> </nav>
{% endblock %} {% endblock %}
<div id="page-load-indicator">&nbsp</div>
<section id="main" class="section"> <section id="main" class="section">
<div class="container"> <div class="container">
{% block content %} {% block content %}
@ -205,6 +204,5 @@
{% endblock %} {% endblock %}
{% endif %} {% endif %}
</body> </body>
</html> </html>