* Code for add js to module/langItem .
This commit is contained in:
@@ -204,4 +204,4 @@ $(function()
|
||||
initPreference();
|
||||
})
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
/* menu-tree */
|
||||
.menu-tree {flex: 0 0 200px; background: #fff; padding: 10px 10px;}
|
||||
.menu-tree > .tree {padding-top: 20px;}
|
||||
.menu-tree li {padding: 5px 25px;}
|
||||
li.has-list > ul > li {padding-left: 10px;}
|
||||
.tree ul {margin-bottom: 0;}
|
||||
|
||||
/* side-left */
|
||||
.main-content > .side-left {flex: 0 0 160px; margin-left: 64px;}
|
||||
.main-content > .side-left {flex: 0 0 160px; margin-left: 44px;}
|
||||
.label-list {background: #F8F8F8; padding: 5px 0;}
|
||||
.label-list > .input-label {display: flex; align-items: center; cursor: pointer; padding-left: 40px;}
|
||||
|
||||
|
||||
@@ -48,9 +48,14 @@ $(function()
|
||||
{
|
||||
$('#menuTree').tree(
|
||||
{
|
||||
data: menuTree
|
||||
data: menuTree,
|
||||
itemCreator: function($li, item)
|
||||
{
|
||||
$li.append($('<a data-module="' + item.module + '"data-method="' + item.method + '"data-has-children="' + !!item.children + '" />', {href: item.url}).text(item.title));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('.menu-tree .search-input').on('input', function()
|
||||
{
|
||||
var val = $(this).val();
|
||||
@@ -77,10 +82,19 @@ $(function()
|
||||
}
|
||||
item.children = children;
|
||||
}
|
||||
updateData.push(item);
|
||||
if (item.children.length || item.title.includes(val) ||(item.key && item.key.includes(val)) )
|
||||
{
|
||||
updateData.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
$('#menuTree').data('zui.tree').reload(updateData);
|
||||
})
|
||||
|
||||
$('#menuTree').on('click', 'a', function(e)
|
||||
{
|
||||
var clickTarget = e.target;
|
||||
debugger;
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user