Commit d03f87ef authored by campaign's avatar campaign

by zhanyi

parent 82edd911
......@@ -32,6 +32,10 @@ KM.registerUI( 'contextmenu', function () {
var data = [];
utils.each(items,function(i,item){
if(item.divider){
data.push(item)
return;
}
if(me.queryCommandState(item.cmdName)!=-1){
data.push({
label:item.label,
......@@ -41,7 +45,10 @@ KM.registerUI( 'contextmenu', function () {
}
});
if(data.length){
var item = data[data.length-1];
if(item.divider){
data.pop();
}
$menu.kmui().setData({
data:data
}).position(e.getPosition()).show();
......
......@@ -53,7 +53,9 @@ KM.registerToolbarUI( 'switchlayout', function ( name ) {
}
})
});
data.push({
divider:1
});
me.addContextmenu(data);
return comboboxWidget.button().addClass( 'kmui-combobox' );
} );
\ No newline at end of file
......@@ -221,6 +221,8 @@ KityMinder.registerModule( "LayoutModule", function () {
{
label:this.getLang('node.removenode'),
cmdName:'removenode'
},{
divider:1
}
],
......
......@@ -25,7 +25,7 @@
left: auto;
}
.kmui-dropdown-menu .divider {
.kmui-dropdown-menu .kmui-divider {
height: 1px;
margin: 9px 0;
overflow: hidden;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment