@@ -50,7 +50,7 @@ if ($dopost != 'save') { | |||||
if (!isset($delzip)) $delzip = 0; | if (!isset($delzip)) $delzip = 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -63,7 +63,7 @@ if ($dopost != 'save') { | |||||
if (!isset($ddisfirst)) $ddisfirst = 0; | if (!isset($ddisfirst)) $ddisfirst = 0; | ||||
if (!isset($delzip)) $delzip = 0; | if (!isset($delzip)) $delzip = 0; | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -50,7 +50,7 @@ if ($dopost != 'save') { | |||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -49,7 +49,7 @@ if ($dopost != 'save') { | |||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (!isset($writer)) $writer = ''; | if (!isset($writer)) $writer = ''; | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -38,7 +38,7 @@ if ($dopost != 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/libraries/oxwindow.class.php'); | require_once(DEDEINC.'/libraries/oxwindow.class.php'); | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -35,7 +35,7 @@ if ($dopost != 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/libraries/oxwindow.class.php'); | require_once(DEDEINC.'/libraries/oxwindow.class.php'); | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -52,7 +52,7 @@ if ($dopost != 'save') { | |||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(1000,6000) : $cfg_arc_click); | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -55,7 +55,7 @@ if ($dopost != 'save') { | |||||
if (!isset($dellink)) $dellink = 0; | if (!isset($dellink)) $dellink = 0; | ||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -86,7 +86,7 @@ function OpenMyWin(surl) { | |||||
} | } | ||||
function OpenMyWinCoOne(surl) { | function OpenMyWinCoOne(surl) { | ||||
var pos = GetWinPos(800,600); | var pos = GetWinPos(800,600); | ||||
window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ",top=" + pos.top); | |||||
window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||||
} | } | ||||
function InitPage() { | function InitPage() { | ||||
var selsource = $Obj('selsource'); | var selsource = $Obj('selsource'); | ||||
@@ -258,28 +258,6 @@ function ShowUrlTrEdit() { | |||||
function CkRemote() { | function CkRemote() { | ||||
document.getElementById('picname').value = ''; | document.getElementById('picname').value = ''; | ||||
} | } | ||||
//文档列表快捷属性弹出 | |||||
function LoadQuickDiv(e, surl, oname, w, h) { | |||||
var newobj = $Obj(oname); | |||||
if (!newobj) { | |||||
newobj = document.createElement("div"); | |||||
newobj.id = oname; | |||||
newobj.style.position = 'fixed'; | |||||
newobj.className = 'pubdlg'; | |||||
newobj.style.width = w; | |||||
newobj.style.height = h + 30; | |||||
document.body.appendChild(newobj); | |||||
} | |||||
newobj.style.top = "50%"; | |||||
newobj.style.left = "50%"; | |||||
newobj.style.display = 'block'; | |||||
newobj.style.transform = "translate(-50%, -201px)"; | |||||
newobj.innerHTML = '<img src="../../static/web/img/loadinglit.gif">'; | |||||
fetch(surl).then(resp => resp.text()).then((d) => { | |||||
newobj.innerHTML = d; | |||||
}); | |||||
fixupPos = false; | |||||
} | |||||
//复制文档到剪切板 | //复制文档到剪切板 | ||||
function copyToClipboard(txt) { | function copyToClipboard(txt) { | ||||
if (txt == null || txt == '') { | if (txt == null || txt == '') { | ||||
@@ -322,6 +300,28 @@ function getSelTxt() { | |||||
} | } | ||||
return g; | return g; | ||||
} | } | ||||
//文档列表快捷属性弹出 | |||||
function LoadQuickDiv(e, surl, oname, w, h) { | |||||
var newobj = $Obj(oname); | |||||
if (!newobj) { | |||||
newobj = document.createElement("div"); | |||||
newobj.id = oname; | |||||
newobj.style.position = 'fixed'; | |||||
newobj.className = 'pubdlg'; | |||||
newobj.style.width = w; | |||||
newobj.style.height = h + 30; | |||||
document.body.appendChild(newobj); | |||||
} | |||||
newobj.style.top = "50%"; | |||||
newobj.style.left = "50%"; | |||||
newobj.style.display = 'block'; | |||||
newobj.style.transform = "translate(-50%, -201px)"; | |||||
newobj.innerHTML = '<img src="../../static/web/img/loadinglit.gif">'; | |||||
fetch(surl).then(resp => resp.text()).then((d) => { | |||||
newobj.innerHTML = d; | |||||
}); | |||||
fixupPos = false; | |||||
} | |||||
//显示副栏目 | //显示副栏目 | ||||
function ShowCatMap(e, obj, cid, targetId, oldvalue) { | function ShowCatMap(e, obj, cid, targetId, oldvalue) { | ||||
fixupPos = true; | fixupPos = true; | ||||
@@ -379,7 +379,7 @@ function __DedeConfirmRun(modalID) { | |||||
function __DedeConfirmRunClose(modalID) { | function __DedeConfirmRunClose(modalID) { | ||||
_DedeConfirmFuncsClose[modalID](); | _DedeConfirmFuncsClose[modalID](); | ||||
} | } | ||||
function DedeConfirm(content="",title="确认提示") { | |||||
function DedeConfirm(content = "", title = "确认提示") { | |||||
let modalID = guid(); | let modalID = guid(); | ||||
return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
_DedeConfirmFuncs[modalID] = ()=>{ | _DedeConfirmFuncs[modalID] = ()=>{ | ||||
@@ -407,6 +407,7 @@ function DedeConfirm(content="",title="确认提示") { | |||||
//函数会返回一个modalID,通过这个id可自已定义一些方法,这里用到了一个展开语法:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax | //函数会返回一个modalID,通过这个id可自已定义一些方法,这里用到了一个展开语法:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax | ||||
function ShowMsg(content, ...args) { | function ShowMsg(content, ...args) { | ||||
title = "系统提示"; | title = "系统提示"; | ||||
size = ""; | |||||
if (typeof content == "undefined") content = ""; | if (typeof content == "undefined") content = ""; | ||||
modalID = guid(); | modalID = guid(); | ||||
var footer = `<button type="button" class="btn btn-primary btn-sm" onClick="CloseModal(\'GKModal${modalID}\')">确定</button>`; | var footer = `<button type="button" class="btn btn-primary btn-sm" onClick="CloseModal(\'GKModal${modalID}\')">确定</button>`; | ||||
@@ -47,7 +47,7 @@ if ($dopost != 'save') { | |||||
if (!isset($dellink)) $dellink = 0; | if (!isset($dellink)) $dellink = 0; | ||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -76,7 +76,7 @@ if ($dopost != 'save') { | |||||
if (!isset($dellink)) $dellink = 0; | if (!isset($dellink)) $dellink = 0; | ||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -369,8 +369,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
return false; | return false; | ||||
} | } | ||||
if (document.form1.typeid.value == 0) { | if (document.form1.typeid.value == 0) { | ||||
@@ -411,8 +411,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -304,8 +304,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
return false; | return false; | ||||
} | } | ||||
if (document.form1.typeid.value == 0) { | if (document.form1.typeid.value == 0) { | ||||
@@ -296,8 +296,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -133,8 +133,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
return false; | return false; | ||||
} | } | ||||
if (document.form1.typeid.value == 0) { | if (document.form1.typeid.value == 0) { | ||||
@@ -135,8 +135,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -318,8 +318,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
return false; | return false; | ||||
} | } | ||||
if (document.form1.typeid.value == 0) { | if (document.form1.typeid.value == 0) { | ||||
@@ -301,8 +301,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -22,7 +22,7 @@ | |||||
<div id="list2" style="display:none"><p>[field:typelink/] - <a href="[field:arcurl/]">[field:title/]</a></p></div> | <div id="list2" style="display:none"><p>[field:typelink/] - <a href="[field:arcurl/]">[field:title/]</a></p></div> | ||||
<div id="list3" style="display:none"><p>[field:imglink/]</p><p>[field:textlink/]</p></div> | <div id="list3" style="display:none"><p>[field:imglink/]</p><p>[field:textlink/]</p></div> | ||||
<div id="list4" style="display:none"><p><a href="[field:arcurl/]">[field:title/]</a></p><p><a href="[field:arcurl/]">[field:description/]</a></p><p><span>日期:[field:pubdate function="MyDate('Y-m-d', @me)"/]</span><span>浏览:[field:click/]</span><span>好评:[field:scores/]</span></p></div> | <div id="list4" style="display:none"><p><a href="[field:arcurl/]">[field:title/]</a></p><p><a href="[field:arcurl/]">[field:description/]</a></p><p><span>日期:[field:pubdate function="MyDate('Y-m-d', @me)"/]</span><span>浏览:[field:click/]</span><span>好评:[field:scores/]</span></p></div> | ||||
<form action="freelist_add.php" method="post" name="form1" onSubmit="return CheckSubmit();"> | |||||
<form name="form1" action="freelist_add.php" method="post" onSubmit="return CheckSubmit();"> | |||||
<input type="hidden" name="dopost" value="save"> | <input type="hidden" name="dopost" value="save"> | ||||
<table align="center" class="table maintable my-3"> | <table align="center" class="table maintable my-3"> | ||||
<tr> | <tr> | ||||
@@ -37,7 +37,7 @@ | |||||
<td colspan="2"> | <td colspan="2"> | ||||
<table class="w-100 table-borderless"> | <table class="w-100 table-borderless"> | ||||
<tr> | <tr> | ||||
<td width="25%" height="126"> | |||||
<td width="25%"> | |||||
<label><img src="../static/web/img/g_t2.jpg"><input type="radio" name="liststyle" onclick="ChangeListStyle()" value="1"></label> | <label><img src="../static/web/img/g_t2.jpg"><input type="radio" name="liststyle" onclick="ChangeListStyle()" value="1"></label> | ||||
</td> | </td> | ||||
<td width="25%"> | <td width="25%"> | ||||
@@ -183,11 +183,13 @@ | |||||
</table> | </table> | ||||
</form> | </form> | ||||
<script> | <script> | ||||
var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), { | |||||
lineNumbers: true, | |||||
lineWrapping: true, | |||||
mode: 'text/html' | |||||
}); | |||||
function CheckSubmit() { | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("请输入自由列表标题"); | |||||
document.form1.title.focus(); | |||||
return false; | |||||
} | |||||
} | |||||
function ChangeListStyle() { | function ChangeListStyle() { | ||||
var itxt = document.getElementById("myinnertext"); | var itxt = document.getElementById("myinnertext"); | ||||
var myems = document.getElementsByName("liststyle"); | var myems = document.getElementsByName("liststyle"); | ||||
@@ -209,14 +211,13 @@ | |||||
var pos = GetWinPos(800,600); | var pos = GetWinPos(800,600); | ||||
window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | ||||
} | } | ||||
function CheckSubmit() { | |||||
if (document.form1.title.value == "") { | |||||
ShowMsg("自由列表标题标题不能为空"); | |||||
document.form1.title.focus(); | |||||
return false; | |||||
} | |||||
return true; | |||||
} | |||||
</script> | |||||
<script> | |||||
var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), { | |||||
lineNumbers: true, | |||||
lineWrapping: true, | |||||
mode: 'text/html' | |||||
}); | |||||
</script> | </script> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -183,6 +183,13 @@ | |||||
</table> | </table> | ||||
</form> | </form> | ||||
<script> | <script> | ||||
function CheckSubmit() { | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("请输入自由列表标题"); | |||||
document.form1.title.focus(); | |||||
return false; | |||||
} | |||||
} | |||||
function ChangeListStyle() { | function ChangeListStyle() { | ||||
var itxt = document.getElementById("myinnertext"); | var itxt = document.getElementById("myinnertext"); | ||||
var myems = document.getElementsByName("liststyle"); | var myems = document.getElementsByName("liststyle"); | ||||
@@ -204,14 +211,6 @@ | |||||
var pos = GetWinPos(800,600); | var pos = GetWinPos(800,600); | ||||
window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | ||||
} | } | ||||
function CheckSubmit() { | |||||
if (document.form1.title.value == "") { | |||||
ShowMsg("自由列表标题标题不能为空"); | |||||
document.form1.title.focus(); | |||||
return false; | |||||
} | |||||
return true; | |||||
} | |||||
</script> | </script> | ||||
<script> | <script> | ||||
var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), { | var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), { | ||||
@@ -71,12 +71,14 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function CheckSubmit() { | function CheckSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请设置标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("附件标题不能为空"); | |||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
</script> | |||||
<script> | |||||
var startNum = 6; | var startNum = 6; | ||||
function MakeUpload() { | function MakeUpload() { | ||||
var upfield = document.getElementById("uploadfield"); | var upfield = document.getElementById("uploadfield"); | ||||
@@ -80,8 +80,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function CheckSubmit() { | function CheckSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请设置标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("附件标题不能为空"); | |||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -467,8 +467,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
return false; | return false; | ||||
} | } | ||||
if (document.form1.typeid.value == 0) { | if (document.form1.typeid.value == 0) { | ||||
@@ -431,8 +431,8 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
ShowMsg("请输入文档标题"); | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("文档标题不能为空"); | |||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -285,7 +285,7 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("请输入专题标题"); | ShowMsg("请输入专题标题"); | ||||
return false; | return false; | ||||
} | } | ||||
@@ -296,6 +296,17 @@ | |||||
} | } | ||||
} | } | ||||
} | } | ||||
function CheckVal(id) { | |||||
var notename = $DE('notename' + id); | |||||
var arcid = $DE('arcid' + id); | |||||
if (arcid.value != "") { | |||||
if (notename.value == "") { | |||||
$DE('notename' + id).focus(); | |||||
ShowMsg('请输入' + id + '名称'); | |||||
return false; | |||||
} | |||||
} | |||||
} | |||||
</script> | </script> | ||||
<script> | <script> | ||||
function SelectArcList(fname) { | function SelectArcList(fname) { | ||||
@@ -310,17 +321,6 @@ | |||||
var pos = GetWinPos(800,600); | var pos = GetWinPos(800,600); | ||||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | ||||
} | } | ||||
function CheckVal(id) { | |||||
var notename = $DE('notename' + id); | |||||
var arcid = $DE('arcid' + id); | |||||
if (arcid.value != "") { | |||||
if (notename.value == "") { | |||||
$DE('notename' + id).focus(); | |||||
ShowMsg('您的节点' + id + '名称不能为空'); | |||||
return false; | |||||
} | |||||
} | |||||
} | |||||
</script> | </script> | ||||
<script>InitPage();</script> | <script>InitPage();</script> | ||||
</body> | </body> |
@@ -355,27 +355,11 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("请输入专题标题"); | ShowMsg("请输入专题标题"); | ||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
} | } | ||||
} | |||||
</script> | |||||
<script> | |||||
function SelectTemplets(fname) { | |||||
var pos = GetWinPos(800,600); | |||||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||||
} | |||||
function SelectArcList(fname) { | |||||
var pos = GetWinPos(800,600); | |||||
window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=700,height=500,left=" + pos.left + ", top=" + pos.top); | |||||
} | |||||
function checkSubmit() { | |||||
if (document.form1.title.value == "") { | |||||
ShowMsg("专题名称不能为空"); | |||||
return false; | |||||
} | |||||
for (i = 1; i <= 6; i++) { | for (i = 1; i <= 6; i++) { | ||||
$val = CheckVal(i); | $val = CheckVal(i); | ||||
if ($val == false) { | if ($val == false) { | ||||
@@ -389,12 +373,22 @@ | |||||
if (arcid.value != "") { | if (arcid.value != "") { | ||||
if (notename.value == "") { | if (notename.value == "") { | ||||
$DE('notename' + id).focus(); | $DE('notename' + id).focus(); | ||||
ShowMsg('您的节点' + id + '名称不能为空'); | |||||
ShowMsg('请输入' + id + '名称'); | |||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> | ||||
<script> | |||||
function SelectTemplets(fname) { | |||||
var pos = GetWinPos(800,600); | |||||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||||
} | |||||
function SelectArcList(fname) { | |||||
var pos = GetWinPos(800,600); | |||||
window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=700,height=500,left=" + pos.left + ", top=" + pos.top); | |||||
} | |||||
</script> | |||||
<script>InitPage();</script> | <script>InitPage();</script> | ||||
</body> | </body> | ||||
</html> | </html> |
@@ -80,7 +80,7 @@ | |||||
</form> | </form> | ||||
<script> | <script> | ||||
function checkSubmit() { | function checkSubmit() { | ||||
if (document.form1.title.value == "") { | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("页面名称不能为空"); | ShowMsg("页面名称不能为空"); | ||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
@@ -85,7 +85,7 @@ | |||||
<script> | <script> | ||||
function checkSubmit() | function checkSubmit() | ||||
{ | { | ||||
if (document.form1.title.value == "") { | |||||
if (document.form1.title.value == '') { | |||||
ShowMsg("页面名称不能为空"); | ShowMsg("页面名称不能为空"); | ||||
document.form1.title.focus(); | document.form1.title.focus(); | ||||
return false; | return false; | ||||
@@ -37,22 +37,19 @@ function __DedeConfirmRun(modalID) { | |||||
function __DedeConfirmRunClose(modalID) { | function __DedeConfirmRunClose(modalID) { | ||||
_DedeConfirmFuncsClose[modalID](); | _DedeConfirmFuncsClose[modalID](); | ||||
} | } | ||||
function DedeConfirm(content="",title="确认提示") { | |||||
function DedeConfirm(content = "", title = "确认提示") { | |||||
let modalID = guid(); | let modalID = guid(); | ||||
return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
_DedeConfirmFuncs[modalID] = ()=>{ | |||||
_DedeConfirmFuncs[modalID] = () => { | |||||
resolve("success"); | resolve("success"); | ||||
CloseModal(`DedeModal${modalID}`); | CloseModal(`DedeModal${modalID}`); | ||||
} | } | ||||
_DedeConfirmFuncsClose[modalID] = ()=>{ | |||||
_DedeConfirmFuncsClose[modalID] = () => { | |||||
reject("cancel"); | reject("cancel"); | ||||
CloseModal(`DedeModal${modalID}`); | CloseModal(`DedeModal${modalID}`); | ||||
} | } | ||||
let footer = `<button type="button" class="btn btn-success btn-sm" onClick="__DedeConfirmRun(\'${modalID}\')">确定</button> <button type="button" class="btn btn-outline-success btn-sm" onClick="__DedeConfirmRunClose(\'${modalID}\')">取消</button>`; | let footer = `<button type="button" class="btn btn-success btn-sm" onClick="__DedeConfirmRun(\'${modalID}\')">确定</button> <button type="button" class="btn btn-outline-success btn-sm" onClick="__DedeConfirmRunClose(\'${modalID}\')">取消</button>`; | ||||
let modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}"> | |||||
<div class="modal-dialog modal-dialog-centered" role="document"> | |||||
<div class="modal-content"><div class="modal-header"> | |||||
<h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`;modal +=`<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>×</span></button>`; | |||||
let modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`;modal +=`<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>×</span></button>`; | |||||
modal += `</div><div class="modal-body">${content}</div><div class="modal-footer">${footer}</div></div></div></div>`; | modal += `</div><div class="modal-body">${content}</div><div class="modal-footer">${footer}</div></div></div></div>`; | ||||
$("body").append(modal) | $("body").append(modal) | ||||
$("#DedeModal" + modalID).modal({ | $("#DedeModal" + modalID).modal({ | ||||
@@ -88,10 +85,7 @@ function ShowMsg(content, ...args) { | |||||
} | } | ||||
footer = footer.replaceAll("~modalID~", modalID); | footer = footer.replaceAll("~modalID~", modalID); | ||||
content = content.replaceAll("~modalID~", modalID); | content = content.replaceAll("~modalID~", modalID); | ||||
var modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}"> | |||||
<div class="modal-dialog modal-dialog-centered" role="document"> | |||||
<div class="modal-content"><div class="modal-header"> | |||||
<h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`; | |||||
var modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-header"><h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`; | |||||
if (!noClose) { | if (!noClose) { | ||||
modal += `<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>×</span></button>`; | modal += `<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span>×</span></button>`; | ||||
} | } | ||||
@@ -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; | ||||
} | } | ||||
@@ -227,14 +227,12 @@ class FreeList | |||||
} | } | ||||
//保存文件 | //保存文件 | ||||
$this->dtp->SaveTo($makeFile); | $this->dtp->SaveTo($makeFile); | ||||
echo "<div class=\"alert alert-success\">成功创建:<a href='".preg_replace("#\/{1,}#", "/", $murl)."' target='_blank'>".preg_replace("#\/{1,}#", "/", $murl)."</a></div><br>"; | |||||
} | } | ||||
if ($this->FLInfos['nodefault'] == 0) { | if ($this->FLInfos['nodefault'] == 0) { | ||||
$murl = '/'.str_replace('{cmspath}', $GLOBALS['cfg_cmspath'], $this->FLInfos['listdir']); | $murl = '/'.str_replace('{cmspath}', $GLOBALS['cfg_cmspath'], $this->FLInfos['listdir']); | ||||
$murl .= '/'.$this->FLInfos['defaultpage']; | $murl .= '/'.$this->FLInfos['defaultpage']; | ||||
$indexfile = $GLOBALS['cfg_basedir'].$murl; | $indexfile = $GLOBALS['cfg_basedir'].$murl; | ||||
$murl = preg_replace("#\/{1,}#", "/", $murl); | $murl = preg_replace("#\/{1,}#", "/", $murl); | ||||
echo "<div class=\"alert alert-success\">复制:$firstFile 为 ".$this->FLInfos['defaultpage']."</div><br>"; | |||||
copy($firstFile, $indexfile); | copy($firstFile, $indexfile); | ||||
} | } | ||||
$this->Close(); | $this->Close(); | ||||
@@ -17,7 +17,7 @@ $flag = ''; | |||||
$autokey = $remote = $dellink = $autolitpic = 0; | $autokey = $remote = $dellink = $autolitpic = 0; | ||||
$userip = GetIP(); | $userip = GetIP(); | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
@@ -15,7 +15,7 @@ $flag = ''; | |||||
$typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; | $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; | ||||
$userip = GetIP(); | $userip = GetIP(); | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg("请输入文档标题", "-1"); | |||||
ShowMsg("文档标题不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||