我们来写有个django页面 布局 使用
.fn.layout.defaults重写默认值对象。布局容器有5个区域:北、南、东、西和中间。中间区域面板是必须的,边缘的面板都是可选的。每个边缘区域面板都可以通过拖拽其边框改变大小,也可以点击折叠按钮将面板折叠起来。布局可以进行嵌套,用户可以通过组合布局构建复杂的布局结构。在goods中写下列代码Title
(function () { //create tree
('#categoryTree').tree({
url:'/goods/categoryTree'
});
// add button to west panel('body').layout("panel","west").panel({ tools:[ { iconCls:'icon-reload', handler:function () { ('#categoryTree').tree('reload')
}
},
{
iconCls:'icon-add',
handler:function () {
$('#category-form-dialog').dialog("open")
}
}
]
})
//create category form dialog('#category-form-dialog').dialog({ title: '商品类别表单', width: 400, height: 200, closed: true, modal:true, buttons:[ { text:'保存', iconCls:'icon-save', handler:function () { ('#category-form-dialog').dialog('close')
}
},
{
text:'取消',
iconCls:'icon-cancel',
handler:function () {('#category-form-dialog').dialog('close') } } ] }) })
url:'/goods/categoryTree'
});
// add button to west panel('body').layout("panel","west").panel({ tools:[ { iconCls:'icon-reload', handler:function () { ('#categoryTree').tree('reload')
}
},
{
iconCls:'icon-add',
handler:function () {
$('#category-form-dialog').dialog("open")
}
}
]
})
//create category form dialog('#category-form-dialog').dialog({ title: '商品类别表单', width: 400, height: 200, closed: true, modal:true, buttons:[ { text:'保存', iconCls:'icon-save', handler:function () { ('#category-form-dialog').dialog('close')
}
},
{
text:'取消',
iconCls:'icon-cancel',
handler:function () {('#category-form-dialog').dialog('close') } } ] }) })
悠悠商品管理系统
form