diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css index b8c241b3e3..16c0adddc4 100644 --- a/module/doc/css/tablecontents.css +++ b/module/doc/css/tablecontents.css @@ -89,4 +89,4 @@ table.table > thead > tr {height: 32px;} [lang^=zh] #leftBar .selectBox #currentItem {width: 180px;} #leftBar .selectBox #currentItem > .text {overflow: hidden; text-align: left; flex: 0 1 100%;} -.has-input {overflow: hidden;} +.tree li.has-input {overflow: hidden;} diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 87a43e9207..28273ffec7 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -191,8 +191,9 @@ $(function() case 'addCataBro' : moduleData.createType = 'same'; var $input = $('[data-id=liTreeModal]').html(); - var $rootDom = $('#fileTree [data-id=' + item.id + ']li'); + var $rootDom = $('#fileTree li[data-id=' + item.id + ']'); $rootDom.after($input); + $rootDom.closest('ul').find('.has-input').css('padding-left', '0'); $('#fileTree').find('input').focus(); break; case 'addCataChild' : @@ -257,9 +258,6 @@ $(function() }); }).on('keydown', '.file-tree input.input-tree', function(e) { - if(e.keyCode == 13) - { - $(this).trigger('blur'); - } + if(e.keyCode == 13) $(this).trigger('blur'); }); });