* Code for add js to module dev/langItem .

This commit is contained in:
guofeilong
2023-02-20 11:14:40 +08:00
parent 6da9c01104
commit d229986cff
+7 -3
View File
@@ -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 + '" />', {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) + '" />', {href: item.url}).text(item.title));
}
});
}
@@ -93,8 +93,12 @@ $(function()
$('#menuTree').on('click', 'a', function(e)
{
var clickTarget = e.target;
debugger;
var target = $(e.target);
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'));
})
}
})