From f6cad269777bfb47cfbf40ee29dc7c604b0a3ec3 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 22 Mar 2023 10:44:26 +0800 Subject: [PATCH] * Add locate. --- module/doc/js/tablecontents.js | 53 +++++++++++++++----------- module/doc/view/tablecontents.html.php | 8 ++-- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js index 872b557474..1dd2a5ddae 100644 --- a/module/doc/js/tablecontents.js +++ b/module/doc/js/tablecontents.js @@ -70,10 +70,8 @@ $(function() { $('#modules').find('li.can-sort').each(function() { - var $li = $(this); - - var item = $li.data(); - '' == 'book' ? orders['sort[' + item.id + ']'] = $li.attr('data-order') || item.order : orders['orders[' + item.id + ']'] = $li.attr('data-order') || item.order; + var item = $(this).data(); + '' == 'book' ? orders['sort[' + item.id + ']'] = item.order || item.order : orders['orders[' + item.id + ']'] = item.order || item.order; }); link = createLink('tree', 'updateOrder'); @@ -140,11 +138,11 @@ $(function() function renderDropdown(option) { var libClass = '.libDorpdown'; - if(option.id != 'dropDownLibrary') libClass = '.moduleDorpdown'; + if(option.type != 'dropDownLibrary') libClass = '.moduleDorpdown'; if($(libClass).find('li').length == 0) return ''; - var dropdown = '