每次登录ecshop大商创后台都有一个新手向导,刚开始还好,但是到了后面每次都要点击一次才能关闭,很是烦闷
翻了一下代码
找到了控制的地方。
文件路径:admin\templates\start.dwt
if($.cookie('adminStartHome') == null){
var content = $("*[ectype='guide_dialog']").html();
pb({
id:"guide_dialog",
title:"{$lang.novice_guide}",
width:960,
height:550,
content:content,
drag:false,
foot:false
});
$("#guide_dialog .guide_list").perfectScrollbar("destroy");
$("#guide_dialog .guide_list").perfectScrollbar();
$("*[ectype='btnNext']").on("click",function(){
if(!$(this).hasClass("btn_disabled")){
var type = $(this).parents(".guide_btn").data("type");
var g_con = $(this).parents("*[ectype='guide_content']");
g_con.find(".guide_step .item").eq(type+1).addClass("current").siblings().removeClass("current");
g_con.find(".guide_list .guide_item").eq(type+1).show().siblings().hide();
$(this).parents(".guide_btn").data("type",type+1);
$(this).siblings("*[ectype='btnPrev']").removeClass("btn_disabled");
if(type == 2){
$(this).addClass("btn_disabled");
$(this).html(novice_guide_step_hint);
}else{
$(this).removeClass("btn_disabled");
$(this).html(novice_guide_step_next);
}
$("#guide_dialog .guide_list").perfectScrollbar("destroy");
$("#guide_dialog .guide_list").perfectScrollbar();
}else{
$("#guide_dialog,#pb-mask").remove();
}
});
$("*[ectype='btnPrev']").on("click",function(){
if(!$(this).hasClass("btn_disabled")){
var type = $(this).parents(".guide_btn").data("type");
var g_con = $(this).parents("*[ectype='guide_content']");
g_con.find(".guide_step .item").eq(type-1).addClass("current").siblings().removeClass("current");
g_con.find(".guide_list .guide_item").eq(type-1).show().siblings().hide();
$(this).parents(".guide_btn").data("type",type-1);
$(this).siblings("*[ectype='btnNext']").removeClass("btn_disabled");
$(this).siblings("*[ectype='btnNext']").html(novice_guide_step_next);
if(type == 1){
$(this).addClass("btn_disabled");
}else{
$(this).removeClass("btn_disabled");
}
$("#guide_dialog .guide_list").perfectScrollbar("destroy");
$("#guide_dialog .guide_list").perfectScrollbar();
}
});
//生成cookie
$.cookie('adminStartHome','cookieValue', { expires: 1 ,path:'/'});
};
把这段代码注释掉就好了,烦人的新手向导就没有了。
转载请注明:百蔬君 » 【原创文章】关闭ecshop大商创后台的新手向导