Open GoogleCodeExporter opened 9 years ago
I recently discovered this issue as well and I have not seen anyone post a
solution to it, here is my fix:
private void PushDownWidgetInstancesOnWidgetZone(int toRowId, int widgetZoneId, bool isMovingDown)
{
IEnumerable<WidgetInstance> list = this.widgetInstanceRepository.GetWidgetInstancesByWidgetZoneIdWithWidget(widgetZoneId);
if (isMovingDown)
{
list.Where(wi => wi.OrderNo <= toRowId)
.OrderBy(wi => wi.OrderNo)
.Each(wi =>
{
wi.OrderNo = --wi.OrderNo;
});
}
else
{
int orderNo = toRowId + 1;
list.Where(wi => wi.OrderNo >= toRowId)
.OrderBy(wi => wi.OrderNo)
.Each(wi =>
{
wi.OrderNo = orderNo++;
});
}
this.widgetInstanceRepository.UpdateList(list);
}
Original comment by chue...@gmail.com
on 2 May 2012 at 12:10
Hi, i resolved the issue by setting the value of position to length -1 if the
position value is > 0 in MyFramework.js like following:
-------------
var position = ui.item.parent().children().index(ui.item);
if (position > 0) {
position = position - 1;
}
---------------
hope this can be useful for you.
Original comment by san.tha...@gmail.com
on 19 Jul 2012 at 7:56
Original issue reported on code.google.com by
kaczm...@gmail.com
on 10 Jun 2011 at 12:44