Correction following jquery upgrade
This commit is contained in:
parent
02ae8008b3
commit
4005d8fb67
@ -37,6 +37,11 @@ div#dico {
|
||||
margin:2px;
|
||||
}
|
||||
|
||||
div#dico ol {
|
||||
margin:5px 0;
|
||||
}
|
||||
|
||||
|
||||
div#dico ul {
|
||||
margin:0;
|
||||
}
|
||||
@ -124,11 +129,8 @@ Référence <input type="text" name="profil" value="<?=$this->reference?>" />
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#dico li").draggable({
|
||||
appendTo: "body",
|
||||
helper: "clone"
|
||||
});
|
||||
$("#entete ol").droppable({
|
||||
$('div#dico li').draggable({ appendTo: "body", helper: "clone" });
|
||||
$('div#entete ol').droppable({
|
||||
activeClass: "ui-state-default",
|
||||
hoverClass: "ui-state-hover",
|
||||
accept: ":not(.ui-sortable-helper)",
|
||||
@ -145,20 +147,19 @@ $(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$("#entete").delegate("a.delete","click", function(e){
|
||||
$('div#entete a.delete').on('click', function(e){
|
||||
e.preventDefault();
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
$("#entete ol").delegate("li" , "hover", function(e) {
|
||||
e.preventDefault();
|
||||
if (e.type === 'mouseenter') {
|
||||
var html = $(this).html();
|
||||
$(this).html(html+'<a href="#" style="float:right;" class="delete">Supprimer</a>');
|
||||
} else {
|
||||
$( this ).find( ".delete" ).remove();
|
||||
$('div#entete').on({
|
||||
mouseenter: function() {
|
||||
$(this).append('<a href="#" class="delete">Supprimer</a>');
|
||||
},
|
||||
mouseleave: function() {
|
||||
$(this).find('a.delete').remove();
|
||||
}
|
||||
});
|
||||
}, 'li');
|
||||
|
||||
$('#save').click(function(e){
|
||||
e.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user