/*H-ui.admin.js v2.3.1 date:15:42 2015.08.19 by:guojunhui*/ /*获取顶部选项卡总长度*/ function tabNavallwidth(){ var taballwidth=0, $tabNav = $(".acrossTab"), $tabNavWp = $(".Hui-tabNav-wp"), $tabNavitem = $(".acrossTab li"), $tabNavmore =$(".Hui-tabNav-more"); if (!$tabNav[0]){return} $tabNavitem.each(function(index, element) { taballwidth+=Number(parseFloat($(this).width()+60))}); $tabNav.width(taballwidth+25); var w = $tabNavWp.width(); if(taballwidth+25>w){ $tabNavmore.show()} else{ $tabNavmore.hide(); $tabNav.css({left:0})} } /*左侧菜单响应式*/ function Huiasidedisplay(){ if($(window).width()>=768){ $(".Hui-aside").show() } } function getskincookie(){ var v = getCookie("Huiskin"); if(v==null||v==""){ v="default"; } $("#skin").attr("href","skin/"+v+"/skin.css"); } $(function(){ getskincookie(); //layer.config({extend: 'extend/layer.ext.js'}); Huiasidedisplay(); var resizeID; $(window).resize(function(){ clearTimeout(resizeID); resizeID = setTimeout(function(){ Huiasidedisplay(); },500); }); $(".Hui-nav-toggle").click(function(){ $(".Hui-aside").slideToggle(); }); $(".Hui-aside").on("click",".menu_dropdown dd li a",function(){ if($(window).width()<768){ $(".Hui-aside").slideToggle(); } }); /*左侧菜单*/ $.Huifold(".menu_dropdown dl dt",".menu_dropdown dl dd","fast",1,"click"); /*选项卡导航*/ $(".Hui-aside").on("click",".menu_dropdown a",function(){ if($(this).attr('_href')){ var bStop=false; var bStopIndex=0; var _href=$(this).attr('_href'); var _titleName=$(this).html(); var topWindow=$(window.parent.document); var show_navLi=topWindow.find("#min_title_list li"); show_navLi.each(function() { if($(this).find('span').attr("data-href")==_href){ bStop=true; bStopIndex=show_navLi.index($(this)); return false; } }); if(!bStop){ creatIframe(_href,_titleName); min_titleList(); } else{ show_navLi.removeClass("active").eq(bStopIndex).addClass("active"); var iframe_box=topWindow.find("#iframe_box"); iframe_box.find(".show_iframe").hide().eq(bStopIndex).show().find("iframe").attr("src",_href); } } }); function min_titleList(){ var topWindow=$(window.parent.document); var show_nav=topWindow.find("#min_title_list"); var aLi=show_nav.find("li"); }; function creatIframe(href,titleName){ var topWindow=$(window.parent.document); var show_nav=topWindow.find('#min_title_list'); show_nav.find('li').removeClass("active"); var iframe_box=topWindow.find('#iframe_box'); show_nav.append('