Rewrite edit blocs and themes
This commit is contained in:
35
app/templates/admin/_mypages.html
Normal file
35
app/templates/admin/_mypages.html
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
<!--
|
||||
<form class="sortblocs" action="/createpage" method="POST" id="mypages">
|
||||
<div id="myblocs" class="myblocs">
|
||||
|
||||
{% for item in mypages %}
|
||||
|
||||
<div class="page" id="page" style="margin-top: 10px;">
|
||||
<button class="btn"> {{ }} - {{ myblocs[item]['type'] }} </button>
|
||||
<input class="input-menu" id="bloc-{{ item }}" name="{{ item }}" value="" style="display:none;">
|
||||
<button class="btn btn-danger" onclick="deleteItem(this)"> x </button>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
-->
|
||||
<script src="/static/vendors/Sortable/Sortable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var elements = document.getElementsByClassName('page');
|
||||
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
|
||||
new Sortable(elements[i], {
|
||||
group: 'shared',
|
||||
animation: 150,
|
||||
invertSwap: true,
|
||||
fallbackOnBody: true,
|
||||
swapThreshold: 0.65,
|
||||
})};
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user