Commit 4938d0a9 authored by campaign's avatar campaign

by zhanyi01

parent c7471140
...@@ -61,9 +61,15 @@ KM.ui.define('dropmenu', { ...@@ -61,9 +61,15 @@ KM.ui.define('dropmenu', {
}) })
}) })
} }
}) });
}, },
_initEvent:function(){
this.root().on('mouseover','li[class="kmui-dropdown-submenu',function(e){
var $submenu = $(this).data('widget');
$submenu.kmui().show($(this),'right','position',5,2)
});
},
disabled: function (cb) { disabled: function (cb) {
$('li[class!=kmui-divider]', this.root()).each(function () { $('li[class!=kmui-divider]', this.root()).each(function () {
var $el = $(this); var $el = $(this);
...@@ -99,7 +105,7 @@ KM.ui.define('dropmenu', { ...@@ -99,7 +105,7 @@ KM.ui.define('dropmenu', {
var $list = $('li[class!=kmui-divider]', this.root()); var $list = $('li[class!=kmui-divider]', this.root());
var $node = $('<li class="kmui-dropdown-submenu"><a tabindex="-1" href="#">' + label + '</a></li>').append(menu); var $node = $('<li class="kmui-dropdown-submenu"><a tabindex="-1" href="#">' + label + '</a></li>').append(menu);
$node.data('widget',menu);
if (index >= 0 && index < $list.length) { if (index >= 0 && index < $list.length) {
$node.insertBefore($list[index]); $node.insertBefore($list[index]);
} else if (index < 0) { } else if (index < 0) {
......
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