Closed GoogleCodeExporter closed 8 years ago
Original comment by glope...@gmail.com
on 15 Feb 2010 at 3:05
After deleting a widget on a column, sortable and draggable objects which were
link
to that column are not connected anymore. I think that something happens due to
the
update event of the UpdatePanel, but I don't understand what. Anyway... I found
a
solution, but I don't know if it's the right way or just a patch. If someone
have a
better answer... :)
Because of the lost of the connexion between the concerned column and the
others
objects, I had to set again connectWith and connectToSortable properties.
In WidgetInstanceZone.ascx.cs :
private void Widget_Deleted(WidgetInstance wi, IWidgetHost host)
{
if (host is Control)
this.WidgetHolderPanel.Controls.Remove(host as Control);
this.RefreshZoneUpdatePanel();
ScriptManager.RegisterStartupScript(
this.WidgetHolderPanelTrigger,
this.WidgetHolderPanelTrigger.GetType(),
this.ClientID + "_InitConnectProperties" + DateTime.Now.Ticks.ToString(),
"jQuery(document).ready(function() {{ refreshConnectWith(); }});",
true);
}
and the JavaScript function :
function refreshConnectWith() {
$('.new_widget').draggable('option', 'connectToSortable', '.widget_zone');
$('.widget_zone').sortable('option', 'connectWith', '.widget_zone');
}
With that, I can drop widgets from sortable columns or the widget list into a
column
where a widget was previously deleted.
Original comment by nourdine...@gmail.com
on 16 Feb 2010 at 8:52
Fixed in v2.5.2
Original comment by omaralzabir@gmail.com
on 18 Apr 2010 at 10:48
Original issue reported on code.google.com by
nourdine...@gmail.com
on 11 Feb 2010 at 4:29