Files
journal_com/js/notice.js

1532 lines
80 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 消息/Call for Paper判断
function notice_list() {
// 获取地址栏信息
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var paper_ID = getQueryString('paper_id'); //Call for Paper
var n_ID = getQueryString('n_id'); //消息
if (n_ID != null) {
// 消息列表数据
$.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++) {
str += '<div><a href="notice.html?J_num=' + Jour_num + '&notice_id=' + arr[i].journal_notices_id + '" target="_blank">' + arr[i].title + '</a><i>' + formatTimeToDate3(arr[i].ctime * 1000) + '</i></div>'
}
$('.noti_lis').html(str);
$('.noti_mes').html('common 1 page / ' + arr.length + ' Records');
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
} else if (paper_ID != null) {
// 消息Call for Paper数据
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getJournalCfp',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
// 消息列表
var arr = result.data.cfps;
var str = '';
for (var i = 0; i < arr.length; i++) {
str += '<div><a href="notice.html?J_num=' + Jour_num + '&cfp_id=' + arr[i].journal_cfp_id + '" target="_blank">' + arr[i].title + '</a><i>' + formatTimeToDate3(arr[i].ctime * 1000) + '</i></div>'
}
$('.noti_lis').html(str);
$('.noti_mes').html('common 1 page / ' + arr.length + ' Records');
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
}
}
// 消息、cfp、footer 内容
function notice_con() {
// 获取地址栏信息
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var notice_ID = getQueryString('notice_id'); //消息
var cfp_ID = getQueryString('cfp_id'); //call for paper
var footer_ID = getQueryString('footer_id'); //footer
//消息
if (notice_ID != null) {
// 消息
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getNoticesDetail',
data: {
"journal_notices_id": notice_ID
},
success: function (result) {
if (result.code == 0) {
// 消息列表
var arr = result.data.notices;
$('.topics>h2').html(arr.title);
$('.topics>div').html(arr.content);
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
}
//call for paper
if (cfp_ID != null) {
// call for paper
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getCfpDetail',
data: {
"journal_cfp_id": cfp_ID
},
success: function (result) {
if (result.code == 0) {
// 消息列表
var arr = result.data.cfp;
$('.topics>h2').html(arr.title);
$('.topics>div').html(arr.content);
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
}
//footer
if (footer_ID != null) {
var matching = [206, 336, 338, 173, 176, 484, 258, 253, 259, 123, 122, 121]
for (var i in matching) {
if (footer_ID == matching[i]) {
window.location.href = 'for_author.html?J_num=' + Jour_num;
}
}
var marry = [466, 194, 45, 44, 100, 108, 147, 146, 46, 50, 255, 186, 298, 351, 21, 154, 233, 234, 339, 391, 325, 409, 81, 88, 268, 270, 132, 137, 62, 64, 178, 177, 128, 125, 219, 392, 1, 2, 236, 242, 25, 24, 151, 152, 485, 486]
let mar_ry = 0
for (var i in marry) {
if (footer_ID == marry[i]) {
mar_ry = 1
}
}
if (mar_ry == 0) {
window.location.href = 'for_author.html?J_num=' + Jour_num;
}
// footer
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getFooterArt',
data: {
"journal_paper_art_id": footer_ID
},
success: function (result) {
if (result.code == 0) {
// 消息列表
var arr = result.data.article;
$('.topics>h2').html(arr.title);
if (arr.title == 'Editorial Board') {
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getBoard1',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
// 编委会成员
var arg = result.data.data.boards;
// 期刊委员会
var committees = result.data.data.committees;
var editors = result.data.data.editors;
var str = '';
if (arg.main == undefined) {
str += ''
} else {
str += '<b>Editor-in-Chief</b><br><br>'
for (var i = 0; i < arg.main.length; i++) {
if (arg.main[i].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiSubmission + 'public/usericon/' + arg.main[i].icon + '" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
}
if (arg.main[i].research_areas == '') {
var dis_line = ''
} else {
var dis_line = '<b>Research areas: </b>' + arg.main[i].research_areas
}
if (arg.main[i].website != '') {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.main[i].website + '" target="_blank" style="color: #006699">' + arg.main[i].realname + '</a>, Ph.D. '
+ arg.main[i].technical + '<br/>' + arg.main[i].email + '<br/>'
+ arg.main[i].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
arg.main[i].realname + ', Ph.D. '
+ arg.main[i].technical + '<br/>' + arg.main[i].email + '<br/>'
+ arg.main[i].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
}
}
if (arg.remain == undefined) {
str += ''
} else {
str += '<b>Vice Editor-in-Chief</b><br><br>'
for (var i = 0; i < arg.remain.length; i++) {
if (arg.remain[i].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiSubmission + 'public/usericon/' + arg.remain[i].icon + '" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
}
if (arg.remain[i].research_areas == '') {
var dis_line = ''
} else {
var dis_line = '<b>Research areas: </b>' + arg.remain[i].research_areas
}
if (arg.remain[i].website != '') {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.remain[i].website + '" target="_blank" style="color: #006699">' + arg.remain[i].realname + '</a>, Ph.D. '
+ arg.remain[i].technical + '<br/>' + arg.remain[i].email + '<br/>'
+ arg.remain[i].company + ' <br/>' + dis_line + icon_img + '</li><br><br>'
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
arg.remain[i].realname + ', Ph.D. '
+ arg.remain[i].technical + '<br/>' + arg.remain[i].email + '<br/>'
+ arg.remain[i].company + ' <br/>' + dis_line + icon_img + '</li><br><br>'
}
}
str += '<br>'
}
if (arg.member == undefined) {
str += ''
} else {
str += '<b>Editorial Board Members</b><br><br>'
// 未分组
$.each(arg.member, function (key, value) { //遍历键值对
if ($.isArray(arg.member[key]) == true) {
if (key == 'nogroup') {
for (var j = 0; j < arg.member[key].length; j++) {
if (arg.member[key][j].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiSubmission + 'public/usericon/' + arg.member[key][j].icon + '" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
}
if (arg.member[key][j].research_areas == '') {
var dis_line = ''
} else {
var dis_line = '<b>Research areas: </b>' + arg.member[key][j].research_areas
}
if (arg.member[key][j].realname == 'Jian Hao' || arg.member[key][j].realname == 'Mathew Goss' || arg.member[key][j].realname == 'Lucy Pi (Nuo-Xi Pi)' || arg.member[key][j].realname == 'Richard Shane Palmer' || arg.member[key][j].realname == 'Xin-Yun Zhang') {
if (arg.member[key][j].website != '') {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
arg.member[key][j].realname + ', Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
} else {
if (arg.member[key][j].website != '') {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
arg.member[key][j].realname + ', Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
}
}
}
}
})
// 有分组
$.each(arg.member, function (key, value) { //遍历键值对
if ($.isArray(arg.member[key]) == true) {
if (key != 'nogroup') {
str += '<b>' + key + '</b><br><br>'
for (var j = 0; j < arg.member[key].length; j++) {
if (arg.member[key][j].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiSubmission + 'public/usericon/' + arg.member[key][j].icon + '" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
}
if (arg.member[key][j].research_areas == '') {
var dis_line = ''
} else {
var dis_line = '<b>Research areas: </b>' + arg.member[key][j].research_areas
}
if (arg.member[key][j].realname == 'Jian Hao' || arg.member[key][j].realname == 'Mathew Goss' || arg.member[key][j].realname == 'Lucy Pi (Nuo-Xi Pi)' || arg.member[key][j].realname == 'Richard Shane Palmer' || arg.member[key][j].realname == 'Xin-Yun Zhang') {
if (arg.member[key][j].website != '') {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
arg.member[key][j].realname + ', Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
} else {
if (arg.member[key][j].website != '') {
// Nagwa El-Badri
if(Jour_num==25&&arg.member[key][j].realname == 'Nagwa El-Badri'){
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, M.D. Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}else{
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].realname + '</a>, Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
arg.member[key][j].realname + ', Ph.D. '
+ arg.member[key][j].technical + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
}
}
}
}
})
str += '<br>'
}
// 期刊委员会
if (committees && committees.length > 0) {
str += '<b>Academic Integrity Committee</b><br><br>'
for (var i = 0; i < committees.length; i++) {
if (committees[i].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiSubmission + 'public/usericon/' + committees[i].icon + '" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
}
if (committees[i].research_areas == '') {
var dis_line = ''
} else {
var dis_line = '<b>Research areas: </b>' + committees[i].research_areas
}
if (committees[i].website != '') {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
'<a href="' + committees[i].website + '" target="_blank" style="color: #006699">' + committees[i].realname + '</a>, Ph.D. '
+ committees[i].technical + '<br/>' + committees[i].email + '<br/>'
+ committees[i].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
} else {
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 605px;">' +
committees[i].realname + ', Ph.D. '
+ committees[i].technical + '<br/>' + committees[i].email + '<br/>'
+ committees[i].company + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
}
} else {
str += '';
}
// 期刊编辑
if (editors && editors.length > 0) {
str += '<b>Editors & Staff</b><br><br>'
for (var i = 0; i < editors.length; i++) {
if (editors[i].icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiSubmission + 'public/usericon/' + editors[i].icon + '" style="position: absolute;left: 0;top: 0;width: 75px; height:auto; border-radius: 10px;">'
}
if (editors[i].website != '') {
str += '<li style="min-height:120px;position: relative;padding-left: 100px;margin-bottom: 30px; width: 200px; float:left; margin-right:10px;">' +
'<a href="' + editors[i].website + '" target="_blank" style="color: #006699">' + editors[i].realname + '</a>,'
+ editors[i].editor_title + '<br/>' + editors[i].email + '<br/>'
+ icon_img + '</li>'
} else {
str += '<li style="min-height:120px;position: relative;padding-left: 100px;margin-bottom: 30px; width: 200px; float:left; margin-right:10px;">' +
editors[i].realname + ', '
+ editors[i].editor_title + '<br/>' + editors[i].email + '<br/>'
+ icon_img + '</li>'
}
}
str += '<li style="clear:both">';
} else {
str += ''
}
$('.topics>div').append('<ul style="overflow: hidden;">' + str + '</ul>');
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
});
} else if (arr.title == '编委会') {
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getBoard',
data: {
"journal_id": Jour_num
},
success: function (result) {
if (result.code == 0) {
var arg = result.data.boards;
var str = '';
if (arg.main == undefined) {
str += ''
} else {
str += '<b>主编</b><br><br>'
for (var i = 0; i < arg.main.length; i++) {
if (arg.main[i].board_icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiUrlImg + arg.main[i].board_icon + '" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
}
if (arg.main[i].field == '') {
var dis_line = ''
} else {
var dis_line = '领域: ' + arg.main[i].field
}
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 630px;">' +
'<a href="' + arg.main[i].website + '" target="_blank" style="color: #006699">' + arg.main[i].name + '</a>, '
+ arg.main[i].dr + ' ' + arg.main[i].title + '<br/>' + arg.main[i].email + '<br/>'
+ arg.main[i].address + ' 中国' + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
str += "<br/>"
}
if (arg.remain == undefined) {
str += ''
} else {
str += '<b>副主编</b><br><br>'
for (var i = 0; i < arg.remain.length; i++) {
if (arg.remain[i].board_icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiUrlImg + arg.remain[i].board_icon + '" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
}
if (arg.remain[i].field == '') {
var dis_line = ''
} else {
var dis_line = '领域: ' + arg.remain[i].field
}
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 630px;">' +
'<a href="' + arg.remain[i].website + '" target="_blank" style="color: #006699">' + arg.remain[i].name + '</a>, '
+ arg.remain[i].dr + ' ' + arg.remain[i].title + '<br/>' + arg.remain[i].email + '<br/>'
+ arg.remain[i].address + ' 中国' + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
str += '<br>'
}
if (arg.member == undefined) {
str += ''
} else {
str += '<b>编委</b><br><br>'
$.each(arg.member, function (key, value) { //遍历键值对
if ($.isArray(arg.member[key]) == true) {
str += '<b>' + key + '</b><br><br>'
for (var j = 0; j < arg.member[key].length; j++) {
if (arg.member[key][j].board_icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiUrlImg + arg.member[key][j].board_icon + '" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
}
if (arg.member[key][j].field == '') {
var dis_line = ''
} else {
var dis_line = '领域: ' + arg.member[key][j].field
}
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 630px;">' +
'<a href="' + arg.member[key][j].website + '" target="_blank" style="color: #006699">' + arg.member[key][j].name + '</a>, '
+ arg.member[key][j].dr + ' ' + arg.member[key][j].title + '<br/>' + arg.member[key][j].email + '<br/>'
+ arg.member[key][j].address + ' 中国' + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
} else {
if (arg.member[key].board_icon == '') {
var icon_img = '<img src="img/rev_user.png" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
} else {
var icon_img = '<img src="' + apiUrlImg + arg.member[key].board_icon + '" style="position: absolute;left: 0;top: 0;width: 75px;height: 75px;border-radius: 10px;">'
}
if (arg.member[key].field == '') {
var dis_line = ''
} else {
var dis_line = '领域: ' + arg.member[key].field
}
str += '<li style="position: relative;padding-left: 100px;margin-bottom: 30px;width: 630px;">' +
'<a href="' + arg.member[key].website + '" target="_blank" style="color: #006699">' + arg.member[key].name + '</a>, '
+ arg.member[key].dr + ' ' + arg.member[key].title + '<br/>' + arg.member[key].email + '<br/>'
+ arg.member[key].address + ' 中国' + '<br/>' + dis_line + icon_img + '</li><br><br>'
}
})
str += '<br>'
}
$('.topics>div').append('<ul style="overflow: hidden;">' + str + '</ul>');
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
});
} else {
$('.topics>div').html(arr.content);
}
if (footer_ID == '126') {
$('.fuwenben img').css('width', '200px')
}
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
}
}
// 客座信息填写
// $("input[type='radio'][name='like']:eq(0)").click()
function add_sub() {
$(".spa").text('');
var add_mess = {};
add_mess.journal_id = Jour_num;
add_mess.email = $('#email').val();
add_mess.first_name = $('#firstname').val();
add_mess.last_name = $('#lastname').val();
add_mess.address = $('#address').val();
add_mess.interests = $('#interests').val();//0
add_mess.website = $('#website').val();//0
add_mess.orcid = $('#ORCID').val();//0
add_mess.title = $('#proposed').val();
add_mess.intro = '';
add_mess.abstract = $('#editor').val();
add_mess.keywords = $('#Keywords').val();
// add_mess.deadline=new Date($('#time-1').val()).getTime();
add_mess.deadline = $('#time-1').val();
// $("input[type='text']").blur(function(){
// if($(this).is("#firstname")){
// if($("#firstname").val()!="") {$(".spa1").text("");}
// }
// })
// $("input[name='have']").blur(function(){
// if($("input[name='have']:checked").val()!=undefined) {
// $(".spa10").text("");
// }
// })
var S_Dan = '0';
if (localStorage.Journals_title == '经典中医研究') {
if ($("#firstname").val() == "") {
$(".spa1").text('请填写名字');
S_Dan = '1';
}
if ($("#lastname").val() == "") {
$(".spa2").text('请填写姓');
S_Dan = '1';
}
if ($("#email").val() == "") {
$(".spa3").text('请填写邮箱');
S_Dan = '1';
}
if ($("#address").val() == "") {
$(".spa4").text('请填写个人单位');
S_Dan = '1';
}
if ($("#proposed").val() == "") {
$(".spa5").text('请填写申请的专刊题目');
S_Dan = '1';
}
// if ($("#intro").val() == "") {
// $(".spa6").text('Please fill in category');
// S_Dan = '1';
// }
if ($("#editor").val() == '') {
$(".spa7").text('请填写专刊简介');
S_Dan = '1';
}
if ($("#Keywords").val() == "") {
$(".spa8").text('请填写关键字');
S_Dan = '1';
}
if ($("#time-1").val() == "") {
$(".spa9").text('请填写投稿截止时间');
S_Dan = '1';
}
if ($("input[name='have']:checked").val() == undefined) {
$(".spa11").text('请勾选');
S_Dan = '1';
}
} else {
if ($("#firstname").val() == "") {
$(".spa1").text('Please fill in First name');
S_Dan = '1';
}
if ($("#lastname").val() == "") {
$(".spa2").text('Please fill in Last name');
S_Dan = '1';
}
if ($("#email").val() == "") {
$(".spa3").text('Please fill in E-mail');
S_Dan = '1';
}
if ($("#address").val() == "") {
$(".spa4").text('Please fill in Address');
S_Dan = '1';
}
if ($("#proposed").val() == "") {
$(".spa5").text('Please fill in Proposed title');
S_Dan = '1';
}
// if ($("#intro").val() == "") {
// $(".spa6").text('Please fill in category');
// S_Dan = '1';
// }
if ($("#editor").val() == '') {
$(".spa7").text('Please fill in Summary');
S_Dan = '1';
}
if ($("#Keywords").val() == "") {
$(".spa8").text('Please fill in Keywords');
S_Dan = '1';
}
if ($("#time-1").val() == "") {
$(".spa9").text('Please fill in Anticipated deadline');
S_Dan = '1';
}
if ($("input[name='have']:checked").val() == undefined) {
$(".spa11").text('Please tick');
S_Dan = '1';
}
}
if (S_Dan == '1') {
ShowDanger("Incomplete information");
} else {
$(".sub_guest").addClass("disable");
ShowSubmit("Uploading");
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Special/addSpecial',
data: add_mess,
success: function (result) {
if (result.code == 0) {
window.location.href = 'gue_success.html?J_num=' + Jour_num;
} else {
ShowDanger("请求失败!");
$(".sub_guest").removeClass("disable");
$('#tir').fadeOut(500)
}
},
error: function () {
ShowDanger("error");
$(".sub_guest").removeClass("disable");
$('#tir').fadeOut(500)
}
})
}
}
// 客座信息文章列表
function guest_con() {
$.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;
$('.gue_chinese_con .gue_con_title').html(arr_jour.title)
$('.gue_chinese_con .gue_con_email').html(arr_jour.email)
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
});
var con_mess = {};
con_mess.journal_id = localStorage.getItem("Journals_num");
con_mess.pageIndex = 1;
con_mess.pageSize = 20;
var totalPage;//总页码
var totalRecords;//总数据条数
var pageNo = con_mess.pageIndex;//当前页码
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Special/getSpecialList',
data: con_mess,
success: function (result) {
if (result.code == 0) {
totalPage = result.data.count % con_mess.pageSize == 0 ? (result.data.count / con_mess.pageSize) : (Math.ceil(result.data.count / con_mess.pageSize));
totalRecords = result.data.count;
$('.tioashu').html(result.data.count);
// 客座列表
var arr = result.data.specials;
var str = '';
if (Jour_num == '22') {
for (var i = 0; i < arr.length; i++) {
if (new Date(arr[i].deadline).getTime() > new Date().getTime()) {
var mark_k = ''
} else {
var mark_k = '<b style="color: #eb3131;margin-left: 10px">(已关闭)</b>'
}
str += '<li><a href="gue_cont.html?J_num=' + Jour_num + '&Gu_num=' + arr[i].journal_special_id + '" ' +
'target="_blank" class="biaot">' + arr[i].title +
mark_k + '</a>编辑: ' + arr[i].editor +
'<br><span class="rgb_color">投稿截止日期:</span> <b class="rgb_color">' + arr[i].deadline + '</b>' +
'<br><div>关键词: ' + arr[i].keywords + '</div></li>'
}
} else {
for (var i = 0; i < arr.length; i++) {
if (new Date(arr[i].deadline).getTime() > new Date().getTime()) {
var mark_k = ''
} else {
var mark_k = '<b style="color: #eb3131;margin-left: 10px">(Closed)</b>'
}
str += '<li><a href="gue_cont.html?J_num=' + Jour_num + '&Gu_num=' +
arr[i].journal_special_id + '" ' +
'target="_blank" class="biaot">' + arr[i].title +
mark_k + '</a>Edited by ' + arr[i].editor +
'<br><span>submission deadline:</span> <b class="rgb_color">' + arr[i].deadline + '</b>' +
'<br><div>Keywords: ' + arr[i].keywords + '</div></li>'
}
}
$('.guest_ ul').html(str);
$('.guest_>ul>li a.biaot').css('color', localStorage.Journals_color);
if (Jour_num == '22') {
//中文的
kkpager.generPageHtml({
pno: pageNo,
//总页码
total: totalPage,
//总数据条数
totalRecords: totalRecords,
mode: 'click',//默认值是link可选link或者click
click: function (n) {
this.selectPage(n);
//除了第一页写逻辑跳转
con_mess.pageIndex = n;
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Special/getSpecialList',
data: con_mess,
success: function (result) {
if (result.code == 0) {
totalRecords = result.data.count;
// 客座列表
var arr = result.data.specials;
var str = '';
if (Jour_num == '22') {
for (var i = 0; i < arr.length; i++) {
str += '<li><a href="gue_cont.html?J_num=' + Jour_num + '&Gu_num=' + arr[i].journal_special_id + '" ' +
'target="_blank" class="biaot">' + arr[i].title + '</a>编辑: ' + arr[i].editor +
'<br><span class="rgb_color">投稿截止日期:</span> <b class="rgb_color">' + arr[i].deadline + '</b>' +
'<br><div>关键词: ' + arr[i].keywords + '</div></li>'
}
} else {
for (var i = 0; i < arr.length; i++) {
str += '<li><a href="gue_cont.html?J_num=' + Jour_num + '&Gu_num=' + arr[i].journal_special_id + '" ' +
'target="_blank" class="biaot">' + arr[i].title + '</a>Edited by ' + arr[i].editor +
'<br><span class="rgb_color">submission deadline:</span> <b class="rgb_color">' + arr[i].deadline + '</b>' +
'<br><div>Keywords: ' + arr[i].keywords + '</div></li>'
}
}
$('.guest_ ul').html(str);
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
return false;
}, lang: {
firstPageText: '首页',
firstPageTipText: '首页',
lastPageText: '尾页',
lastPageTipText: '尾页',
prePageText: '上一页',
prePageTipText: '上一页',
nextPageText: '下一页',
nextPageTipText: '下一页',
totalPageBeforeText: '&nbsp;共&nbsp',
totalPageAfterText: '&nbsp;页',
currPageBeforeText: '当前第&nbsp;',
currPageAfterText: '&nbsp;页',
totalInfoSplitStr: '&nbsp;',
totalRecordsBeforeText: '',
totalRecordsAfterText: '',
gopageBeforeText: '&nbsp;&nbsp;&nbsp;Go to page',
gopageButtonOkText: 'Go',
gopageAfterText: 'page',
buttonTipBeforeText: '第',
buttonTipAfterText: '页'
}
});
} else {
//生成分页
//有些参数是可选的比如lang若不传有默认值
kkpager.generPageHtml({
pno: pageNo,
//总页码
total: totalPage,
//总数据条数
totalRecords: totalRecords,
mode: 'click',//默认值是link可选link或者click
click: function (n) {
this.selectPage(n);
//除了第一页写逻辑跳转
con_mess.pageIndex = n;
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Special/getSpecialList',
data: con_mess,
success: function (result) {
if (result.code == 0) {
totalRecords = result.data.count;
// 客座列表
var arr = result.data.specials;
var str = '';
for (var i = 0; i < arr.length; i++) {
str += '<li><a href="gue_cont.html?Gu_num=' + arr[i].journal_special_id + '" ' +
'target="_blank" class="biaot">' + arr[i].title + '</a>edited by ' + arr[i].editor +
'<br>submission deadline <b>' + arr[i].deadline + '</b>' +
'<br><div><i>Keywords:</i>' + arr[i].keywords + '</div></li>'
}
$('.guest_ ul').html(str);
$('.guest_>ul>li a.biaot').css('color', localStorage.Journals_color);
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
return false;
}, lang: {
firstPageText: 'First page',
firstPageTipText: 'First page',
lastPageText: 'Last page',
lastPageTipText: 'Last page',
prePageText: 'Previous page',
prePageTipText: 'Previous page',
nextPageText: 'Next page',
nextPageTipText: 'Next page',
totalPageBeforeText: '',
totalPageAfterText: '',
currPageBeforeText: 'on page&nbsp;',
currPageAfterText: '',
totalInfoSplitStr: '&nbsp;of&nbsp;',
totalRecordsBeforeText: '',
totalRecordsAfterText: '',
gopageBeforeText: '&nbsp;&nbsp;&nbsp;Go to page',
gopageButtonOkText: 'Go',
gopageAfterText: 'page',
buttonTipBeforeText: '第',
buttonTipAfterText: '页'
}
});
}
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
}
// 客座信息文章详情
function guest_title() {
var special_id = '';
// 获取地址栏信息
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var Gu_Num = getQueryString('Gu_num'); //客座信息
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Special/getSpecialDetail',
data: { 'journal_special_id': Gu_Num },
success: function (result) {
if (result.code == 0) {
var edit = result.data.editors;
var spe = result.data.special;
var jour = result.data.journal;
var keyw = result.data.keywords;
special_id = spe.journal_special_id
// 客座文章内容
if (Jour_num == '22') {
$('.gue_title').html(spe.title + '专刊');
$('.gue_editor_title').html('专刊编辑');
$('.gue_Infor_title').html('专刊征稿通知');
$('.gue_word_title').html('关键词');
$('.gue_system>a').html('提交稿件');
$('.gue_author>a').html('客座编辑申请');
var g_c = '<a target="_blank" href="/' + jour.usx + '">' + jour.title + '</a> ' +
'(ISSN ' + jour.issn + '). ' +
'<br/>投稿截止日期: ' + spe.deadline.substring(0, 4) + '.' + spe.deadline.substring(5, 7) + '.' + spe.deadline.substring(8, 10);
} else {
if (spe.deadline.substring(5, 7) == '01') {
var data_month = 'Jan. '
}
if (spe.deadline.substring(5, 7) == '02') {
var data_month = 'Feb. '
}
if (spe.deadline.substring(5, 7) == '03') {
var data_month = 'Mar. '
}
if (spe.deadline.substring(5, 7) == '04') {
var data_month = 'Apr. '
}
if (spe.deadline.substring(5, 7) == '05') {
var data_month = 'May. '
}
if (spe.deadline.substring(5, 7) == '06') {
var data_month = 'Jun. '
}
if (spe.deadline.substring(5, 7) == '07') {
var data_month = 'Jul. '
}
if (spe.deadline.substring(5, 7) == '08') {
var data_month = 'Aug. '
}
if (spe.deadline.substring(5, 7) == '09') {
var data_month = 'Sep. '
}
if (spe.deadline.substring(5, 7) == '10') {
var data_month = 'Oct. '
}
if (spe.deadline.substring(5, 7) == '11') {
var data_month = 'Nov. '
}
if (spe.deadline.substring(5, 7) == '12') {
var data_month = 'Dec. '
}
$('.gue_title').html(spe.title);
var g_c = 'Deadline: <font style="color: ' + localStorage.Journals_color + ';">' + data_month + spe.deadline.substring(8, 10) + ', ' + spe.deadline.substring(0, 4) + '.</font>';
}
$('.gue_content').html(g_c);
$('.gue_content a').css('color', localStorage.Journals_color);
var str = '';
for (var i = 0; i < edit.length; i++) {
if (edit[i].website == '') {
var web_ = ''
} else {
var web_ = '<a href="' + edit[i].website + '" target="_blank" style="font-weight: normal;font-size: 14px">Website</a>'
}
// if(edit[i].orcid==''){var orc_ = ''}else{var orc_ = '<b>Interests:</b>'+ edit[i].interests +'<br>'}
if (edit[i].interests == '') {
var int_ = ''
} else {
var int_ = '<br><b>Interests: </b>' + edit[i].interests + '<br>'
}
if (edit[i].email == '') {
var email_ = ''
} else {
var email_ = '<br><b style="margin: 8px 4px 0 0;display: inline-block;">Email: </b>' + edit[i].email
}
if (edit[i].icon == '') {
var per_son = ''
} else {
var per_son = '<img src="' + imgFileUrl + edit[i].icon + '" style="border:0;width: 150px;height: 150px;margin: 0 0 0 300px;border-radius: 25px;"><br/>'
}
if (edit[i].orcid == '') {
var or_cid = ''
} else {
var or_cid = '<a href="https://orcid.org/' + edit[i].orcid + '" target="_blank" style="margin-left: 5px;">' +
'<img src="img/or_id.png" style="width: 13px;"></a>'
}
if (edit[i].orcid != '' && edit[i].website == '') {
var sty_mar = 'margin-left: 18px;'
} else if (edit[i].orcid == '' && edit[i].website != '') {
var sty_mar = 'margin-left: 65px;'
} else if (edit[i].orcid != '' && edit[i].website != '') {
var sty_mar = 'margin-left: 86px;'
} else {
var sty_mar = ''
}
if (Jour_num == '22') {
str += '<li>' + per_son + '<p style="' + sty_mar + '" class="g_ed_name">' +
edit[i].first_name + ' ' + edit[i].last_name + or_cid + ' ' + web_ + '</p>' +
'<p style="text-align: center;">客座编辑</p><br>' +
'' + edit[i].address + email_ + int_ + '</li>';
} else {
str += '<li>' + per_son + '<p style="' + sty_mar + '" class="g_ed_name">' +
edit[i].first_name + ' ' + edit[i].last_name + or_cid + ' ' + web_ + '</p>' +
'<p style="text-align: center;">Guest Editor</p><br>' +
'' + edit[i].address + email_ + int_ + '</li>';
}
}
$('.gue_editor').html(str);
$('.gue_editor li>p.g_ed_name').css('color', localStorage.Journals_color)
$('.gue_editor li>p.g_ed_name>a').css('color', localStorage.Journals_color)
$('.guest_>p').html(spe.abstract);
var str = '';
for (var i = 0; i < keyw.length; i++) {
str += '<b>●</b>' + keyw[i] + '&nbsp;&nbsp;&nbsp;'
}
$('.gue_word').html(str);
// 点击按钮跳转
// $('.guest_content .gue_system a').css('background-color',localStorage.Journals_color)
$('.guest_content .gue_system a').click(function () {
// 判断是否有身份
if ($.cookie("username") != undefined && $.cookie("user_id") != undefined) {
window.open('contribu_list.html?J_num=' + Jour_num + '&&special_id=' + spe.journal_special_id);
} else {
window.open('contribu_login.html?J_num=' + Jour_num + '&&special_id=' + spe.journal_special_id);
}
})
$('.guest_content .gue_author a').click(function () {
window.open('gue_cont_gea.html?J_num=' + Jour_num + '&&Gu_num=' + spe.journal_special_id);
})
// 判断按钮是否要隐藏
if (spe.deadline.substring(0, 4) < 2022) {
$('.gue_system').css('display', 'none');
$('.gue_author').css('display', 'none');
}
} else {
ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
$.ajax({
type: 'post', url: apiUrl + 'subscribe/Special/getSpecialArticles',
data: {
"journal_special_id": Gu_Num
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.articles;
var str = "";
for (var i = 0; i < arr.length; i++) {
if (arr[i].stage_no == '0') {
var act_year = '&nbsp;' + arr[i].stage_year + ',&nbsp;' + arr[i].stage_vol;
} else {
var act_year = '&nbsp;' + arr[i].stage_year + ',&nbsp;' + arr[i].stage_vol + '&nbsp;(' + arr[i].stage_no + ')';
}
if (arr[i].doi == '') {
var doi_ = ''
} else {
var doi_ = 'https://doi.org/' + arr[i].doi
}
if (arr[i].npp == '') {
var npp_ = ''
} else {
var npp_ = ':&nbsp;' + arr[i].npp + '.&nbsp;&nbsp;'
}
if (arr[i].mains == '') {
if (arr[i].file_html == '') {
var html_ = ''
} else {
var html_ = '<img src="img/link_2.png" width="14" height="16"><a href="' + imgFileUrl + 'articleHTML/' + arr[i].file_html + '" target="_blank" class="txt_html" alt="' + arr[i].article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + arr[i].html_num + '</span>&nbsp;)&nbsp;&nbsp;'
}
} else {
var html_ = '<img src="img/link_2.png" width="14" height="16"><a href="article.html?J_num=' + Jour_num + '&a_id=' + arr[i].article_id + '&s_htm=1" target="_blank" class="txt_html" alt="' + arr[i].article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + arr[i].html_num + '</span>&nbsp;)&nbsp;&nbsp;'
}
if (arr[i].file_pdf == '') {
var pdf_ = ''
} else {
var pdf_ = '<img src="img/link_3.jpg" width="14" height="16"><a href="' + imgFileUrl + 'articlePDF/' + arr[i].file_pdf + '" target="_blank" class="txt_pdf" alt="' + arr[i].article_id + '">PDF</a>&nbsp;(&nbsp;<span style="color: red">' + arr[i].pdf_num + '</span>&nbsp;)'
}
if (arr[i].icon == '') {
var img_i = 'img/baiss.png'
} else {
var img_i = imgarticleUrl + arr[i].icon
}
if (arr[i].other_state == 0) {
var otStat = ''
} else if (arr[i].other_state == 1) {
var otStat = '<span class="otStat">Editorial Expression of Concern</span>'
} else if (arr[i].other_state == 2) {
var otStat = '<span class="otStat">Retractedal</span>'
}
if (arr[i].isShowOtime == 1) {
if (arr[i].pub_date == '') {
var pub_date = ''
} else {
var pub_date = '<div class="url_data">Published Date: ' + arr[i].pub_date + '</div>'
}
} else {
var pub_date = ''
}
var c_t_a = '<button class="txt_copy">Cite this article<ul class="export"><li id="txt_copy_' + i + '" class="Exc_1">>> Copy citation information</li><li class="Exc_2"><i class="fa fa-download"></i> Export citation to EndNote</li><li class="Exc_3"><i class="fa fa-download"></i> Export citation to RIS</li><li class="Exc_4"><i class="fa fa-download"></i> Export citation to BibTex</li><li class="Exc_5"><i class="fa fa-download"></i> Export citation to txt</li><div class="triangle"></div></ul></button>'
var link_ = '<img src="img/link_1.png" width="14" height="16"><a class="txt_zhaiyao" alt="' + arr[i].article_id + '">Abstract</a>&nbsp;(&nbsp;<span style="color: red">' + arr[i].abs_num + '</span>&nbsp;)&nbsp;&nbsp;&nbsp;' +
html_ + pdf_ + c_t_a +
'<p class="txt_content">' + arr[i].cite + '</p>' +
'<div>' + arr[i].abstract + '</div>';
if (arr[i].tradition_tag == '' || arr[i].tradition_tag == null) {
var maxwidth = 500;//显示多少字符
if (arr[i].abstract.length > maxwidth) {
var abstNew = arr[i].abstract.replace(/<.*?>/ig, "")
abstNew = abstNew.substring(0, maxwidth)
abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length)
var trad_tion = '<div>' + abstNew + '...</div>'
} else {
var trad_tion = '<div>' + arr[i].abstract + '</div>'
}
} else {
var trad_tion = '<div><h3>' + arr[i].tradition_tag + '</h3><p>' + arr[i].tradition + '</p></div>'
}
// var lr_top = ''
// for (var t = 0; t < arr[i].topic.length; t++) {
// lr_top += '<a href="topic_list.html?J_num='+Jour_num+'&t_id='+ arr[i].topic[t].journal_topic_id +'" target="_blank">' + arr[i].topic[t].title + '</a>'
// }
str += '<li><div class="dbt_header">' + arr[i].type + pub_date +
// '<div class="url_top">'+ lr_top +'</div>' +
'</div><a id="' + arr[i].article_id + '" target="_blank" href="article.html?J_num=' + Jour_num + '&a_id=' + arr[i].article_id + '" class="txt_biaoti">' + otStat + arr[i].title + '</a>' +
'<div class="authorList">' + arr[i].authortitle + ' <br>'
+ localStorage.getItem("Journals_title") + '.' + act_year + npp_ +
'<a target="_blank" href="https://doi.org/' + arr[i].doi + '">' + doi_ + '</a>' +
'</div><div class="links_">' + link_ + '</div><div class="apwrap"><a onclick="imgbig(this)" class="imgdiv"><img src="' + img_i + '" alt=""></a>'
+ trad_tion + '<br clear="both"></div></li>'
}
$('.wenz_list>ul').html(str);
$('.links_ .txt_copy').css('background', localStorage.Journals_color);
// 点击Abstract显示隐藏
$('.txt_zhaiyao').click(function () {
$(this).nextAll('div').toggle();
if ($(this).nextAll('div').css("display") == 'block') {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: { "article_id": $(this).attr('alt'), "type": 'abs' },
success: function (result) {
if (result.code == 0) {
num = num * 1 + 1 * 1
}
}
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: { 'type': Jour_num, 'is_detail': '1' },
success: function (result) {
}
});
$(this).next().html(num);
}
})
$('.txt_html').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: { "article_id": $(this).attr('alt'), "type": 'html' },
success: function (result) {
if (result.code == 0) {
num = num * 1 + 1 * 1
}
}
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: { 'type': Jour_num, 'is_detail': '1' },
success: function (result) {
}
});
$(this).next().html(num);
})
$('.txt_pdf').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: { "article_id": $(this).attr('alt'), "type": 'pdf' },
success: function (result) {
if (result.code == 0) {
num = num * 1 + 1 * 1
}
}
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: { 'type': Jour_num, 'is_detail': '1' },
success: function (result) {
}
});
$(this).next().html(num);
})
// 点击弹窗出现 复制和下载
$('.wenz_list .txt_content').css('display', 'none');
$('.wenz_list .export').css('display', 'none');
$(document).click(function (e) {
if (!$(e.target).is('.export') && !$(e.target).is('.txt_copy')) {
$('.export').hide();
}
})
$('.wenz_list .txt_copy').click(function () {
$('.export').css('display', 'none');
$(this).find('.export').fadeIn(200);
})
$('.wenz_list .Exc_1').click(function () {
var content_ = $(this).parents('.txt_copy').nextAll('.txt_content').text();
var clipboard = new Clipboard('#' + $(this).attr('id'), {
text: function () {
return content_;
}
})
clipboard.on('success', function (e) {
ShowSuccess("Citation information has been copied!");
});
})
$('.wenz_list .Exc_2').click(function () {
var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
$.ajax({
type: 'post', url: apiUrl + 'api/Article/getArticleenw', async: false,
data: { "article_id": ecx_id },
success: function (result) {
var a = document.createElement('a');
a.href = result.data.url;
a.download = ''
a.click();
}
})
})
$('.wenz_list .Exc_3').click(function () {
var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
$.ajax({
type: 'post', url: apiUrl + 'api/Article/getArticleRis', async: false,
data: { "article_id": ecx_id },
success: function (result) {
var a = document.createElement('a');
a.href = result.data.url;
a.download = ''
a.click();
}
})
})
$('.wenz_list .Exc_4').click(function () {
var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
$.ajax({
type: 'post', url: apiUrl + 'api/Article/getArticlebib', async: false,
data: { "article_id": ecx_id },
success: function (result) {
var a = document.createElement('a');
a.href = result.data.url;
a.download = ''
a.click();
}
})
})
$('.wenz_list .Exc_5').click(function () {
var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
$.ajax({
type: 'post', url: apiUrl + 'api/Article/getArticletext', async: false,
data: { "article_id": ecx_id },
success: function (result) {
var a = document.createElement('a');
a.href = result.data.url;
a.download = ''
a.click();
}
})
})
} else {
// ShowDanger("请求失败!");
}
},
error: function () {
ShowDanger("error");
}
})
}
// 客座信息文章详情
function guest_title_gea() {
var special_id = '';
// 获取地址栏信息
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var Gu_Num = getQueryString('Gu_num'); //客座信息
$(".tishi_author").click(function () {
$("#mask").hide();
$(".tishi").fadeOut();
document.body.removeEventListener('touchmove', bodyScroll, false);
$("body").css({ "position": "initial", "height": "auto" });
window.location.href = 'gue_cont.html?J_num=' + Jour_num + '&&Gu_num=' + Gu_Num
});
function bodyScroll(event) {
event.preventDefault();
}
$('.mb_form input.sub_addauthor').css('background-color', localStorage.Journals_color);
$('.mb_form input.sub_addauthor').css('border-color', localStorage.Journals_color);
$('.tishi input.tishi_author').css('background-color', localStorage.Journals_color);
$('.mb_form .my_file>div').css('background-color', localStorage.Journals_color);
// 上传文件
$(".mb_form .my_file>div").click(function () {
$("#ch_file_1").click();
})
$("#ch_file_1").on("change", function () {
//jquery获取input file文件名
var awj = $("#ch_file_1")[0].files;
var wj_f = "";
var formData = new FormData();
formData.append("specialIcon", awj[0]);
$.ajax({
type: 'post', url: apiUrl + 'api/Special/up_icon_file',
data: formData,
processData: false,
contentType: false,
dataType: "json",
success: function (result) {
if (result.code == 0) {
wj_f = '<li id="' + result.upurl + '">' +
'<img src="' + apiUrl + 'specialIcon/' + result.upurl + '" style="width: 30px;height: 30px;margin: 10px 10px 0 0">' +
'<i class="fa fa-trash del_file" style="color: red"></i></li>';
$("#filename_1").html(wj_f);
} else {
ShowDanger("请求失败!");
}
$('.del_file').on('click', function () {
$(this).parent('li').remove();
})
}
})
});
$(".sub_addauthor").click(function () {
var file_list_1 = $('#filename_1 li').attr('id');
$(".spa").text('');
var add_mess = {};
add_mess.journal_id = Jour_num;
add_mess.journal_special_id = Gu_Num;
add_mess.email = $('#email').val();
add_mess.first_name = $('#firstname').val();
add_mess.last_name = $('#lastname').val();
add_mess.address = $('#address').val();
add_mess.interests = $('#interests').val();//0
add_mess.website = $('#website').val();//0
add_mess.orcid = $('#ORCID').val();//0
add_mess.specialIcon = file_list_1;
var S_Dan = '0';
if ($("#firstname").val() == "") {
$(".spa1").text('Please fill in First name');
S_Dan = '1';
}
if ($("#lastname").val() == "") {
$(".spa2").text('Please fill in Last name');
S_Dan = '1';
}
if ($("#email").val() == "") {
$(".spa3").text('Please fill in E-mail');
S_Dan = '1';
}
if ($("#address").val() == "") {
$(".spa4").text('Please fill in Address');
S_Dan = '1';
}
if ($('#filename_1 li').attr('id') != undefined) {
add_mess.specialIcon = 'specialIcon/' + file_list_1;
} else {
add_mess.specialIcon = ''
}
if (S_Dan == '1') {
ShowDanger("Incomplete information");
} else {
$(".sub_addauthor").addClass("disable");
ShowSuccess("Uploading");
$.ajax({
type: 'post', url: apiUrl + 'yuan/Special/addEditor',
data: add_mess,
success: function (result) {
if (result.code == 0) {
$(".tanchu").fadeOut();
$(".tanchu input").val('');
$(".tanchu textarea").val('');
$(".sub_addauthor").removeClass("disable");
$('#tir').fadeOut(500)
$(".tishi").fadeIn();
} else {
ShowDanger("请求失败!");
$(".sub_addauthor").removeClass("disable");
$('#tir').fadeOut(500)
}
},
error: function () {
ShowDanger("error");
$(".sub_addauthor").removeClass("disable");
$('#tir').fadeOut(500)
}
})
}
})
}