Browse Source

6.0.4快捷窗口调整最后界面调整

tags/6.0.4^2
xushubieli 2 years ago
parent
commit
f65a9f6ec9
7 changed files with 115 additions and 147 deletions
  1. +90
    -117
      src/dede/catalog_edit.php
  2. +15
    -21
      src/dede/js/dialog.js
  3. +1
    -2
      src/dede/templets/article_add.htm
  4. +3
    -1
      src/dede/templets/article_edit.htm
  5. +2
    -2
      src/dede/templets/catalog_main.htm
  6. +2
    -2
      src/dede/templets/index_menu2.htm
  7. +2
    -2
      src/dede/templets/login.htm

+ 90
- 117
src/dede/catalog_edit.php View File

@@ -1,5 +1,4 @@
<?php
/**
* 栏目编辑
*
@@ -13,13 +12,10 @@ require_once(dirname(__FILE__)."/config.php");
require_once(DEDEINC."/typelink.class.php");
if (empty($dopost)) $dopost = '';
$id = isset($id) ? intval($id) : 0;
//检查权限许可
CheckPurview('t_Edit,t_AccEdit');
//检查栏目操作许可
CheckCatalog($id, '你无权更改本栏目!');
CheckCatalog($id, '你无权更改本栏目');
/*-----------------------
function action_save()
----------------------*/
@@ -33,78 +29,72 @@ if ($dopost == "save") {
$uptopsql = " ,siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' ";
}
if ($ispart != 0) $cross = 0;
$upquery = "UPDATE `#@__arctype` SET
issend='$issend',
sortrank='$sortrank',
typename='$typename',
typedir='$typedir',
isdefault='$isdefault',
defaultname='$defaultname',
issend='$issend',
ishidden='$ishidden',
channeltype='$channeltype',
tempindex='$tempindex',
templist='$templist',
temparticle='$temparticle',
namerule='$namerule',
namerule2='$namerule2',
ispart='$ispart',
corank='$corank',
description='$description',
keywords='$keywords',
seotitle='$seotitle',
moresite='$moresite',
`cross`='$cross',
`content`='$content',
`crossid`='$crossid',
`smalltypes`='$smalltypes'
$uptopsql
issend='$issend',
sortrank='$sortrank',
typename='$typename',
typedir='$typedir',
isdefault='$isdefault',
defaultname='$defaultname',
issend='$issend',
ishidden='$ishidden',
channeltype='$channeltype',
tempindex='$tempindex',
templist='$templist',
temparticle='$temparticle',
namerule='$namerule',
namerule2='$namerule2',
ispart='$ispart',
corank='$corank',
description='$description',
keywords='$keywords',
seotitle='$seotitle',
moresite='$moresite',
`cross`='$cross',
`content`='$content',
`crossid`='$crossid',
`smalltypes`='$smalltypes'
$uptopsql
WHERE id='$id' ";
if (!$dsql->ExecuteNoneQuery($upquery)) {
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题", "-1");
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题", "-1");
exit();
}
//如果选择子栏目可投稿,更新顶级栏目为可投稿
if ($topid > 0 && $issend == 1) {
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; ");
}
$slinks = " id IN (".GetSonIds($id).")";
//修改顶级栏目时强制修改下级的多站点支持属性
if ($topid == 0 && preg_match("#,#", $slinks)) {
$upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks";
$dsql->ExecuteNoneQuery($upquery);
}
//更改子栏目属性
if (!empty($upnext)) {
$upquery = "UPDATE `#@__arctype` SET
issend='$issend',
defaultname='$defaultname',
channeltype='$channeltype',
tempindex='$tempindex',
templist='$templist',
temparticle='$temparticle',
namerule='$namerule',
namerule2='$namerule2',
ishidden='$ishidden'
WHERE 1=1 AND $slinks";
$upquery = "UPDATE `#@__arctype` SET
issend='$issend',
defaultname='$defaultname',
channeltype='$channeltype',
tempindex='$tempindex',
templist='$templist',
temparticle='$temparticle',
namerule='$namerule',
namerule2='$namerule2',
ishidden='$ishidden'
WHERE 1=1 AND $slinks";
if (!$dsql->ExecuteNoneQuery($upquery)) {
ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败", "-1");
ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败", "-1");
exit();
}
}
UpDateCatCache();
ShowMsg("成功更改一个分类", "catalog_main.php");
ShowMsg("成功更改一个分类", "catalog_main.php");
exit();
} //End Save Action
else if ($dopost == "savetime") {
$uptopsql = '';
$slinks = " id IN (".GetSonIds($id).")";
//顶级栏目二级域名根目录处理
if ($topid == 0 && $moresite == 1) {
$sitepath = $typedir;
@@ -118,27 +108,24 @@ else if ($dopost == "savetime") {
if ($topid > 0 && $issend == 1) {
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; ");
}
$upquery = "UPDATE `#@__arctype` SET
issend='$issend',
sortrank='$sortrank',
typedir='$typedir',
typename='$typename',
isdefault='$isdefault',
defaultname='$defaultname',
ispart='$ispart',
corank='$corank' $uptopsql
issend='$issend',
sortrank='$sortrank',
typedir='$typedir',
typename='$typename',
isdefault='$isdefault',
defaultname='$defaultname',
ispart='$ispart',
corank='$corank' $uptopsql
WHERE id='$id' ";
if (!$dsql->ExecuteNoneQuery($upquery)) {
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题", "-1");
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题", "-1");
exit();
}
UpDateCatCache();
ShowMsg("成功更改一个分类", "catalog_main.php");
ShowMsg("成功更改一个分类", "catalog_main.php");
exit();
}
//读取栏目信息
$dsql->SetQuery("SELECT tp.*,ch.typename as ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id");
$myrow = $dsql->GetOne();
@@ -152,7 +139,6 @@ if ($topid > 0) {
}
}
$myrow['content'] = empty($myrow['content']) ? "&nbsp;" : $myrow['content'];
//读取频道模型信息
$channelid = $myrow['channeltype'];
$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id");
@@ -168,105 +154,92 @@ PutCookie('lastCid', GetTopid($id), 3600 * 24, "/");
if ($dopost == 'time') {
?>
<form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();">
<input type="hidden" name="dopost" value="savetime" />
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>" />
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>" />
<input type="hidden" name="dopost" value="savetime">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>">
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class='bline' height="26" align="center" colspan="2">
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>当前是快捷编辑模式,如果您要修改更详细的参数,请使用高级模式&gt;&gt;</u></a>
<a href='catalog_edit.php?id=<?php echo $id; ?>'>当前是快捷编辑模式,您要修改更详细的参数,请使用高级模式</a>
</td>
</tr>
<tr>
<td width="150" class='bline' height="26" align="center">是否支持投稿:</td>
<td class='bline'>
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?> />
不支持</label>&nbsp;
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?> />
支持</label></td>
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?>>&nbsp;不支持</label>
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?>>&nbsp;支持</label>
</td>
</tr>
<!-- 在快速修改更改内容模型后,因为模板没改变,会导致错误,因此去除些选择框。 -->
<tr>
<td class='bline' height="26" align="center">
<font color='red'>内容模型:</font>
</td>
<td class='bline' height="26" align="center">内容模型:</td>
<td class='bline'>
<?php
foreach ($channelArray as $k => $arr) {
if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}";
}
?>
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>[修改]</u></a>
<a href='catalog_edit.php?id=<?php echo $id; ?>' class='btn btn-success btn-sm'>修改</a>
</td>
</tr>
<tr>
<td class='bline' height="26" align="center">
<font color='red'>栏目名称:</font>
</td>
<td class='bline'><input name="typename" type="text" id="typename" size="30" value="<?php echo $myrow['typename'] ?>" class="iptxt" /></td>
<td class='bline' height="26" align="center">栏目名称:</td>
<td class='bline'><input name="typename" type="text" id="typename" value="<?php echo $myrow['typename'] ?>" style="width:260px" class="iptxt"></td>
</tr>
<tr>
<td class='bline' height="26" align="center"> 排列顺序: </td>
<td class='bline'> <input name="sortrank" size="6" type="text" value="<?php echo $myrow['sortrank'] ?>" class="iptxt" />
(由低 -&gt; 高) </td>
<td class='bline'> <input name="sortrank" type="text" value="<?php echo $myrow['sortrank'] ?>" style="width:100" class="iptxt">(由低 -&gt; 高)</td>
</tr>
<tr>
<td class='bline' height="26" align="center">浏览权限:</td>
<td class='bline'> <select name="corank" id="corank" style="width:100">
<?php
$dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank >= 0");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
if ($myrow['corank'] == $row->rank)
echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n";
<td class='bline'>
<select name="corank" id="corank" style="width:100">
<?php
$dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank >= 0");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
if ($myrow['corank'] == $row->rank)
echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n";
else
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n";
}
?>
</select>
(仅限制栏目里的文档浏览权限) </td>
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n";
}
?>
</select>(仅限制栏目里的文档浏览权限)
</td>
</tr>
<tr>
<td class='bline' height="26" align="center">文件保存目录:</td>
<td class='bline'><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:300px" class="iptxt" /></td>
<td class='bline'><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:260px"class="iptxt"></td>
</tr>
<tr>
<td height="26" align="center" class='bline'>栏目列表选项:</td>
<td class='bline'>
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?> />
链接到默认页</label>
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?> />
链接到列表第一页</label>
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?> />
使用动态页</label> </td>
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?>>&nbsp;链接到默认页</label>
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?>>&nbsp;链接到列表第一页</label>
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?>>&nbsp;使用动态页</label></td>
</tr>
<tr>
<td class='bline' height="26" align="center">默认页的名称: </td>
<td class='bline'><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" class="iptxt" /></td>
<td class='bline' height="26" align="center">默认页的名称:</td>
<td class='bline'><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" style="width:260px" class="iptxt"></td>
</tr>
<tr>
<td height="26" class='bline' align="center">栏目属性:</td>
<td class='bline'>
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?> />
最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br>
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?> />
频道封面(栏目本身不允许发布文档)</label><br>
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?> />
外部连接(在"文件保存目录"处填写网址) </label> </td>
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?>>&nbsp;最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br>
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?>>&nbsp;频道封面(栏目本身不允许发布文档)</label><br>
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?>>&nbsp;外部连接(在"文件保存目录"处填写网址)</label>
</td>
</tr>
<tr>
<td align="center" colspan="2" height="54" bgcolor='#FAFEE0'>
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" border="0" class="np" />
&nbsp;&nbsp;&nbsp;
<a title='关闭' onclick='CloseMsg()'><img src="images/button_back.gif" width="60" height="22" border="0"></a>
<td align="center" colspan="2" height="50" bgcolor='#FAFEE0'>
<button onclick='getSelCat("<?php echo $targetid; ?>");' class='btn btn-success'>保存</button>
<button type='button' onclick='CloseMsg()' class='btn btn-success'>关闭</button>
</td>
</tr>
</table>
</form>
<?php
exit();
exit();
} else {
include DedeInclude('templets/catalog_edit.htm');
}

