代码改变世界

使用$create的DragDropList与DraggableItem声明

2006-11-04 00:59  Cat Chen  阅读(647)  评论(6编辑  收藏  举报
function App_Init()
{
    
var dropCueTemplate = $create(Cattism.GCamp.UI.Template, {}{}{}, $get("dropCueTemplate"));
    
var emptyTemplate = $create(Cattism.GCamp.UI.Template, {}{}{}, $get("emptyTemplate"));
    
    
var leftZone$DragDropZoneBehavior = $create(Cattism.GCamp.UI.DragDropZone, 
        
{
            dragDataType: 
"HTML",
            acceptedDataTypes: [
"HTML"],
            dragMode: Sys.Preview.UI.DragMode.Move,
            direction: Sys.Preview.UI.RepeatDirection.Vertical,
            dropCueTemplate: dropCueTemplate,
            emptyTemplate: emptyTemplate
        }
{}{}, $get("leftZone"));
    
    
var rightZone$DragDropZoneBehavior = $create(Cattism.GCamp.UI.DragDropZone, 
        
{
            dragDataType: 
"HTML",
            acceptedDataTypes: [
"HTML"],
            dragMode: Sys.Preview.UI.DragMode.Move,
            direction: Sys.Preview.UI.RepeatDirection.Vertical,
            dropCueTemplate: dropCueTemplate,
            emptyTemplate: emptyTemplate
        }
{}{}, $get("rightZone"));
    
    
var newsPart$DraggableItemBehavior = $create(Sys.Preview.UI.DraggableListItem,
        
{
            handle: $get(
"newsTitle")
        }
{}{}, $get("newsPart"));
    
    
var memberPart$DraggableItemBehavior = $create(Sys.Preview.UI.DraggableListItem,
        
{
            handle: $get(
"forumTitle")
        }
{}{}, $get("forumPart"));
    
    
var memberPart$DraggableItemBehavior = $create(Sys.Preview.UI.DraggableListItem,
        
{
            handle: $get(
"docsTitle")
        }
{}{}, $get("docsPart"));
    
    
var memberPart$DraggableItemBehavior = $create(Sys.Preview.UI.DraggableListItem,
        
{
            handle: $get(
"memberTitle")
        }
{}{}, $get("memberPart"));
}