From b1ddeaa02f3683316e32ecf5997bfd65644f7f0c Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 21 Jan 2020 18:21:24 +0800 Subject: [PATCH] fix error and let level-2's and level-3's position show on correct place --- app/controllers/site_menu_widgets_controller.rb | 4 ++-- widgets/site_menu_widget/_site_menu_widget1.html.erb | 4 ++-- widgets/site_menu_widget/_site_menu_widget2.html.erb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/site_menu_widgets_controller.rb b/app/controllers/site_menu_widgets_controller.rb index 471ae6b..e989e65 100644 --- a/app/controllers/site_menu_widgets_controller.rb +++ b/app/controllers/site_menu_widgets_controller.rb @@ -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() " diff --git a/widgets/site_menu_widget/_site_menu_widget1.html.erb b/widgets/site_menu_widget/_site_menu_widget1.html.erb index 2e865b8..99b9454 100644 --- a/widgets/site_menu_widget/_site_menu_widget1.html.erb +++ b/widgets/site_menu_widget/_site_menu_widget1.html.erb @@ -6,10 +6,10 @@