fix studio-ui onupdate chutier, element were not draggable anymore
This commit is contained in:
@@ -266,6 +266,8 @@
|
||||
function onLoadedChutier($studioChutier, data){
|
||||
$studioChutier.replaceWith(data.rendered);
|
||||
initAjaxChutierLinks();
|
||||
// set chutier element draggable again
|
||||
setChutierDraggable();
|
||||
$('body').trigger({
|
||||
'type':'on-studio-chutier-updated'
|
||||
});
|
||||
@@ -291,8 +293,8 @@
|
||||
}else{
|
||||
// add real dom square element to handle sorting
|
||||
$field_documents = $('.composition_ui .composer .composition .field--name-documents'); $('.field__item', $field_documents).each(function(i){
|
||||
$(this).prepend($('<span>').addClass('handler'));
|
||||
});
|
||||
$(this).prepend($('<span>').addClass('handler'));
|
||||
});
|
||||
}
|
||||
|
||||
// create remove dropzone
|
||||
@@ -331,6 +333,10 @@
|
||||
});
|
||||
|
||||
// set chutier element draggable
|
||||
setChutierDraggable();
|
||||
|
||||
};
|
||||
function setChutierDraggable(){
|
||||
$('.chutier_ui .item-list li>div').draggable({
|
||||
containment:$('#studio-ui'),
|
||||
scroll:false,
|
||||
@@ -357,8 +363,7 @@
|
||||
revertDuration:0,
|
||||
connectToSortable:$('.composition_ui .composer .composition .field--name-documents'),
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
function onOrderChanged(e, ui){
|
||||
console.log('onOrderChanged : e', e);
|
||||
var cid = $(e.target).parents('.composition').attr('cid');
|
||||
|
||||
Reference in New Issue
Block a user