partial fix to widget panel bug (still error on trashing --IE8)
This commit is contained in:
parent
fb74b70049
commit
8723504185
@ -45,8 +45,9 @@ function wplaceholder() {
|
|||||||
$(this).animate({'background-color' : '#fff'})
|
$(this).animate({'background-color' : '#fff'})
|
||||||
},
|
},
|
||||||
'drop' : function(event, ui) {
|
'drop' : function(event, ui) {
|
||||||
parent=ui.draggable.parent();
|
var parent=ui.draggable.parent();
|
||||||
where=$(this).parent().attr('id').split('-')[1];
|
var where=$(this).parent().attr('id').split('-')[1];
|
||||||
|
var replace = null;
|
||||||
if(ui.draggable.hasClass('widget-instance')) {
|
if(ui.draggable.hasClass('widget-instance')) {
|
||||||
replace=ui.draggable;
|
replace=ui.draggable;
|
||||||
} else {
|
} else {
|
||||||
@ -72,8 +73,9 @@ function winstancedrop() {
|
|||||||
$(this).animate({'background-color' : '#fff'})
|
$(this).animate({'background-color' : '#fff'})
|
||||||
},
|
},
|
||||||
'drop' : function(event, ui) {
|
'drop' : function(event, ui) {
|
||||||
parent=ui.draggable.parent();
|
var parent=ui.draggable.parent();
|
||||||
where=$(this).parent().attr('id').split('-')[1];
|
var where=$(this).parent().attr('id').split('-')[1];
|
||||||
|
var replace = null;
|
||||||
if(ui.draggable.hasClass('widget-instance')) {
|
if(ui.draggable.hasClass('widget-instance')) {
|
||||||
replace=ui.draggable;
|
replace=ui.draggable;
|
||||||
} else {
|
} else {
|
||||||
@ -100,8 +102,9 @@ function wtrash() {
|
|||||||
$(this).animate({'background-color' : '#a22'})
|
$(this).animate({'background-color' : '#a22'})
|
||||||
},
|
},
|
||||||
'drop' : function(event, ui) {
|
'drop' : function(event, ui) {
|
||||||
parent=ui.draggable.parent();
|
var parent=ui.draggable.parent();
|
||||||
$(ui.draggable).fadeOut().remove();;
|
$(ui.draggable).fadeOut().remove(); // error in IE8
|
||||||
|
// $(ui.draggable).fadeOut(); // will fade, will remove, graphic glitches
|
||||||
$('.widget-dragger').remove();
|
$('.widget-dragger').remove();
|
||||||
if(parent.children().length<1) {
|
if(parent.children().length<1) {
|
||||||
parent.append('<li class="widget-placeholder">Drop here</li>');
|
parent.append('<li class="widget-placeholder">Drop here</li>');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user