mirror of https://github.com/interlegis/sapl.git
2 changed files with 38 additions and 0 deletions
@ -0,0 +1,36 @@ |
|||
{% extends "crud/list_tabaux.html" %} |
|||
{% load i18n %} |
|||
{% load common_tags %} |
|||
|
|||
{% block extra_js %} |
|||
|
|||
<script type="text/javascript"> |
|||
|
|||
$('tbody').sortable({ |
|||
start: function(event, ui) { |
|||
ui.item.startPos = ui.item.index(); |
|||
}, |
|||
stop: function(event, ui) { |
|||
var pos_ini = ui.item.startPos; |
|||
var pos_fim = ui.item.index(); |
|||
$.ajax({ |
|||
data: {pos_ini: pos_ini, |
|||
pos_fim: pos_fim, |
|||
pk_sessao: pk_sessao, |
|||
pk_list, |
|||
materia: 'expediente'}, |
|||
type: 'PATCH', |
|||
url: "{% url 'sapl.sessao:mudar_ordem_materia_sessao' %}", |
|||
}); |
|||
|
|||
setTimeout(function(){ window.location.reload(true) }, 500); |
|||
} |
|||
}); |
|||
/*$(window).on('beforeunload', function () { |
|||
$('tbody').sortable('disable'); |
|||
$("input[type=submit], input[type=button]").prop("disabled", "disabled"); |
|||
});*/ |
|||
|
|||
</script> |
|||
|
|||
{% endblock %} |
|||
Loading…
Reference in new issue