var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
var parent_host=window.parent.location.host;
//标签聚焦样式
function show_border(tag){
if(tag=='Container'){
var tmp_obj=$('.frameContainer');
}else{
var tmp_obj=$('#'+tag);
}
var height=get_qu_height(tmp_obj);
var width=get_qu_width(tmp_obj);
$('#'+tag+'_edit').height(height-4);
$('#'+tag+'_edit').width(width-4);
$('#'+tag+'_edit').css('border','2px dashed #ff6600');
}
//标签离开样式
function hide_border(tag,is_qu){
//内页编辑
if(tag=='Container'){
$('#'+tag+'_edit').height(30);
$('#'+tag+'_edit').width(195);
}else{
if(is_qu==2){
$('#'+tag+'_edit').height(30);
$('#'+tag+'_edit').width('100%');
}
if(is_qu==1){
$('#'+tag+'_edit').height(30);
$('#'+tag+'_edit').width(60);
}
}
$('#'+tag+'_edit').css('border','0px');
}
//编辑区块内容
function show_botton(tag){
$.ajaxSetup({
async: false
});
var url='http://'+parent_host+'/';
var tmp_url='';
var edit_id=0;
//非当前模板不允许操作
if(ev123_no_edit==1){
window.parent.v_msg(1,18,0,1,'');
}else{
$.post('/self_define/ajax_set_info.php',{type:12,qu_name:tag,u:UTCTimeDemo()},
function(data){
var tmp_arr2=data.split('###');
if(tmp_arr2[3]==20 || tmp_arr2[3]==21 || tmp_arr2[3]==22){
//表单标签
tmp_url='own_set_form.php';
}else if(tmp_arr2[3]==12){
//类别标签项
tmp_url='own_set_index_tag.php';
}else{
if(tmp_arr2[0]==1){//是切换项下的
if(tmp_arr2[1]==1){//表中已经存在数据
tmp_url='own_qiehuan_list.php';
}else{
tmp_url='own_set_qiehuan.php';
}
}else{
if(tmp_arr2[1]==1){//表中已经存在数据
if(tmp_arr2[2]>0){
tmp_url='own_index_edit.php';
edit_id=tmp_arr2[2];
}else{
tmp_url='own_index_list.php';
}
}else{
tmp_url='own_set_index.php';
}
}
}
}
)
var tmp_width = 650;
var tmp_height = 400;
if(edit_id){
to_url=url+tmp_url+'?id='+edit_id+'&is_frame=2&qu_name='+tag+'&u='+UTCTimeDemo();
}else{
to_url=url+tmp_url+'?is_frame=2&qu_name='+tag+'&u='+UTCTimeDemo();
}
window.parent.get_url_window(to_url,'编辑模块',tmp_width,tmp_height);
}
}
//编辑系统内容
function show_system(tag,id){
var url='http://'+parent_host+'/';
var tmp_url,title,tmp_width,tmp_height,tmp_param;
tmp_width = 650;
tmp_height = 400;
tmp_param ='is_frame=2';
if(tag=='top'){
tmp_url='own_set_top.php';
title='头部信息';
}
if(tag=='foot_doc'){
tmp_url='own_add_foot_doc.php';
title='底部文章';
tmp_height = 450;
}
if(tag=='linksite'){
tmp_url='add_link_site.php';
title='友情链接';
}
if(tag=='foot'){
tmp_url='add_foot.php';
title='底部信息';
}
if(tag=='banner'){
tmp_url='own_add_banner.php';
title='编辑模块';
tmp_param+='&channel_id='+channel_id;
}
if(tag=='bbs'){
tmp_url='add_bbs_class.php';
title='编辑模块';
tmp_param='is_frame=4&channel_id='+channel_id;
}
if(tag=='add_module'){
tmp_url='own_add_module.php';
title='编辑模块';
tmp_param+='&channel_id='+channel_id+'&id='+id;
}
if(tag=='Container'){
tmp_url='own_channel_style.php';
title='设置版式';
tmp_param+='&channel_id='+channel_id;
tmp_width = 640;
tmp_height = 320;
}
if(tag=='logo'){
tmp_url='own_top_set.php';
title='头部设置';
}
if(tag=='navi'){
tmp_url='own_navi_set.php';
title='栏目导航设置';
}
if(tag=='qu_banner'){
tmp_url='own_banner_set.php';
title='焦点图设置';
}
var to_url=url+tmp_url+'?'+tmp_param+'&u='+UTCTimeDemo();
window.parent.get_url_window(to_url,title,tmp_width,tmp_height);
}
//时间戳
function UTCTimeDemo(){
var now = new Date().getTime();
var datestr=escape(now*1000+Math.round(Math.random()*1000));
return datestr;
}
//设置区可编辑
function set_qu_edit(){
$("[id*=qu_]").each(function(){
var id_str=$(this).attr('id');
var id_str2=id_str.replace('qu_','');
var height=get_qu_height(this);
var width=get_qu_width(this);
var height2=height;
var width2=width;
var hide_tag=3;
if(id_str2=='banner')$(this).show();
$(this).css('position','relative');
var hide_str='';
var hide_style='';
var is_hide=in_array(id_str2,hide_qu_ids);//是否可隐藏
var is_hide_ed=in_array(id_str2,hide_qu_ids_seted);//是否已隐藏
if(is_hide_ed){
hide_str='';
hide_style="width:"+width+"px;height:"+height+"px;background-color:#ffffff;filter:alpha(opacity=75);opacity:0.75;"
}else if(is_hide){
hide_style="width:"+width+"px;height:"+height+"px;background-color:#ffffff;filter:alpha(opacity=0);opacity:0;"
hide_str='
';
}else{
hide_style="width:0px;height:0px;background-color:#ffffff;filter:alpha(opacity=0);opacity:0;";
width2=60;
height2=30;
hide_tag=1;
}
//新头部搜索去掉relative
var set_str='';
if(new_top==1 && id_str2=='search_tag')$(this).css('position','absolute');
if(new_top==1 && id_str2=='logo'){
var set_str='
';
width2=300;
hide_tag=2;
}else if(id_str2=='banner'){
var is_set=$(this).attr('rel');
if(is_set=='can_set'){
var set_str='
';
width2=300;
hide_tag=2;
}
}
if(set_str && id_str2=='banner'){
var tmp_str="