<%
@ Control Language ="C#" AutoEventWireup ="true" CodeFile ="TestUserControl.ascx.cs" Inherits ="widget_TestUserControl %><
li class ="Testmod1 NotMovable " id ="mod1 ">$(document).ready(
function () {var sItems = $('.column > li:not(.static-mod)').not('.NotMovable'); var currentPos; var currentCol; //$(sItems).css({cursor: 'move' });
$(
".column").sortable({connectWith:
'.column',handle:
'.TestMod1-head',placeholder:
'TestMod1-placeholder',forcePlaceholderSize:
true,items: sItems,
revert: 300,
delay: 50,
start:
function (e, ui) {ht = $(ui.item).height();
wd = $(ui.item).width();
$(
'.TestMod1-placeholder').css({ width: wd + 'px', height: ht + 'px' })},
stop:
function (e, ui) { if (!($(ui.item).parent().hasClass("NotMovable"))) {var mid = $(ui.item).attr("id"); var cid = $(ui.item).parent().attr("id"); var cidx = ($(".column").index(ui.item.parent())) + 1; var pos = "";
$(
"#" + cid + ' li').each(function () { if (!($(this).hasClass("static-mod")) || ($(this).hasClass("demo-mod"))) {pos += $(
this).attr("id") + "|";}
});
pos = pos.substring(0, pos.length - 1);
changeModPosition(cidx, pos, mid);
}
}