Fix js bug.

This commit is contained in:
BoHung Chiu 2022-05-20 12:11:37 +08:00
parent 696dbf7ca6
commit 69b8dc7152
1 changed files with 41 additions and 48 deletions

View File

@ -477,24 +477,22 @@
if (url == "?editmode=on") { if (url == "?editmode=on") {
$('.tab_content').css({'position': 'relative','display':'block'}); $('.tab_content').css({'position': 'relative','display':'block'});
} }
}
annc_widget_nav();
//切換語言停留在同一頁 //切換語言停留在同一頁
if(window.location.pathname!="/") if(window.location.pathname!="/")
$("#en").attr("href",window.location.pathname.replace("zh_tw","en")) $("#en").attr("href",window.location.pathname.replace("zh_tw","en"))
//檔案室 下載檔案 hover 彈出備註訊息 //檔案室 下載檔案 hover 彈出備註訊息
$('[data-toggle="tooltip"]').tooltip() $('[data-toggle="tooltip"]').tooltip()
//下載檔案格式dot pdf分色 //下載檔案格式dot pdf分色
$(".i-archive .label.label-primary").each(function() { $(".i-archive .label.label-primary").each(function() {
var downloadType = $(this).text(); var downloadType = $(this).text();
$(this).addClass(downloadType); $(this).addClass(downloadType);
}) })
//檔案室模組 Widget 手風琴 //檔案室模組 Widget 手風琴
function extendPanelWidget() { function extendPanelWidget() {
var len = $('.panel-title').length; var len = $('.panel-title').length;
var i = -1; var i = -1;
if (len > 0) { if (len > 0) {
@ -504,10 +502,9 @@ function extendPanelWidget() {
$('.panel-collapse:eq(' + i + ')').attr('id', 'collapse' + i); $('.panel-collapse:eq(' + i + ')').attr('id', 'collapse' + i);
} }
} }
} }
extendPanelWidget(); extendPanelWidget();
// member show tab scroll
// member show tab scroll
$('.nav-pills').scrollingTabs({ $('.nav-pills').scrollingTabs({
scrollToTabEdge: true, scrollToTabEdge: true,
enableSwiping: true, enableSwiping: true,
@ -520,18 +517,14 @@ extendPanelWidget();
'</div>' '</div>'
].join('') ].join('')
}); });
}
}
// 當文件物件模型(DOM)載入後執行init函數 // 當文件物件模型(DOM)載入後執行init函數
$(document).ready(function() { $(document).ready(function(){
//RWD 自動縮放headerbannner //RWD 自動縮放headerbannner
function headerH() { function headerH() {
if ($(window).width() < 768) { if ($(window).width() < 768) {
const navH = $('.layout-header .navbar-header').outerHeight(); var navH = $('.layout-header .navbar-header').outerHeight();
$('.header-banner').css('height', navH ); $('.header-banner').css('height', navH );
} }
} }