@@ -15,9 +15,9 @@ function checkSubmitAlb() { | |||||
$("#gallery .atlas").each(function() { | $("#gallery .atlas").each(function() { | ||||
albums.push({ | albums.push({ | ||||
"img": $(this).find("img").attr("src"), | "img": $(this).find("img").attr("src"), | ||||
"txt": $(this).find("input").val() | |||||
}) | |||||
}) | |||||
"txt": $(this).find("input").val(), | |||||
}); | |||||
}); | |||||
} | } | ||||
$("#albums").val(JSON.stringify(albums)); | $("#albums").val(JSON.stringify(albums)); | ||||
return true; | return true; | ||||
@@ -6,7 +6,7 @@ Date.prototype.Format = function(fmt) { | |||||
"m+" : this.getMinutes(), //分 | "m+" : this.getMinutes(), //分 | ||||
"s+" : this.getSeconds(), //秒 | "s+" : this.getSeconds(), //秒 | ||||
"q+" : Math.floor((this.getMonth() + 3) / 3), //季度 | "q+" : Math.floor((this.getMonth() + 3) / 3), //季度 | ||||
"S" : this.getMilliseconds() //毫秒 | |||||
"S" : this.getMilliseconds(), //毫秒 | |||||
}; | }; | ||||
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); | ||||
for (var k in o) | for (var k in o) | ||||
@@ -106,28 +106,28 @@ async function LoadStatChart() { | |||||
lineTension: .5, | lineTension: .5, | ||||
borderColor: 'rgba(54, 162, 235, 1)', | borderColor: 'rgba(54, 162, 235, 1)', | ||||
backgroundColor: 'rgba(54, 162, 235, 0.1)', | backgroundColor: 'rgba(54, 162, 235, 0.1)', | ||||
borderWidth: 2 | |||||
borderWidth: 2, | |||||
}, { | }, { | ||||
label: 'UV', | label: 'UV', | ||||
data: uvs, | data: uvs, | ||||
lineTension: .5, | lineTension: .5, | ||||
borderColor: 'rgba(255, 206, 86, 1)', | borderColor: 'rgba(255, 206, 86, 1)', | ||||
backgroundColor: 'rgba(255, 206, 86, 0.1)', | backgroundColor: 'rgba(255, 206, 86, 0.1)', | ||||
borderWidth: 2 | |||||
borderWidth: 2, | |||||
}, { | }, { | ||||
label: 'IP', | label: 'IP', | ||||
data: ips, | data: ips, | ||||
lineTension: .5, | lineTension: .5, | ||||
borderColor: 'rgba(255, 99, 132, 1)', | borderColor: 'rgba(255, 99, 132, 1)', | ||||
backgroundColor: 'rgba(255, 99, 132, 0.1)', | backgroundColor: 'rgba(255, 99, 132, 0.1)', | ||||
borderWidth: 2 | |||||
borderWidth: 2, | |||||
}, { | }, { | ||||
label: 'VV', | label: 'VV', | ||||
data: vvs, | data: vvs, | ||||
lineTension: .5, | lineTension: .5, | ||||
borderColor: 'rgba(75, 192, 192, 1)', | borderColor: 'rgba(75, 192, 192, 1)', | ||||
backgroundColor: 'rgba(75, 192, 192, 0.1)', | backgroundColor: 'rgba(75, 192, 192, 0.1)', | ||||
borderWidth: 2 | |||||
borderWidth: 2, | |||||
} | } | ||||
] | ] | ||||
}, | }, | ||||
@@ -1,5 +1,4 @@ | |||||
var BROWSER = {}; | var BROWSER = {}; | ||||
var USERAGENT = navigator.userAgent.toLowerCase(); | |||||
if (BROWSER.safari) { | if (BROWSER.safari) { | ||||
BROWSER.firefox = true; | BROWSER.firefox = true; | ||||
} | } | ||||
@@ -31,7 +31,7 @@ function moveArc(e, obj, cid){ | |||||
ShowMsg('请选择一个或多个文档'); | ShowMsg('请选择一个或多个文档'); | ||||
return; | return; | ||||
} | } | ||||
LoadQuickDiv(e, 'archives_do.php?dopost=moveArchives&qstr=' + qstr + '&channelid=' + cid + '&rnd=' + Math.random(), 'moveArchives', 'auto', '180px'); | |||||
LoadQuickDiv(e, 'archives_do.php?dopost=moveArchives&qstr=' + qstr + '&channelid=' + cid + '&rnd=' + Math.random(), 'moveArchives', 'auto', '300px'); | |||||
ChangeFullDiv('show'); | ChangeFullDiv('show'); | ||||
} | } | ||||
function adArc(aid) { | function adArc(aid) { | ||||
@@ -46,7 +46,7 @@ function cAtts(jname, e, obj) { | |||||
ShowMsg('请选择一个或多个文档'); | ShowMsg('请选择一个或多个文档'); | ||||
return; | return; | ||||
} | } | ||||
LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr=' + qstr + '&dojob=' + jname + '&rnd=' + Math.random(), 'attsDlg', 'auto', '180px'); | |||||
LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr=' + qstr + '&dojob=' + jname + '&rnd=' + Math.random(), 'attsDlg', 'auto', '300px'); | |||||
ChangeFullDiv('show', screeheight); | ChangeFullDiv('show', screeheight); | ||||
} | } | ||||
function delArc(aid) { | function delArc(aid) { | ||||
@@ -58,7 +58,6 @@ function QuickEdit(aid, e, obj) { | |||||
LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid=' + aid + '&rnd=' + Math.random(), 'quickEdit', 'auto', '300px'); | LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid=' + aid + '&rnd=' + Math.random(), 'quickEdit', 'auto', '300px'); | ||||
ChangeFullDiv('show'); | ChangeFullDiv('show'); | ||||
} | } | ||||
//获得选中文件的文件名 | |||||
function getCheckboxItem() { | function getCheckboxItem() { | ||||
var allSel = ""; | var allSel = ""; | ||||
if (document.form2.arcID.value) return document.form2.arcID.value; | if (document.form2.arcID.value) return document.form2.arcID.value; | ||||
@@ -72,7 +71,6 @@ function getCheckboxItem() { | |||||
} | } | ||||
return allSel; | return allSel; | ||||
} | } | ||||
//获得选中其中一个的id | |||||
function getOneItem() { | function getOneItem() { | ||||
var allSel = ''; | var allSel = ''; | ||||
if (document.form2.arcID.value) return document.form2.arcID.value; | if (document.form2.arcID.value) return document.form2.arcID.value; | ||||
@@ -13,9 +13,8 @@ function noselAll() { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//批量删除搜多关键词 | |||||
function delall() { | function delall() { | ||||
DedeConfirm("您确定要删除选定关键词吗").then((v) => { | |||||
DedeConfirm("您确定要删除关键词吗").then((v) => { | |||||
document.form3.dopost.value = 'delall'; | document.form3.dopost.value = 'delall'; | ||||
document.form3.submit(); | document.form3.submit(); | ||||
}).catch((e) => { | }).catch((e) => { | ||||
@@ -1,13 +1,11 @@ | |||||
var currentStep = 1; | var currentStep = 1; | ||||
var hasNewVer = false; | var hasNewVer = false; | ||||
//步骤 | |||||
function dedeAlter(msg, t = 'info', loading = false) { | function dedeAlter(msg, t = 'info', loading = false) { | ||||
let loadingStr = loading ? '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>' : ''; | let loadingStr = loading ? '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>' : ''; | ||||
return `<div class="alert alert-${t}">${loadingStr} | return `<div class="alert alert-${t}">${loadingStr} | ||||
${msg} | ${msg} | ||||
</div>`; | </div>`; | ||||
} | } | ||||
//显示步骤区域 | |||||
function showStepArea(step) { | function showStepArea(step) { | ||||
$(".stepArea").hide(); | $(".stepArea").hide(); | ||||
$(".btnStep").hide(); | $(".btnStep").hide(); | ||||
@@ -7,7 +7,6 @@ function delArc(mid) { | |||||
if (mid==0) mid = getOneItem(); | if (mid==0) mid = getOneItem(); | ||||
location="member_do.php?id="+qstr+"&dopost=delmembers"; | location="member_do.php?id="+qstr+"&dopost=delmembers"; | ||||
} | } | ||||
//获得选中文件的文件名 | |||||
function getCheckboxItem() { | function getCheckboxItem() { | ||||
var allSel=""; | var allSel=""; | ||||
if (document.form2.mid.value) return document.form2.mid.value; | if (document.form2.mid.value) return document.form2.mid.value; | ||||
@@ -21,7 +20,6 @@ function getCheckboxItem() { | |||||
} | } | ||||
return allSel; | return allSel; | ||||
} | } | ||||
//获得选中其中一个的id | |||||
function getOneItem() { | function getOneItem() { | ||||
var allSel=""; | var allSel=""; | ||||
if (document.form2.mid.value) return document.form2.mid.value; | if (document.form2.mid.value) return document.form2.mid.value; | ||||
@@ -4,18 +4,18 @@ function SelectImage(sform, stype) { | |||||
let frm = document.getElementsByName(s[0]); | let frm = document.getElementsByName(s[0]); | ||||
let ipt = document.getElementsByName(s[1]); | let ipt = document.getElementsByName(s[1]); | ||||
let tmp = document.createElement("input"); | let tmp = document.createElement("input"); | ||||
tmp.id = 'field'+s[1]; | |||||
tmp.id = "field" + s[1]; | |||||
tmp.type = "file"; | tmp.type = "file"; | ||||
tmp.style.display = 'none'; | |||||
tmp.style.display = "none"; | |||||
if ($(`#${tmp.id}`).length === 0) { | if ($(`#${tmp.id}`).length === 0) { | ||||
$(frm).append(tmp); | $(frm).append(tmp); | ||||
} | } | ||||
$(`#${tmp.id}`).click(); | $(`#${tmp.id}`).click(); | ||||
$(`#${tmp.id}`).off('change').change(function (val) { | |||||
$(`#${tmp.id}`).off("change").change(function (val) { | |||||
const f = val.target.files[0]; | const f = val.target.files[0]; | ||||
var formData = new FormData(); | var formData = new FormData(); | ||||
var fileData = f; | var fileData = f; | ||||
formData.append('file', fileData); | |||||
formData.append("file", fileData); | |||||
$.ajax({ | $.ajax({ | ||||
url: '../user/api.php?action=upload&type=litpic', | url: '../user/api.php?action=upload&type=litpic', | ||||
type: 'POST', | type: 'POST', | ||||
@@ -44,7 +44,6 @@ $(document).ready(function() { | |||||
"linkedCalendars": false, | "linkedCalendars": false, | ||||
"timePicker": true, | "timePicker": true, | ||||
"timePicker24Hour": true, | "timePicker24Hour": true, | ||||
//"timePickerSeconds": true, | |||||
"showCustomRangeLabel": false, | "showCustomRangeLabel": false, | ||||
ranges: { | ranges: { | ||||
'今日': [moment(), moment()], | '今日': [moment(), moment()], | ||||
@@ -30,7 +30,7 @@ function selNext(oj, v) { | |||||
} | } | ||||
//子类改变事件 | //子类改变事件 | ||||
function ChangeSon() { | function ChangeSon() { | ||||
//由于支持3级联动,所以这里需要对自己改变进行重构 | |||||
//由于支持3级联动,所以这里需要对自己改变进行重构 | |||||
var emname = this.name.replace('_son', ''); | var emname = this.name.replace('_son', ''); | ||||
if (document.getElementById(emname + '_sec')) { | if (document.getElementById(emname + '_sec')) { | ||||
var oj = document.getElementById(emname + '_sec'); | var oj = document.getElementById(emname + '_sec'); | ||||
@@ -52,13 +52,13 @@ function ChangeSon() { | |||||
clear(oj); | clear(oj); | ||||
if (selv == 0) { | if (selv == 0) { | ||||
aOption = document.createElement('OPTION'); | aOption = document.createElement('OPTION'); | ||||
aOption.text = '请选择..'; | |||||
aOption.text = '请选择'; | |||||
aOption.value = '0'; | aOption.value = '0'; | ||||
oj.options.add(aOption); | oj.options.add(aOption); | ||||
return; | return; | ||||
} else { | } else { | ||||
aOption = document.createElement('OPTION'); | aOption = document.createElement('OPTION'); | ||||
aOption.text = '请选择..'; | |||||
aOption.text = '请选择'; | |||||
aOption.value = '0'; | aOption.value = '0'; | ||||
oj.options.add(aOption); | oj.options.add(aOption); | ||||
} | } | ||||
@@ -114,13 +114,13 @@ function selNextSon() { | |||||
clear(oj); | clear(oj); | ||||
if (selv == 0) { | if (selv == 0) { | ||||
aOption = document.createElement('OPTION'); | aOption = document.createElement('OPTION'); | ||||
aOption.text = '请选择..'; | |||||
aOption.text = '请选择'; | |||||
aOption.value = '0'; | aOption.value = '0'; | ||||
oj.options.add(aOption); | oj.options.add(aOption); | ||||
return; | return; | ||||
} else { | } else { | ||||
aOption = document.createElement('OPTION'); | aOption = document.createElement('OPTION'); | ||||
aOption.text = '请选择..'; | |||||
aOption.text = '请选择'; | |||||
aOption.value = '0'; | aOption.value = '0'; | ||||
oj.options.add(aOption); | oj.options.add(aOption); | ||||
} | } | ||||
@@ -156,7 +156,7 @@ function MakeTopSelect(emname, selvalue) { | |||||
var sonvalue = 0; | var sonvalue = 0; | ||||
var secvalue = 0; | var secvalue = 0; | ||||
aOption = document.createElement('OPTION'); | aOption = document.createElement('OPTION'); | ||||
aOption.text = '请选择..'; | |||||
aOption.text = '请选择'; | |||||
aOption.value = 0; | aOption.value = 0; | ||||
selObj.options.add(aOption); | selObj.options.add(aOption); | ||||
var fkey = Object.keys(selarr)[0]; | var fkey = Object.keys(selarr)[0]; | ||||
@@ -164,7 +164,7 @@ function MakeTopSelect(emname, selvalue) { | |||||
if (selvalue % 500 == 0) { | if (selvalue % 500 == 0) { | ||||
topvalue = selvalue; | topvalue = selvalue; | ||||
} | } | ||||
//如果是小数,则依次取出顶级数值,二级数值以及三级数值 | |||||
//如果是小数,则依次取出顶级数值,二级数值以及三级数值 | |||||
else if (!!(selvalue % 1)) { | else if (!!(selvalue % 1)) { | ||||
secvalue = selvalue; | secvalue = selvalue; | ||||
sonvalue = Math.floor(selvalue); | sonvalue = Math.floor(selvalue); | ||||
@@ -190,7 +190,6 @@ function MakeTopSelect(emname, selvalue) { | |||||
selObj.options.add(aOption); | selObj.options.add(aOption); | ||||
} | } | ||||
} | } | ||||
document.getElementById('span_' + emname).appendChild(selObj); | document.getElementById('span_' + emname).appendChild(selObj); | ||||
//如果子类存在值,创建子类 | //如果子类存在值,创建子类 | ||||
selObj = document.createElement("select"); | selObj = document.createElement("select"); | ||||
@@ -199,7 +198,7 @@ function MakeTopSelect(emname, selvalue) { | |||||
selObj.className = "form-control admin-input-sm mr-2"; | selObj.className = "form-control admin-input-sm mr-2"; | ||||
selObj.onchange = ChangeSon; | selObj.onchange = ChangeSon; | ||||
aOption = document.createElement('OPTION'); | aOption = document.createElement('OPTION'); | ||||
aOption.text = '请选择..'; | |||||
aOption.text = '请选择'; | |||||
aOption.value = 0; | aOption.value = 0; | ||||
selObj.options.add(aOption); | selObj.options.add(aOption); | ||||
//当大类有值输出子类 | //当大类有值输出子类 | ||||
@@ -231,7 +230,6 @@ function MakeTopSelect(emname, selvalue) { | |||||
} else { | } else { | ||||
document.getElementById('span_' + emname + '_son').style.display = "none"; | document.getElementById('span_' + emname + '_son').style.display = "none"; | ||||
} | } | ||||
//若存在第三级则创建 | //若存在第三级则创建 | ||||
if (secvalue > 0) { | if (secvalue > 0) { | ||||
selObj = document.createElement("select"); | selObj = document.createElement("select"); | ||||
@@ -239,7 +237,7 @@ function MakeTopSelect(emname, selvalue) { | |||||
selObj.id = emname + '_sec'; | selObj.id = emname + '_sec'; | ||||
selObj.onchange = ChangeSec; | selObj.onchange = ChangeSec; | ||||
aOption = document.createElement('OPTION'); | aOption = document.createElement('OPTION'); | ||||
aOption.text = '请选择..'; | |||||
aOption.text = '请选择'; | |||||
selObj.className = "form-control admin-input-sm mr-2"; | selObj.className = "form-control admin-input-sm mr-2"; | ||||
aOption.value = 0; | aOption.value = 0; | ||||
selObj.options.add(aOption); | selObj.options.add(aOption); | ||||
@@ -1,6 +1,6 @@ | |||||
function checkSubmit(t) { | function checkSubmit(t) { | ||||
if (document.addcontent.title.value == "") { | if (document.addcontent.title.value == "") { | ||||
ShowMsg(`文档标题不能为空`); | |||||
ShowMsg("文档标题不能为空"); | |||||
document.addcontent.title.focus(); | document.addcontent.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||