fix error and let level-2's and level-3's position show on correct place

This commit is contained in:
chiu 2020-01-21 18:21:24 +08:00
parent a13b509193
commit b1ddeaa02f
3 changed files with 6 additions and 6 deletions

View File

@ -96,14 +96,14 @@ class SiteMenuWidgetsController < ApplicationController
end
@ul_index=[]
@count = -1
@count1 = 0
@count1 = -1
@li_index = []
title = subpart.title
items = create_json(@pages)
if @expand_layer
create_menu_bool_object(items)
temp = @ul_index.reverse.collect do |ul_index|
"var ul_tp = $('div[data-subpart-id=#{subpart.id}]').find('ul').eq(#{ul_index[0]})
"var ul_tp = $('div[data-subpart-id=#{subpart.id}]').find('ul.dropdown-menu').eq(#{ul_index[0]})
ul_tp.removeClass('dropdown-menu')
$('div[data-subpart-id=#{subpart.id}]').find('li').eq(#{ul_index[1]}).find('span').eq(0).remove()
"

View File

@ -6,10 +6,10 @@
<li class="sitemenu-item level-1">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="1">
<li class="sitemenu-item level-2">
<li class="sitemenu-item level-2" style="position: relative;">
<a class="sitemenu-link level-2" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="2">
<li class="sitemenu-item level-3">
<li class="sitemenu-item level-3" style="position: relative;">
<a class="sitemenu-link level-3" href="{{url}}" target="{{target}}">{{page_name}}</a>
</li>
</ul>

View File

@ -6,10 +6,10 @@
<li class="sitemenu-item level-1">
<a class="sitemenu-link level-1" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="1">
<li class="sitemenu-item level-2">
<li class="sitemenu-item level-2" style="position: relative;">
<a class="sitemenu-link level-2" href="{{url}}" target="{{target}}">{{page_name}}</a>
<ul class="sitemenu-list level-2" data-list="children" data-level="2">
<li class="sitemenu-item level-3">
<li class="sitemenu-item level-3" style="position: relative;">
<a class="sitemenu-link level-3" href="{{url}}" target="{{target}}">{{page_name}}</a>
</li>
</ul>