From 7781368e6fdca73b35f0334dd5552eea257aa4fb Mon Sep 17 00:00:00 2001 From: rulingcom Date: Tue, 14 Sep 2021 05:08:17 +0000 Subject: [PATCH] Fix bug. --- assets/javascripts/app.js | 15 +++++++++++---- modules/gallery/gallery_index1.html.erb | 4 ++-- modules/gallery/gallery_index2.html.erb | 4 ++-- modules/gallery/gallery_index3.html.erb | 4 ++-- modules/gallery/gallery_index4.html.erb | 4 ++-- modules/gallery/gallery_index5.html.erb | 4 ++-- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 646682d..6c817c3 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -754,9 +754,16 @@ function transdate(){ // $this.next().next().slideToggle(350); // } // }); - $('.sitemenu-item a').click(function(){ - $(this).parent("li").children("ul").slideToggle('100'); - $(this).next().toggleClass("fa-caret-up fa-caret-down"); + $('.sitemenu-item span.fa').click(function(){ + var $ul = $(this).parent("li").children("ul"); + if($ul.find('li').length != 0){ + $ul.slideToggle('100'); + if($(this).hasClass('fa-caret-down')){ + $(this).removeClass('fa-caret-down').addClass('fa-caret-up'); + }else{ + $(this).removeClass('fa-caret-up').addClass('fa-caret-down'); + } + } }); }); @@ -785,7 +792,7 @@ function transdate(){ // });// //選單 $(document).ready(function() { var title_wrapper = $("
") - title_wrapper.append($('.view_count.pull-right,.page-module-title')); + title_wrapper.append($('.view_count.pull-right,.page-module-title,#main-content .index-title,.i-member-status-title:eq(0)')); $('.row.pagerow').prepend(title_wrapper); try { transdate() diff --git a/modules/gallery/gallery_index1.html.erb b/modules/gallery/gallery_index1.html.erb index 26d6b5d..38d91e7 100644 --- a/modules/gallery/gallery_index1.html.erb +++ b/modules/gallery/gallery_index1.html.erb @@ -1,7 +1,7 @@