manager: add handles to drag/drop cells (#10933)

This commit is contained in:
Frédéric Péters 2016-05-15 11:35:32 +02:00
parent ba606a1fe8
commit f98582c5a4
2 changed files with 7 additions and 2 deletions

View File

@ -107,10 +107,14 @@ $(function() {
});
init_pages_list();
$('.cell-list').sortable({
handle: '.handle',
connectWith: '.cell-list',
handle: 'h3',
helper: 'clone',
placeholder: 'empty-cell',
start: function(event, ui) {
ui.helper.removeClass('toggled').addClass('untoggled').css('height',
ui.helper.find('h3').outerHeight());
},
update: function(event, ui) {
var new_order = Object();
$('.cell').each(function(i, x) {

View File

@ -79,7 +79,8 @@
<div class="cell-list">
{% for cell in placeholder.cells %}
<div class="cell" data-cell-reference="{{ cell.get_reference }}">
<h3>{{ cell.get_label }}
<h3><span class="handle"></span>
{{ cell.get_label }}
{% if cell.slug %} [{{cell.slug}}] {% endif %}
<span class="additional-label">
<i>{{cell.get_additional_label|default_if_none:""}}</i></span>