There are questions remain, We'll search for the answers together. But one thing we known for sure,the future is not set!

【原创文章】关闭ecshop大商创后台的新手向导

ecshop 百蔬君 3991℃ 已收录 2评论

每次登录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大商创后台的新手向导

喜欢 (0)or分享 (0)
发表我的评论
取消评论

请证明您不是机器人(^v^):

表情
(2)个小伙伴在吐槽
  1. 请问是在那个目录的文件
    匿名2019-10-18 12:08 回复
    • 管理目录中,admin\templates\start.dwt
      百蔬君2019-10-20 11:05 回复