+ 15
- 21
src/dede/js/dialog.js View File

@@ -6,35 +6,31 @@
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
document.write("<style type=\"text/css\">.close{float:right;cursor:default;}</style>")
document.write("<style type=\"text/css\">.close{float:right;font-size:14px;cursor:pointer}</style>")
function editTitle(aid) {
var show = document.getElementById("show_news");
var myajax = new DedeAjax(show, false, false, "", "", "");
myajax.SendGet2("catalog_edit.php?dopost=time&id=" + aid);
DedeXHTTP = null;
}
function $Dede(id) { return document.getElementById(id) }
function AlertMsg(title, id) {
var msgw, msgh, msgbg, msgcolor, bordercolor, titlecolor, titlebg, content;
//弹出窗口设置
msgw = 600; //窗口宽度
msgh = 400; //窗口高度
msgbg = "#FFF"; //内容背景
msgcolor = "#000"; //内容颜色
bordercolor = "#5A6D58"; //边框颜色
titlecolor = "#254015"; //标题颜色
titlebg = "#369 url(images/tbg.gif)"; //标题背景
msgw = 600;//窗口宽度
msgbg = "#FFF";//内容背景
msgcolor = "#000";//内容颜色
bordercolor = "#5A6D58";//边框颜色
titlecolor = "#254015";//标题颜色
titlebg = "#369 url(images/tbg.gif)";//标题背景
//遮罩背景设置
content = "<div id=show_news>对不起,载入失败</div>";
var sWidth, sHeight;
sWidth = screen.availWidth;
if (screen.availHeight > document.body.scrollHeight) {
sHeight = screen.availHeight; //少于一屏
sHeight = screen.availHeight;//少于一屏
} else {
sHeight = document.body.scrollHeight; //多于一屏
sHeight = document.body.scrollHeight;//多于一屏
}
//创建遮罩背景
var maskObj = document.createElement("div");
@@ -42,7 +38,7 @@ function AlertMsg(title, id) {
maskObj.style.position = "absolute";
maskObj.style.top = "0";
maskObj.style.left = "0";
maskObj.style.background = "#777";
maskObj.style.background = "#666";
maskObj.style.filter = "Alpha(opacity=30);";
maskObj.style.opacity = "0.3";
maskObj.style.width = sWidth + "px";
@@ -59,7 +55,7 @@ function AlertMsg(title, id) {
msgObj.style.left = "100px";
msgObj.style.width = msgw + "px";
msgObj.style.height = msgh + "px";
msgObj.style.fontSize = "12px";
msgObj.style.fontSize = "14px";
msgObj.style.background = msgbg;
msgObj.style.border = "1px solid " + bordercolor;
msgObj.style.zIndex = "10001";
@@ -67,13 +63,13 @@ function AlertMsg(title, id) {
var thObj = document.createElement("div");
thObj.setAttribute("id", "msgth");
thObj.className = "DragAble";
thObj.title = "按住鼠标左键可以拖动窗口";
thObj.title = "按住鼠标左键可以拖动窗口";
thObj.style.cursor = "move";
thObj.style.padding = "4px 6px";
thObj.style.padding = "10px";
thObj.style.color = titlecolor;
thObj.style.fontWeight = 'bold';
thObj.style.background = titlebg;
var titleStr = "<a class='close' title='关闭' style='cursor:pointer' onclick='CloseMsg()'>关闭</a>" + "<span>" + title + "</span>";
var titleStr = "<a class='close' onclick='CloseMsg()'>关闭</a>" + "<span>" + title + "</span>";
thObj.innerHTML = titleStr;
//创建内容
var bodyObj = document.createElement("div");
@@ -102,7 +98,6 @@ var nn6 = document.getElementById && !document.all;
var isdrag = false;
var y, x;
var oDragObj;
function moveMouse(e) {
if (isdrag) {
oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px";
@@ -110,7 +105,6 @@ function moveMouse(e) {
return false;
}
}
function initDrag(e) {
var oDragHandle = nn6 ? e.target : event.srcElement;
var topElement = "HTML";
@@ -129,4 +123,4 @@ function initDrag(e) {
}
}
document.onmousedown = initDrag;
document.onmouseup = new Function("isdrag=false");
document.onmouseup = new Function("isdrag=false");

+ 1
- 2
src/dede/templets/article_add.htm View File

@@ -31,10 +31,9 @@ function checkSubmit() {
}
</script>
<style>
body{background:#ffffff}
body{background:#fff}
img{vertical-align:baseline}
table{border-collapse:separate}
input,select{height:auto!important}
.albCt img{cursor:pointer}
.multipic{border:1px dashed #FC6}
.albCt{border-bottom:1px dashed #FC0;margin-bottom:10px;padding-bottom:10px}


+ 3
- 1
src/dede/templets/article_edit.htm View File

@@ -29,10 +29,12 @@ function checkSubmit() {
}
</script>
<style>
body{background:#ffffff}
body{background:#fff}
img{vertical-align:baseline}
table{border-collapse:separate}
.albCt img{cursor:pointer}
.multipic{border:1px dashed #FC6}
.albCt{border-bottom:1px dashed #FC0;margin-bottom:10px;padding-bottom:10px}
.btn+.btn{margin-left:10px}
</style>
</head>


+ 2
- 2
src/dede/templets/catalog_main.htm View File

@@ -101,8 +101,8 @@ function SingleMenu(eobj,obj,tid,tname)
}
</script>
<style>
td,th{padding:.3rem}
.coolbg2{border:1px solid #000000;background-color:#F2F5E9;height:18px}
td,th{padding:.25rem}
.coolbg2{border:1px solid #ccc;background-color:#F2F5E9;height:18px}
.coolbt2{border-left:2px solid #EFEFEF;border-top:2px solid #EFEFEF;border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background-color:#F7FCDA}
.nbline{border-bottom:1px solid #d6d6d6;background-color:#FFFFFF}
.bline2{border-bottom:1px solid #d6d6d6;background-color:#F9FCEF}


+ 2
- 2
src/dede/templets/index_menu2.htm View File

@@ -17,9 +17,9 @@ div{margin:0;padding:0}
dl.bitem{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg.gif)repeat-x;clear:both}
dl.bitem2{margin:0 0 2px 10px;width:140px;background:url(images/menunewbg2.gif)repeat-x;clear:both}
dl.bitem dt,dl.bitem2 dt{padding-left:30px;height:26px;line-height:26px;cursor:pointer}
dl.bitem dd,dl.bitem2 dd{padding:10px;background:#ffffff}
dl.bitem dd,dl.bitem2 dd{padding:10px;background:#fff}
dl.bitem dt b,dl.bitem2 dt b{color:#4f7632}
a.mm div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#666666;background:url(images/leftmbg1.gif)no-repeat;cursor:pointer}
a.mm div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#666;background:url(images/leftmbg1.gif)no-repeat;cursor:pointer}
a.mm:hover div{color:#4f7632;background:url(images/leftbg2.gif)no-repeat}
a.mmac div{padding:7px 4px 4px 10px;height:40px;font-weight:600;color:#4f7632;background:url(images/leftbg2.gif)no-repeat}
#mainct{padding-top:12px;background:url(images/idnbg1.gif)repeat-y}


+ 2
- 2
src/dede/templets/login.htm View File

@@ -11,12 +11,12 @@
<style>
body{font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#f8f8f8}
img{max-width:100%}
header{background:#ffffff}
header{background:#fff}
header .logo{width:300px;padding:1rem 0}
.goindex{line-height:68px}
.fa{font-size:16px}
.login-from{max-width:580px;width:100%}
.login-area{background:#ffffff;padding:2rem;border-radius:.25rem}
.login-area{background:#fff;padding:2rem;border-radius:.25rem}
.login-area .btnLogin{width:100%}
.login-power{padding-top:1rem}
.login-power a,.goindex a{color:#008e38}


Loading…
Cancel
Save