758 lines
37 KiB
JavaScript
758 lines
37 KiB
JavaScript
// 左边引进去
|
||
$('.art_side').load('./side.html');
|
||
|
||
// 底部
|
||
$('.footer').load('./footer.html')
|
||
|
||
$( document ).ready(function() {
|
||
// console.log( "document loaded" );
|
||
$('#kezuoB').hide();
|
||
// console.log( $('#kezuoB') );
|
||
});
|
||
|
||
// 期刊基础、外链、分期、话题信息加载
|
||
function side_list() {
|
||
|
||
// 左侧期刊列表数据
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Journal/getJournal',
|
||
data: {
|
||
"journal_id": Jour_num
|
||
},
|
||
success: function (result) {
|
||
if (result.code == 0) {
|
||
|
||
// 期刊基础信息
|
||
var arr_jour = result.data.journal;
|
||
$('h4.rgb_color').css('color', arr_jour.system_color);
|
||
$('.home_logo>span').css('color', arr_jour.system_color);
|
||
$('.whitebg h4').css('color', arr_jour.system_color);
|
||
$('.whitebg h4 a').css('color', arr_jour.system_color);
|
||
$('.guest_ .rgb_color').css('color', arr_jour.system_color);
|
||
$('.footer').css('background', arr_jour.system_color);
|
||
$('.article .art_main .new_art h4, .article .art_main .high_light h4, .news_ment h4, .art_main_con_topic h4').css('color', arr_jour.system_color);
|
||
$('.jour_notice>a').css('color', arr_jour.system_color)
|
||
$('.rgb_color_background').css('background-color', arr_jour.system_color);
|
||
$('.article .art_side .btn_system').css('background', arr_jour.system_color);
|
||
$('.guest_content .gue_system a').css('background', arr_jour.system_color);
|
||
$('.contbu_success .suc_text a').css('color', arr_jour.system_color);
|
||
$('.contbu_success .suc_text i').css('color', arr_jour.system_color);
|
||
$('.guest_content .gue_author a').css('background', arr_jour.system_color);
|
||
$('.jour_ht_dy .topic_dingyue .topic_add').css('color', arr_jour.system_color);
|
||
$('.jour_ht_dy .topic_ts .mainbox input[type="submit"]').css('background-color', arr_jour.system_color);
|
||
$('.top .top_sea .search_for input[type="text"]').css('border-color', arr_jour.system_color)
|
||
$('.top .top_sea .search_for input[type="button"]').css('border-color', arr_jour.system_color)
|
||
$('.top .top_sea .search_for input[type="button"]').css('background-color', arr_jour.system_color)
|
||
$('.top .top_sea>a').css('color', arr_jour.system_color)
|
||
$('.jour_awaite > a').css('color', arr_jour.system_color)
|
||
$('.hunt_for .hunt_inp').css('border-color', arr_jour.system_color)
|
||
$('.hunt_for .hunt_btn').css('background-color', arr_jour.system_color)
|
||
$('.mb_aform input.combox-box').css('border-color', arr_jour.system_color)
|
||
$('.mb_aform input[type="submit"]').css('background-color', arr_jour.system_color)
|
||
$('.mb_aform input[type="submit"]').css('border-color', arr_jour.system_color)
|
||
$('.mb_aform input[type="text"]').css('border-color', arr_jour.system_color)
|
||
$('.mb_aform .search_for input[type="button"]').css('background-color', arr_jour.system_color)
|
||
$('.jour_ption input[type="submit"]').css('background-color', arr_jour.system_color)
|
||
$('.jour_ption input[type="submit"]').css('border-color', arr_jour.system_color)
|
||
$('.ncon_SCom .rgb_color').css('color', arr_jour.system_color)
|
||
$('.footer .daohang .dh_by input[type="submit"]').css('background-color', arr_jour.system_color)
|
||
$('.footpanel').css('background-color', arr_jour.system_color + 'cc')
|
||
$('.footpanel .yue_addfp').css('background-color', arr_jour.system_color)
|
||
$('.press-button a').css('background-color', arr_jour.system_color)
|
||
$('.All_Issues').css('color', arr_jour.system_color);
|
||
$('.overall_caption #top_bar').css('background-color', arr_jour.system_color)
|
||
$('.art_top_topic').css('background-color', arr_jour.system_color)
|
||
$('.article_ .online_fr>h4').css('border-bottom-color', arr_jour.system_color)
|
||
$('.article_ .ncon_hl>h4').css('border-bottom-color', arr_jour.system_color)
|
||
$('.article_ .ncon_fr>h4').css('border-bottom-color', arr_jour.system_color)
|
||
$('.article_ .ncon_aper>h4').css('border-bottom-color', arr_jour.system_color)
|
||
$('.article_ .alls_issue>h4').css('border-bottom-color', arr_jour.system_color)
|
||
$('.news_ment>a').css('color', arr_jour.system_color)
|
||
$('.ment_sousuo_kuang').css('background-color', arr_jour.system_color)
|
||
$('.ment_sousuo_kuang .soukuang_btn i').css('color', arr_jour.system_color)
|
||
$('.ment_sousuo_kuang .soukuang_btn i').css('border-color', arr_jour.system_color)
|
||
$('.article_ .alls_issue > ul li > a > p').css('background-color', arr_jour.system_color+'80')
|
||
$('.top .top_switch').css('border-color', arr_jour.system_color)
|
||
$('.top .top_switch>div:nth-child(2)').css('background-color', arr_jour.system_color)
|
||
$('.top .top_switch>div:nth-child(1)').css('color', arr_jour.system_color)
|
||
|
||
|
||
|
||
|
||
// 左侧期刊搜索
|
||
$('.hunt_for .hunt_btn').click(function () {
|
||
window.open("jour_search.html?J_num=" + Jour_num + "&se_ch=" + $(".hunt_for .hunt_inp").val());
|
||
})
|
||
|
||
|
||
// $(".contbu_submit select[name='journal']").html('<option value="'+arr_jour.issn+'">'+arr_jour.title+'</option>');
|
||
// $(".contbu_submit select[name='journal'] option[value='"+arr_jour.issn+"']").prop("selected", true);
|
||
|
||
|
||
$('.top_sea .a_search').attr('href', 'preprint.html?J_num=' + Jour_num);
|
||
$('.Subm_System').attr('href', arr_jour.submission_url);
|
||
$('.jour_message>a').attr('href', '/' + arr_jour.usx);
|
||
document.title = arr_jour.title;
|
||
$('.jour_message>a img').attr("src", imgjourUrl + arr_jour.icon);
|
||
$('.jour_message div .mes_issn').html(arr_jour.issn);
|
||
//$('.top .top_sea').append('<a class="b_Sub" href="draw_up.html?issn=' + arr_jour.issn + '" target="_blank"><i class="fa fa-envelope"></i>Subscribe</a>')//订阅
|
||
$('.b_Sub').css('color', arr_jour.system_color);
|
||
$('.b_Sub').attr('href', 'draw_up.html?issn=' + arr_jour.issn);
|
||
$('.jour_message div .mes_edit').html(arr_jour.editorinchief);
|
||
$('.jour_message div .mes_accep').html(arr_jour.acceptance);
|
||
$('.jour_message div .mes_final').html(arr_jour.finaldecision);
|
||
$('.jour_message div .mes_APC').html(arr_jour.apc);
|
||
$('.jour_message div .mes_email').html(arr_jour.email);
|
||
// 出版周期匹配
|
||
if (arr_jour.cycle == 1) {
|
||
arr_jour.cycle_ = 'Monthly'
|
||
} else if (arr_jour.cycle == 2) {
|
||
arr_jour.cycle_ = 'Bimonthly'
|
||
} else if (arr_jour.cycle == 3) {
|
||
arr_jour.cycle_ = 'Quarterly'
|
||
}
|
||
if (Jour_num == 2 || Jour_num == 17 || Jour_num == 18) {
|
||
arr_jour.cycle_ = 'Continuities'
|
||
}
|
||
$('.jour_message div .mes_cycle').html(arr_jour.cycle_); // 出版周期
|
||
$('.dingyue p b').html(arr_jour.title);//订阅
|
||
$('.footpanel .ftp_paper .fpr_text b').html(arr_jour.title);//底栏订阅
|
||
$('.nav_ban h1 a').html(arr_jour.title);
|
||
if (Jour_num == 22) {
|
||
$('.nav_ban h1 a').append('( 国学研究 )');
|
||
}
|
||
$('.nav_ban>h1>a').attr('href', '/' + arr_jour.usx);
|
||
$('.ncon_SCom > div > div:nth-child(4) > p> b').html(arr_jour.title)
|
||
|
||
if (arr_jour.title == 'Traditional Medicine Research') {
|
||
$('.nav_ban h2').html('<img src="../img/h2_tit.png" style="margin-top: 26px;"/>');
|
||
$('.sharethis_tmr').css('display', 'none');
|
||
$('.art_top_topic').css('padding-top', '0');
|
||
$('.line_sbil').css('display', 'block');
|
||
// $('.jour_message>div').append('<p style="margin-top: 5px;"><b>E-Mail Address:</b> <br/><span>tmr@tmrjournals.com</span></p>');
|
||
$('.topic_add').addClass('topic_add_tmr');
|
||
$('.share_tmrtb').css('display', 'block');
|
||
} else {
|
||
$('.tmr_side_book').css('display', 'none');
|
||
//2,125,186,108,177,64,88,391,
|
||
}
|
||
|
||
// 侧边地图
|
||
if (Jour_num == '1' || Jour_num == '8' || Jour_num == '14') {
|
||
|
||
} else {
|
||
$('.tmr_side_map').css('display', 'none');
|
||
}
|
||
|
||
if (Jour_num == '1') {
|
||
$('.jour_notice').after('<div class="thank_img" style="text-align: center">' +
|
||
'<div style="height: 1px;background-color: #ddd;width: 235px;margin: -5px auto 18px auto;"></div>' +
|
||
'<a href="thank_list.html?J_num=1" target="_blank">' +
|
||
'<img src="img/tha_nk.png" alt="" style="width: 235px;"></a></div>');
|
||
}
|
||
|
||
if (Jour_num == '15') {
|
||
// $('.art_side').append('<div style="height: 15px;background-color: #f4fafd"></div>' +
|
||
// '<a href="psmr/PSMR申请单.doc" target="_blank" style="border-bottom: 2px solid #dcdcdc;color: #06315e;text-align:center;padding: 10px 0;display: block;">PSMR Application Form</a>' +
|
||
// '<div style="height: 15px;background-color: #f4fafd"></div>' +
|
||
// '<a href="psmr/申请书.docx" target="_blank" style="border-bottom: 2px solid #dcdcdc;color: #06315e;text-align:center;padding: 10px 0;display: block;">Application for Project Approval</a>');
|
||
$('.nav_ban').append('<p style="margin-top: 18px;float: right;font-size: 20px;color: #fff">A Journal of Bio-Psycho-Social Medicine</p>');
|
||
|
||
}
|
||
|
||
// if (Jour_num == '14') {
|
||
// $('.nav_ban').append('<img src="img/h4_tit.png" style="width: 356px;margin-top: 10px;float: right;">');
|
||
// }
|
||
|
||
// if (Jour_num == '12') {
|
||
// $('.jour_message div .mes_edit').append('<br><font style="margin-left: 105px;">Massimo Marzorati</font>')
|
||
// }
|
||
|
||
if (Jour_num == '11') {
|
||
$('.nav_ban').append('<p style="float: right;width: 188px;color: #fff;margin-top:22px;line-height: 22px;">Insight into the Secret of Data</p>');
|
||
}
|
||
|
||
if (Jour_num == '6') {
|
||
$('.nav_ban').append('<p style="float: right;width: 362px;color: #fff;margin-top:10px;line-height: 22px;">' +
|
||
'This journal is associated to the School of Pharmaceutical Science and Technology of Tianjin University</p>');
|
||
$('.nav_ban h2').css('display', 'none');
|
||
$('.jour_sta_tp_left_border').css('display', 'none');
|
||
$('.ncon_tcrd>h4').html('Highlights');
|
||
} else {
|
||
$('.nav_ban h2').css('display', 'inline-block')
|
||
}
|
||
|
||
if (arr_jour.title == '经典中医研究') {
|
||
$('.nav_ban h1 a').html('经 典 中 医 研 究');
|
||
$('.jour_message div .mes_edit').prev('b').html('主编:');
|
||
$('.jour_message div .mes_accep').prev('b').html('接受率:');
|
||
$('.jour_message div .mes_final').prev('b').html('初审周期:');
|
||
$('.jour_message div .mes_APC').prev('b').html('费用:');
|
||
$('.jour_message div .mes_cycle').prev('b').html('出版周期:');
|
||
$('.jour_message div .mes_email').prev('b').html('邮箱:');
|
||
$('.jour_message div .edit_board_tmr b').html('编委会:');
|
||
if (arr_jour.cycle == 1) {
|
||
arr_jour.cycle_ = '月刊'
|
||
} else if (arr_jour.cycle == 2) {
|
||
arr_jour.cycle_ = '双月刊'
|
||
} else if (arr_jour.cycle == 3) {
|
||
arr_jour.cycle_ = '季刊'
|
||
}
|
||
$('.jour_message div .mes_cycle').html(arr_jour.cycle_);
|
||
$('.jour_message div').append('<p><b>编辑微信:</b><span>A2227572976</span></p>');
|
||
$('.jour_message>h4').html('检索');
|
||
$('.About_Journal').html('期刊简介');
|
||
$('.Subm_System').html('投稿系统');
|
||
$('.Join_Team').html('申请审稿人');
|
||
$('.Ins_authors').html('作者指南');
|
||
$('.Join_Bord').html('加入编委会');
|
||
$('.jour_ption>p').html('最新文章订阅');
|
||
$('.jour_sta_wail').prev('h4').html('当年期卷');
|
||
$('.All_Issues').html('显示所有期卷');
|
||
$('.jour_sta_tp_left_more').html('更多');
|
||
$('.jour_notice>h4').html('通知公告');
|
||
$('.jour_guest>.h_four').html('专刊');
|
||
$('.jour_guest>a').html('申请客座编辑');
|
||
$('.jour_ht_dy>h4').html('话题订阅');
|
||
$('.jour_guest>h4>a').html('更多专刊');
|
||
$('.jour_awaite>h4').html('待审稿件');
|
||
|
||
$('.jour_ption #combox2').prop("placeholder", "输入选择话题");
|
||
$('.jour_ption #emaplk').prop("placeholder", "输入有效的邮箱地址");
|
||
$('.jour_ption .yue_addk').val("订阅");
|
||
$('.jour_ht_dy .topic_dingyue #combox3').prop("placeholder", "输入选择话题");
|
||
$('.jour_ht_dy .topic_dingyue #emajl').prop("placeholder", "输入有效的邮箱地址");
|
||
$('.jour_ht_dy .topic_dingyue .topic_add').html(">> 订阅");
|
||
|
||
$('.ncon_SCom > div >div:nth-child(1) >div a').css('height', '24px')
|
||
$('.ncon_SCom > div >div:nth-child(1) >div a').css('padding', '10px 0 5px 0')
|
||
$('.press-button > div >a').css('padding', '15px 0 5px 0')
|
||
$('.press-button > div >a').css('height', '32px')
|
||
}
|
||
|
||
localStorage.setItem("Journals_title", arr_jour.title);
|
||
localStorage.setItem("Journals_issn", arr_jour.issn);
|
||
localStorage.setItem("Journals_color", arr_jour.system_color);
|
||
localStorage.setItem("Journals_usx", arr_jour.usx);
|
||
//几个按钮的链接
|
||
|
||
if (Jour_num == 1 || Jour_num == 25) {
|
||
$('#kezuoBLine').css('display', 'block');
|
||
$('#kezuoB').css('display', 'block');
|
||
|
||
}
|
||
$('.Subm_System').attr('href', arr_jour.submission_url);
|
||
$('.About_Journal').attr('href', 'about_journal.html?J_num=' + Jour_num);
|
||
$('.Ins_authors').attr('href', 'for_author.html?J_num=' + Jour_num);
|
||
$('.Join_Bord').attr('href', 'z_f6-1.html?J_num=' + Jour_num);
|
||
$('.Join_Bord2').attr('href', 'z_f11-1.html?J_num=' + Jour_num);
|
||
|
||
$('.edit_board_tmr>a').attr('href', arr_jour.board_url);
|
||
//$('.edit_board_tmr>a').attr('href', 'notice.html?J_num=' + Jour_num + '&footer_id=' + arr_jour.board_url);
|
||
|
||
// 外链信息
|
||
var arr_Abc = result.data.journalAbs;
|
||
var str = "";
|
||
for (var i = 0; i < arr_Abc.length; i++) {
|
||
if(arr_Abc[i].is_show==1){
|
||
str += '<li>» <a target="_blank" href="' + arr_Abc[i].url + '">' + arr_Abc[i].title + '</a></li>'
|
||
}
|
||
}
|
||
if (result.data.journalAbs.length <= '15') {
|
||
$('.mes_Abs').html(str);
|
||
} else {
|
||
$('.mes_Abs').html(str + '<a class="wl_click">more <i class="fa fa-long-arrow-down"></i></a>');
|
||
$('.mes_Abs li:gt(14)').hide();
|
||
$(".wl_click").css('color', arr_jour.system_color);
|
||
}
|
||
$(".wl_click").bind('click', function () {
|
||
if ($(".wl_click").html() == 'more <i class="fa fa-long-arrow-up"></i>') {
|
||
$('.mes_Abs li:gt(14)').hide();
|
||
$('.wl_click').html('more <i class="fa fa-long-arrow-down"></i>');
|
||
} else {
|
||
$('.mes_Abs li:gt(14)').show();
|
||
$('.wl_click').html('more <i class="fa fa-long-arrow-up"></i>');
|
||
}
|
||
});
|
||
|
||
|
||
// 相关期刊
|
||
var corr = result.data.relats;
|
||
|
||
$('.jour_correlate>a').attr('href', '/' + corr[0].usx);
|
||
$('.jour_correlate>a>img').attr('src', imgjourUrl + corr[0].icon)
|
||
|
||
if (localStorage.Journals_title == '经典中医研究') {
|
||
$('.jour_correlate>h4').html('相关期刊');
|
||
}
|
||
|
||
// 感谢图片
|
||
if (Jour_num != 1) {
|
||
$('.thank_img').css('display', 'none');
|
||
$('.whit_await').css('display', 'none');
|
||
$('.jour_awaite_bot').css('display', 'none');
|
||
}
|
||
|
||
|
||
// 待审稿件
|
||
// $.ajax({
|
||
// type: 'post', url: apiUrl + 'special/Article/getReviewerArticlesForJournal',
|
||
// data: {
|
||
// "issn": arr_jour.issn
|
||
// },
|
||
// success: function (result) {
|
||
// if (result.code == 0) {
|
||
//
|
||
// // 消息列表
|
||
// var arr = result.data.articles;
|
||
// var str = '';
|
||
//
|
||
// for (var i = 0; i < arr.length; i++) {
|
||
// str += '<li><a target="_blank" href="https://submission.tmrjournals.com/peerewer">' + arr[i].title + '</a>' +
|
||
// '<font style="color: #888">Type: </font>' +
|
||
// '<font style="color: #006699">' + pan_type(arr[i].type) +'</font></li>'
|
||
// }
|
||
// $('.jour_awaite ul').html(str);
|
||
// $('.jour_awaite .more').attr('href', 'https://submission.tmrjournals.com/peerewer');
|
||
//
|
||
// if (str == '') {
|
||
// $('.whit_await').css('display', 'none');
|
||
// $('.jour_awaite_bot').css('display', 'none');
|
||
// }
|
||
//
|
||
// } else {
|
||
// ShowDanger("请求失败!");
|
||
// }
|
||
// },
|
||
// error: function () {
|
||
// ShowDanger("error!");
|
||
// }
|
||
// })
|
||
} else {
|
||
ShowDanger("请求失败!");
|
||
}
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
}
|
||
});
|
||
|
||
|
||
|
||
// 左侧分期列表数据
|
||
//$.ajax({
|
||
// type: 'post', url: apiUrl + 'api/Journal/getMainPageStages',
|
||
// data: {
|
||
// "journal_id": Jour_num
|
||
// },
|
||
// success: function (result) {
|
||
// if (result.code == 0) {
|
||
//
|
||
// // 分期信息
|
||
// if (result.data.topic_show_type == 0) {
|
||
// var arr_stage = result.data.stages;
|
||
// var sty = "";
|
||
// for (var i = 0; i < arr_stage.length; i++) {
|
||
// if (arr_stage[i].stage_no == '0') {
|
||
// var iss_ = ''
|
||
// } else {
|
||
// var iss_ = ' Issue.' + arr_stage[i].stage_no
|
||
// }
|
||
// sty += '<li><a target="_blank" href="article_list.html?J_num=' + Jour_num + '&y_id=' + arr_stage[i].journal_stage_id + '">' +
|
||
// '' + arr_stage[i].stage_year + ' Vol.' + arr_stage[i].stage_vol + iss_ + ' ' + arr_stage[i].stage_pagename + arr_stage[i].stage_page + '</a></li>'
|
||
//
|
||
// }
|
||
// $('.jour_stage .jour_sta_wail').html(sty);
|
||
// $('.All_Issues').attr('href', 'stages.html?J_num=' + Jour_num);
|
||
// }else{
|
||
// $('.jour_stage').css('display', 'none')
|
||
// $('.jour_stage_bot').css('display', 'none')
|
||
// }
|
||
//
|
||
// } else {
|
||
// ShowDanger("请求失败!");
|
||
// }
|
||
// },
|
||
// error: function () {
|
||
// ShowDanger("error!");
|
||
// }
|
||
//})
|
||
|
||
|
||
// 左侧话题列表数据
|
||
//$.ajax({
|
||
// type: 'post', url: apiUrl + 'api/Journal/getJournalTopic',
|
||
// data: {
|
||
// "journal_id": Jour_num
|
||
// },
|
||
// success: function (result) {
|
||
// if (result.code == 0) {
|
||
//
|
||
// // 话题列表
|
||
// var arr_topic = result.data.topicList;
|
||
//
|
||
// var panduan = ''
|
||
// for (var i = 0; i < arr_topic.length; i++) {
|
||
// if (arr_topic[i].position == "left") {
|
||
// panduan = '1';
|
||
// var st_left = "";
|
||
// $('.jour_sta_tp_left_title').html(arr_topic[i].title);
|
||
// $('.jour_sta_tp_left_more').attr('href', 'topic.html?J_num=' + Jour_num + '&t_id=' + arr_topic[i].journal_topic_id);
|
||
// for (var j = 0; j < arr_topic[i].children.length; j++) {
|
||
// if (j == 3) break;
|
||
// var url_href = '';
|
||
// if (arr_topic[i].children[j].is_final == '1') {
|
||
// url_href = 'topic_list.html?J_num=' + Jour_num + '&t_id='
|
||
// } else (
|
||
// url_href = 'topic.html?J_num=' + Jour_num + '&t_id='
|
||
// )
|
||
// st_left += '<li><span>' + arr_topic[i].children[j].title + '</span>' +
|
||
// '<a target="_blank" href="' + url_href + arr_topic[i].children[j].journal_topic_id + '"><img src="' + imgtopicUrl + arr_topic[i].children[j].icon + '" ' +
|
||
// 'style="width: 240px;height: 150px;border-bottom: 1px solid #ddd;margin: 5px 0 10px 0"></a></li>'
|
||
// }
|
||
// $('.jour_sta_tp_left').html(st_left);
|
||
// if (st_left == '') {
|
||
// $('.jour_sta_tp_left_more').css('display', 'none');
|
||
// }
|
||
// }
|
||
// }
|
||
// if (panduan == '') {
|
||
// $('.jour_hauti_pd').css('display', 'none');
|
||
// $('.jour_hauti_bot').css('display', 'none');
|
||
// }
|
||
// } else {
|
||
// ShowDanger("请求失败!");
|
||
// }
|
||
// },
|
||
// error: function () {
|
||
// ShowDanger("error!");
|
||
// }
|
||
//})
|
||
|
||
|
||
// 左侧话题订阅下拉
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Journal/getTopicForSubscribe',
|
||
data: {
|
||
"journal_id": Jour_num
|
||
},
|
||
success: function (result) {
|
||
if (result.code == 0) {
|
||
var arr = result.data.topics;
|
||
var data_3 = [];
|
||
for (var i = 0; i < arr.length; i++) {
|
||
data_3.push({
|
||
id: arr[i].journal_topic_id,
|
||
text: arr[i].title
|
||
});
|
||
}
|
||
$("#combox3").combox({
|
||
id: "id",
|
||
name: "text",
|
||
data: data_3,
|
||
valueChange: function (data) {
|
||
// debugger
|
||
//返回data,filterData,selectData
|
||
}
|
||
})
|
||
var cb3 = $("#combox3").data('combox');
|
||
|
||
|
||
// 订阅提交
|
||
$(".jour_ht_dy .topic_add").click(function () {
|
||
$(".spa").text('');
|
||
|
||
var add_mess = {};
|
||
add_mess.email = $('#emajl').val();
|
||
add_mess.topic_ids = [];
|
||
var ar_mes = cb3.options.selectData
|
||
for (var i = 0; i < ar_mes.length; i++) {
|
||
add_mess.topic_ids.push(ar_mes[i]['id']);
|
||
}
|
||
|
||
var S_Dan = '0';
|
||
var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
|
||
|
||
if (Jour_num == '22') {
|
||
if (cb3.options.selectData == "") {
|
||
$(".spa1").text('请选择话题');
|
||
S_Dan = '1';
|
||
} else if ($("#emajl").val() == "") {
|
||
$(".spa1").text('填写邮箱');
|
||
S_Dan = '1';
|
||
} else if (!reg.test($("#emajl").val())) {
|
||
$(".spa1").text('填写正确格式的邮箱');
|
||
S_Dan = '1';
|
||
}
|
||
} else {
|
||
if (cb3.options.selectData == "") {
|
||
$(".spa1").text('Please choose topic');
|
||
S_Dan = '1';
|
||
} else if ($("#emajl").val() == "") {
|
||
$(".spa1").text('Please fill in E-mail');
|
||
S_Dan = '1';
|
||
} else if (!reg.test($("#emajl").val())) {
|
||
$(".spa1").text('Please fill in properly formatted E-mail');
|
||
S_Dan = '1';
|
||
}
|
||
}
|
||
|
||
|
||
if (S_Dan == '1') {
|
||
ShowDanger("Incomplete information!");
|
||
} else {
|
||
$(".topic_add").addClass("disable");
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Journal/addSubscribeTopics',
|
||
data: add_mess,
|
||
success: function (result) {
|
||
if (result.code == 0) {
|
||
// $(".topic_dingyue input[type='text']").val('');
|
||
$(".topic_add").removeClass("disable");
|
||
$(".jour_ts").fadeIn();
|
||
$(".jour_ts input.tishi_author").click(function () {
|
||
$(".jour_ts").fadeOut();
|
||
});
|
||
// $("#mask").css("height",$(document).height());
|
||
// $("#mask").css("width",$(document).width());
|
||
// $("#mask").show();
|
||
// document.body.addEventListener('touchmove',bodyScroll,false);
|
||
// $('body').css({'position':'fixed',"width":"100%"});
|
||
} else {
|
||
ShowDanger(result.msg);
|
||
$(".topic_add").removeClass("disable");
|
||
}
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
$(".topic_add").removeClass("disable");
|
||
}
|
||
})
|
||
}
|
||
})
|
||
|
||
|
||
} else {
|
||
ShowDanger("请求失败!");
|
||
}
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
}
|
||
});
|
||
|
||
|
||
// 左侧话题订阅下拉(新)
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Journal/getTopicForSubscribe',
|
||
data: {
|
||
"journal_id": Jour_num
|
||
},
|
||
success: function (result) {
|
||
if (result.code == 0) {
|
||
var arr = result.data.topics;
|
||
var data_2 = [];
|
||
for (var i = 0; i < arr.length; i++) {
|
||
data_2.push({
|
||
id: arr[i].journal_topic_id,
|
||
text: arr[i].title
|
||
});
|
||
}
|
||
$("#combox2").combox({
|
||
id: "id",
|
||
name: "text",
|
||
data: data_2,
|
||
valueChange: function (data) {
|
||
// debugger
|
||
//返回data,filterData,selectData
|
||
}
|
||
})
|
||
var cb2 = $("#combox2").data('combox');
|
||
|
||
|
||
// 订阅期刊(提交新的)
|
||
$(".yue_addk").click(function () {
|
||
$(".spa198").text('');
|
||
|
||
var add_mess = {};
|
||
add_mess.email = $('#emaplk').val();
|
||
add_mess.topic_ids = [];
|
||
var ar_mes = cb2.options.selectData
|
||
for (var i = 0; i < ar_mes.length; i++) {
|
||
add_mess.topic_ids.push(ar_mes[i]['id']);
|
||
}
|
||
|
||
var S_Dan = '0';
|
||
var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
|
||
|
||
if (cb2.options.selectData == "") {
|
||
$(".spa198").text('Please choose topic');
|
||
S_Dan = '1';
|
||
} else if ($("#emaplk").val() == "") {
|
||
$(".spa198").text('Please fill in E-mail');
|
||
S_Dan = '1';
|
||
} else if (!(reg.test($("#emaplk").val()))) {
|
||
$(".spa198").text('Please fill in properly formatted E-mail');
|
||
S_Dan = '1';
|
||
}
|
||
|
||
|
||
if (S_Dan == '1') {
|
||
ShowDanger("Incomplete information!");
|
||
} else {
|
||
$(".yue_addk").addClass("disable");
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Journal/addSubscribeTopics',
|
||
data: add_mess,
|
||
success: function (result) {
|
||
if (result.code == 0) {
|
||
// $(".jour_ption input[type='text']").val('');
|
||
$(".yue_addk").removeClass("disable");
|
||
$(".jour_ts").fadeIn();
|
||
|
||
$(".jour_ts input.tishi_author").click(function () {
|
||
$(".jour_ts").fadeOut();
|
||
});
|
||
|
||
} else {
|
||
ShowDanger(result.msg);
|
||
$(".yue_addk").removeClass("disable");
|
||
}
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
$(".yue_addk").removeClass("disable");
|
||
}
|
||
})
|
||
}
|
||
})
|
||
|
||
} else {
|
||
ShowDanger("请求失败!");
|
||
}
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
}
|
||
});
|
||
|
||
|
||
// 左侧客座列表数据
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Special/getSpecials',
|
||
data: {
|
||
"journal_id": Jour_num
|
||
},
|
||
success: function (result) {
|
||
if (result.code == 0) {
|
||
|
||
// 客座列表
|
||
var arr = result.data.specials;
|
||
var str = '';
|
||
|
||
if (Jour_num == '22') {
|
||
for (var i = 0; i < arr.length; i++) {
|
||
if (i == 4) break;
|
||
str += '<li><a href="gue_cont.html?J_num=' + localStorage.Journals_num + '&&Gu_num=' + arr[i].journal_special_id + '" target="_blank" style="color: #069">' + arr[i].title + '</a><br>' +
|
||
'<span style="color: #444">客座编辑: ' + arr[i].editor + '</span><br>' +
|
||
'<span style="color: #888">投稿截止日期: ' + arr[i].deadline + '</span>' +
|
||
'<div class="gue_s_btn"><a class="gue_submin" alt="' + arr[i].journal_special_id + '">投稿</a>' +
|
||
'<a class="gue_appli" alt="' + arr[i].journal_special_id + '">客座编辑申请</a></div></li>'
|
||
}
|
||
} else {
|
||
for (var i = 0; i < arr.length; i++) {
|
||
if (i == 4) break;
|
||
str += '<li><a href="gue_cont.html?J_num=' + localStorage.Journals_num + '&&Gu_num=' + arr[i].journal_special_id + '" target="_blank">' + arr[i].title + '</a><br>' +
|
||
'<span style="color: #888">Guest Editor: </span><span class="rgb_color">' + arr[i].editor + '</span><br>' +
|
||
'<span style="color: #888">Deadline: </span><span class="rgb_color">' + arr[i].deadline + '</span>' +
|
||
'<div class="gue_s_btn"><a class="gue_submin" alt="' + arr[i].journal_special_id + '">Submit Article</a>' +
|
||
'<a class="gue_appli" alt="' + arr[i].journal_special_id + '">Guest Editor Application</a></div></li>'
|
||
}
|
||
}
|
||
|
||
|
||
if (Jour_num == '22') {
|
||
$('.jour_guest ul').html('<h4 style="margin: 0;padding: 6px;" class="gue_is_lis rgb_color">列表</h4>' + str);
|
||
} else {
|
||
$('.jour_guest ul').html('<h4 style="margin: 0;padding: 6px;" class="gue_is_lis rgb_color">Open Special Issues</h4>' + str);
|
||
}
|
||
$('.jour_guest>a').attr('href', 'gue_edit.html?J_num=' + Jour_num);
|
||
$('.jour_guest h4 a').attr('href', 'guest.html?J_num=' + Jour_num);
|
||
if (str == '') {
|
||
$('.gue_is_lis').css('display', 'none');
|
||
}
|
||
if (!result.data.is_show) {
|
||
$('.jour_guest h4 a').css('display', 'none');
|
||
}
|
||
|
||
// if(Jour_num!='1'){
|
||
// $('.jour_guest').css('display','none');
|
||
// $('.jour_sta_tp_left_border').css('display','none');
|
||
// }
|
||
|
||
$('.jour_guest ul>h4').css('color', localStorage.Journals_color)
|
||
$('.jour_guest ul li .gue_s_btn a').css('color', localStorage.Journals_color)
|
||
$('.jour_guest ul li .gue_s_btn a').css('border-color', localStorage.Journals_color)
|
||
|
||
$('.jour_guest ul li a.gue_submin').click(function () {
|
||
// 判断是否有身份
|
||
if ($.cookie("username") != undefined && $.cookie("user_id") != undefined) {
|
||
window.open('contribu_list.html?J_num=' + Jour_num + '&&special_id=' + $(this).attr('alt'));
|
||
} else {
|
||
window.open('contribu_login.html?J_num=' + Jour_num + '&&special_id=' + $(this).attr('alt'));
|
||
}
|
||
})
|
||
$('.jour_guest ul li a.gue_appli').click(function () {
|
||
window.open('gue_cont_gea.html?J_num=' + Jour_num + '&&Gu_num=' + $(this).attr('alt'));
|
||
})
|
||
|
||
} else {
|
||
ShowDanger("请求失败!");
|
||
}
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
}
|
||
})
|
||
|
||
|
||
// 左侧消息列表数据
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Journal/getNotices',
|
||
data: {
|
||
"journal_id": Jour_num
|
||
},
|
||
success: function (result) {
|
||
if (result.code == 0) {
|
||
|
||
// 消息列表
|
||
var arr = result.data.notices;
|
||
var str = '';
|
||
|
||
for (var i = 0; i < arr.length; i++) {
|
||
if (i == 6) break;
|
||
str += '<li><font style="color: #006699">» ' + formatTimeToDate4(arr[i].ctime * 1000) + '</font><br/>' +
|
||
'<a target="_blank" href="notice.html?J_num=' + Jour_num + '¬ice_id=' + arr[i].journal_notices_id + '">' + arr[i].title + '</a></li>'
|
||
}
|
||
$('.jour_notice ul').html(str);
|
||
$('.jour_notice .more').attr('href', 'notice_list.html?J_num=' + Jour_num + '&n_id=' + Jour_num);
|
||
|
||
if (str == '') {
|
||
$('.jour_notice').css('display', 'none');
|
||
}
|
||
|
||
} else {
|
||
ShowDanger("请求失败!");
|
||
}
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
}
|
||
})
|
||
|
||
|
||
|
||
}
|
||
|
||
|