* Code for add js to module dev/langItem .
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 + '" />', {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'));
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user