* Code for langItem module refactors .
This commit is contained in:
@@ -51,7 +51,7 @@ $(function()
|
||||
data: menuTree,
|
||||
itemCreator: function($li, item)
|
||||
{
|
||||
$li.append($('<a data-module="' + item.module + '"data-method="' + item.method + '"data-has-children="' + (item.children ? !!item.children.length : false) + '" />', {href: item.url}).text(item.title));
|
||||
$li.append('<a data-module="' + item.module + '" data-method="' + item.method + '" data-has-children="' + (item.children ? !!item.children.length : false) + '"class="text-muted""' + '" href=# >' + item.title + '</a>');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -82,7 +82,7 @@ $(function()
|
||||
}
|
||||
item.children = children;
|
||||
}
|
||||
if (item.children.length || item.title.includes(val) ||(item.key && item.key.includes(val)) )
|
||||
if (item.children.length || item.title.includes(val) ||(item.key && item.key.includes(val)))
|
||||
{
|
||||
updateData.push(item);
|
||||
}
|
||||
@@ -94,10 +94,8 @@ $(function()
|
||||
$('#menuTree').on('click', 'a', function(e)
|
||||
{
|
||||
var target = $(e.target);
|
||||
if (target.attr('data-has-children') === 'true')
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (target.attr('data-has-children') === 'true') return
|
||||
|
||||
self.location.href = createLink('dev', 'langItem', 'type=' + type + '&module=' + target.attr('data-module') + '&method=' + target.attr('data-method'));
|
||||
})
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<input type="search" class="form-control search-input" />
|
||||
<label class="input-control-icon-left search-icon flex align-center justify-center"><i class="icon icon-search"></i></label>
|
||||
</div>
|
||||
<div id="menuTree"></div>
|
||||
<div id="menuTree" class="menu-active-primary menu-hover-primary"></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<form class='main-form form-ajax flex-1' method='post'>
|
||||
|
||||
Reference in New Issue
Block a user