jQuery EasyUI Window - Customizing the Window Toolbar
By default, a window has four tools: collapsible, minimizable, maximizable, and closable. For example, we define the following window:
window content
To customize the tools, set each tool to true or false. For example, if we want to define a window with only a closable tool, you should set all other tools to false. We can define the tools property in markup or through jQuery code. Now we use jQuery code to define the window:
$('#win').window({
collapsible:false,
minimizable:false,
maximizable:false
});
If we want to add custom tools to a window, we can use the tools property. As an example, we add two tools to the window:
$('#win').window({
collapsible:false,
minimizable:false,
maximizable:false,
tools:[{
iconCls:'icon-add',
handler:function(){
alert('add');
}
},{
iconCls:'icon-remove',
handler:function(){
alert('remove');
}
}]
});