Skip to content
Snippets Groups Projects
Commit f39d205a authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch...

Merge branch 'hotline#132724_magasin_de_theme_ajout_d_une_variable_anti_drag_and_drop' into 'hotline'

hotline #132724 upgrade config accueil drag and drop

See merge request !3992
parents 061a7043 39659f88
Branches
Tags
1 merge request!3992hotline #132724 upgrade config accueil drag and drop
Pipeline #13326 passed with stage
in 46 minutes and 34 seconds
- ticket #132724 : Administration : Amélioration visuel de la configuration en glisser déposer des pages.
\ No newline at end of file
......@@ -146,4 +146,22 @@
font-size: 16px !important;
padding: 1px;
margin: 1px;
}
\ No newline at end of file
}
li.ui-sortable-helper {
width: 150px !important;
white-space: nowrap;
}
ul.source_list {
min-height: 300px;
}
.profile_composition .container_list li.new_widget {
background-color: var(--success-background);
}
.profile_composition .container_list.deleted_widget {
border:1px solid var(--error-background);
}
......@@ -56,7 +56,7 @@
remove: function(event, ui) {
if("true" == options.sticky_available)
$(lists[1]).html(fixed_available);
$(lists[1]).html(fixed_available);
widget.find('input').change();
}
});
......@@ -114,7 +114,6 @@
fixed.push($(element).html());
});
containers.each(function() {
var values = "";
$(this).find('li').each(function() {
......@@ -124,8 +123,14 @@
});
lists.sortable({
distance: 10,
tolerance: 'pointer',
items: '> li',
connectWith: 'ul',
placeholder: 'placeholder',
receive: function(event, ui) {
$(ui.item).addClass('new_widget');
},
update: function(event, ui) {
var values = "";
$(event.target).closest('div').find('ul.container_list li').each(function() {
......@@ -135,6 +140,7 @@
$(event.target).closest('div').find('input').change();
},
remove: function(event, ui) {
$(event.target).addClass('deleted_widget');
fixed.forEach(function(html, i) {
$(sources[i]).html(html);
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment