Merge branch 'feature/menustate' into develop
This commit is contained in:
1
rowers/templates/.#menuscript.html
Normal file
1
rowers/templates/.#menuscript.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
E408191@CZ27LT9RCGN72.14924:1540272798
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "newbase.html" %}
|
{% extends "newbase.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
xo
|
|
||||||
{% block title %}Rowsandall Workouts List{% endblock %}
|
{% block title %}Rowsandall Workouts List{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
|
|||||||
@@ -93,3 +93,5 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
@@ -22,3 +22,5 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul><!-- cd-accordion-menu -->
|
</ul><!-- cd-accordion-menu -->
|
||||||
|
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
@@ -160,3 +160,5 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
@@ -53,3 +53,5 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
@@ -54,3 +54,5 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul> <!-- cd-accordion-menu -->
|
</ul> <!-- cd-accordion-menu -->
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
@@ -92,3 +92,4 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
@@ -300,3 +300,5 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul><!-- cd-accordion-menu -->
|
</ul><!-- cd-accordion-menu -->
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
@@ -62,3 +62,5 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'menuscript.html' %}
|
||||||
|
|||||||
23
rowers/templates/menuscript.html
Normal file
23
rowers/templates/menuscript.html
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<script
|
||||||
|
type='text/javascript'
|
||||||
|
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".has-children").each(
|
||||||
|
function(i, obj) {
|
||||||
|
var theid = $(this).attr('id');
|
||||||
|
var state = localStorage.getItem(theid);
|
||||||
|
if (state !== null) {
|
||||||
|
$(this).find('input:first').prop("checked",state);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$(function() {
|
||||||
|
$(".has-children").click( function() {
|
||||||
|
var theid = $(this).attr('id');
|
||||||
|
var state = $(this).find('input:first').is(':checked');
|
||||||
|
localStorage.setItem(theid,state);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -41,3 +41,5 @@
|
|||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="" href="{% url 'logout' %}?next=/login" title="Sign Out">
|
<a class="" href="{% url 'logout' %}?next=/login" title="Sign Out" id="id-logout">
|
||||||
<i class="fas fa-sign-out-alt "></i>
|
<i class="fas fa-sign-out-alt "></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -380,3 +380,16 @@
|
|||||||
{% block body_bottom %}{% endblock %}
|
{% block body_bottom %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
<script
|
||||||
|
type='text/javascript'
|
||||||
|
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#id-logout").click( function() {
|
||||||
|
localStorage.clear();
|
||||||
|
console.log('cleared storage');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user