Преглед изворни кода

规范化命名,优化错误提示效果,优化排序

adminsite
叙述、别离 пре 1 дан
родитељ
комит
05c091882d
7 измењених фајлова са 98 додато и 97 уклоњено
  1. +2
    -2
      src/admin/archives_do.php
  2. +3
    -3
      src/admin/templets/ad_add.htm
  3. +12
    -12
      src/admin/templets/diy_field_add.htm
  4. +19
    -19
      src/admin/templets/mychannel_field_add.htm
  5. +33
    -37
      src/static/web/css/admin.css
  6. +28
    -23
      src/static/web/js/admin.main.js
  7. +1
    -1
      src/system/typelink/typeunit.class.selector.php

+ 2
- 2
src/admin/archives_do.php Прегледај датотеку

@@ -803,8 +803,8 @@ else if ($dopost == 'attsDlg') {
echo "<div class='card shadow-sm'><div class='card-header'>选择副栏目</div><div class='card-body'>";
$tus = new TypeUnitSelector();
?>
<form name="quicksel" action="javascript:;" method="get">
<div class="quicksel"><?php $tus->ListAllType($channelid);?></div>
<form name="fastselectbox" action="javascript:;" method="get">
<div class="fastselectbox"><?php $tus->ListAllType($channelid);?></div>
<div class="text-center">
<button onclick="getSelCat('<?php echo $targetid;?>');" class="btn btn-success btn-sm">保存</button>
<button type="button" onclick="HideObj('<?php echo $divname;?>');ChangeFullDiv('hide');" class="btn btn-outline-success btn-sm">关闭</button>


+ 3
- 3
src/admin/templets/ad_add.htm Прегледај датотеку

@@ -78,7 +78,7 @@
<tr>
<td>广告内容</td>
<td>
<ul id="adTab" class="adtab">
<ul id="toolAd" class="toolAd">
<li id="t_code" class="active">代码</li>
<li id="t_txt">文字</li>
<li id="t_img">图片</li>
@@ -134,12 +134,12 @@
}
showcode('code');
$(function($) {
$("#adTab>li").click(function() {
$("#toolAd>li").click(function() {
var tabLi = $(this);
var thistab = tabLi[0].id;
$(".content").each(function() {
if ("t_" + $(this)[0].id == thistab) {
$("#adTab>li").removeClass("active");
$("#toolAd>li").removeClass("active");
$("#t_" + $(this)[0].id).addClass("active");
showcode($(this)[0].id);
}


+ 12
- 12
src/admin/templets/diy_field_add.htm Прегледај датотеку

@@ -49,18 +49,18 @@
<tr>
<td>数据类型</td>
<td>
<div class="nw"><label><input type="radio" name="dtype" id="dtype1" value="text" checked> 单行文本(varchar)</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype2" value="textchar"> 单行文本(char)</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype3" value="multitext"> 多行文本</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype4" value="htmltext"> 网页文本</label></div>
<br class="cls">
<div class="nw"><label><input type="radio" name="dtype" id="dtype6" value="int"> 整数类型</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype7" value="float"> 小数类型</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype8" value="datetime"> 时间类型</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype13" value="select"> option下拉框</label></div>
<br class="cls">
<div class="nw"><label><input type="radio" name="dtype" id="dtype14" value="radio"> radio选项卡</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype15" value="checkbox"> checkbox多选框</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype1" value="text" checked> 单行文本(varchar)</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype2" value="textchar"> 单行文本(char)</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype3" value="multitext"> 多行文本</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype4" value="htmltext"> 网页文本</label></div>
<br class="clear">
<div class="data-col"><label><input type="radio" name="dtype" id="dtype6" value="int"> 整数类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype7" value="float"> 小数类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype8" value="datetime"> 时间类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype13" value="select"> option下拉框</label></div>
<br class="clear">
<div class="data-col"><label><input type="radio" name="dtype" id="dtype14" value="radio"> radio选项卡</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype15" value="checkbox"> checkbox多选框</label></div>
</td>
</tr>
<tr>


+ 19
- 19
src/admin/templets/mychannel_field_add.htm Прегледај датотеку

@@ -64,25 +64,25 @@
<tr>
<td>数据类型</td>
<td id="dataType">
<div class="nw"><label><input type="radio" name="dtype" id="dtype1" value="text" checked> 单行文本(varchar)</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype2" value="textchar"> 单行文本(char)</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype3" value="multitext"> 多行文本</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype4" value="htmltext"> 网页文本</label></div>
<br class="cls">
<div class="nw"><label><input type="radio" name="dtype" id="dtype5" value="textdata"> 文本保存网页数据</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype6" value="int"> 整数类型</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype7" value="float"> 小数类型</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype8" value="datetime"> 时间类型</label></div>
<br class="cls">
<div class="nw"><label><input type="radio" name="dtype" id="dtype9" value="img"> 图片类型</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype10" value="media"> 多媒体文件</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype11" value="addon"> 附件类型</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype12" value="relation"> 关联文档</label></div>
<br class="cls">
<div class="nw"><label><input type="radio" name="dtype" id="dtype13" value="select"> option下拉框</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype14" value="radio"> radio选项卡</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype15" value="checkbox"> checkbox多选框</label></div>
<div class="nw"><label><input type="radio" name="dtype" id="dtype16" value="stepselect"> 联动类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype1" value="text" checked> 单行文本(varchar)</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype2" value="textchar"> 单行文本(char)</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype3" value="multitext"> 多行文本</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype4" value="htmltext"> 网页文本</label></div>
<br class="clear">
<div class="data-col"><label><input type="radio" name="dtype" id="dtype5" value="textdata"> 文本保存网页数据</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype6" value="int"> 整数类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype7" value="float"> 小数类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype8" value="datetime"> 时间类型</label></div>
<br class="clear">
<div class="data-col"><label><input type="radio" name="dtype" id="dtype9" value="img"> 图片类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype10" value="media"> 多媒体文件</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype11" value="addon"> 附件类型</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype12" value="relation"> 关联文档</label></div>
<br class="clear">
<div class="data-col"><label><input type="radio" name="dtype" id="dtype13" value="select"> option下拉框</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype14" value="radio"> radio选项卡</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype15" value="checkbox"> checkbox多选框</label></div>
<div class="data-col"><label><input type="radio" name="dtype" id="dtype16" value="stepselect"> 联动类型</label></div>
</td>
</tr>
<tr id="_relation" style="display:none">


+ 33
- 37
src/static/web/css/admin.css Прегледај датотеку

@@ -338,12 +338,17 @@ body.menu-show .admin-content {
#_msgInfo {
display:none
}
.colordlg {
background:var(--white);
border:1px solid var(--gray-300);
z-index:19991
.adminmodalbg {
position:fixed;
top:0;
left:0;
width:100vw;
height:100vh;
background:#000;
opacity:0.5;
z-index:1980
}
.pubdlg {
.adminmodal {
position:fixed;
top:0;
left:0;
@@ -351,35 +356,25 @@ body.menu-show .admin-content {
height:100%;
z-index:19992
}
.pubdlg .card {
.adminmodal .card {
margin:1.75rem auto;
width:100%
}
.fullpagediv {
position:fixed;
top:0;
left:0;
width:100vw;
height:100vh;
background:#000;
opacity:0.5;
z-index:1980
}
.quicksel {
.fastselectbox {
height:350px;
overflow-y:auto;
z-index:19993
}
.quickselitem .topcat {
.fastselect .topcat {
margin-bottom:1rem;
padding:0 1rem;
background:var(--light)
}
.quickselitem .soncat {
.fastselect .soncat {
margin-bottom:1rem;
padding:0 1rem
}
.quickselitem .list {
.fastselect .list {
display:inline-block;
padding-right:0.5rem
}
@@ -388,19 +383,11 @@ body.menu-show .admin-content {
border:1px solid var(--gray-300);
z-index:19994
}
.adtab li {
display:inline-block;
padding:0.5rem;
cursor:pointer
}
.adtab .active {
color:var(--blue)
}
.nw {
.data-col {
float:left;
width:180px
}
.cls {
.clear {
clear:both
}
.sys-search {
@@ -420,6 +407,11 @@ body.menu-show .admin-content {
border:1px solid var(--gray-300);
border-radius:var(--b-radius)
}
.tipslite {
background:var(--white);
border:1px solid var(--gray-300);
z-index:19991
}
.tips-box {
margin:1.75rem auto;
width:500px;
@@ -472,9 +464,13 @@ body.menu-show .admin-content {
.atlas .atlas-input {
width:100%
}
#toolimg {
position:absolute;
display:none
.tool-ad li {
display:inline-block;
padding:0.5rem;
cursor:pointer
}
.tool-ad .active {
color:var(--blue)
}
#uploadfield {
float:left
@@ -733,7 +729,7 @@ span.page-link {
color:var(--white);
background:var(--green)
}
input,select,textarea,.colordlg,.pubdlg,.quickselitem .topcat,.mysource,.mywriter,#edsta,.cke_chrome,.cke_inner,.alert,.card,.rounded,.form-control,.btn {
input,select,textarea,.adminmodal,.fastselect .topcat,.mysource,.mywriter,.tipslite,#edsta,.cke_chrome,.cke_inner,.alert,.card,.rounded,.form-control,.btn {
border-radius:var(--b-radius)!important
}
.cke_top {
@@ -785,7 +781,7 @@ input,select,textarea,.colordlg,.pubdlg,.quickselitem .topcat,.mysource,.mywrite
}
}
@media screen and (min-width:767px) {
.modal-dialog,.pubdlg .card {
.modal-dialog,.adminmodal .card {
max-width:500px
}
}
@@ -825,10 +821,10 @@ input,select,textarea,.colordlg,.pubdlg,.quickselitem .topcat,.mysource,.mywrite
.card-body canvas {
height:230px!important
}
.pubdlg {
.adminmodal {
padding:0 0.5rem
}
.pubdlg .card,.tips-box {
.adminmodal .card,.tips-box {
margin:0.5rem auto;
width:auto
}


+ 28
- 23
src/static/web/js/admin.main.js Прегледај датотеку

@@ -55,18 +55,6 @@ function InitPage() {
}
}
}
function ColorSel(c, oname) {
var tobj = $Obj(oname);
if (!tobj) tobj = eval("document.form1." + oname);
if (!tobj) {
$Obj("colordlg").style.display = "none";
return false;
} else {
tobj.value = c;
$Obj("colordlg").style.display = "none";
return true;
}
}
function ShowObj(objname) {
var obj = $Obj(objname);
if (obj == null) return false;
@@ -76,6 +64,9 @@ function ShowObjRow(objname) {
var obj = $Obj(objname);
obj.style.display = "table-row";
}
function AddTypeid2() {
ShowObjRow("typeid2tr");
}
function HideObj(objname) {
var obj = $Obj(objname);
if (obj == null) return false;
@@ -99,8 +90,10 @@ function ClearDivCt(objname) {
$Obj(objname).style.display = "none";
ChangeFullDiv("hide");
}
function AddTypeid2() {
ShowObjRow("typeid2tr");
function ShowHide(objname) {
var obj = $Obj(objname);
if (obj.style.display != "none") obj.style.display = "none";
else obj.style.display = "inline-block";
}
function SelectSource(e) {
LoadNewDiv(e, "article_select_sw.php?t=source&k=8&rnd=" + Math.random(), "mysource");
@@ -108,8 +101,20 @@ function SelectSource(e) {
function SelectWriter(e) {
LoadNewDiv(e, "article_select_sw.php?t=writer&k=8&rnd=" + Math.random(), "mywriter");
}
function ColorSel(c, oname) {
var tobj = $Obj(oname);
if (!tobj) tobj = eval("document.form1." + oname);
if (!tobj) {
$Obj("tipslite").style.display = "none";
return false;
} else {
tobj.value = c;
$Obj("tipslite").style.display = "none";
return true;
}
}
function ShowColor(e, o) {
LoadNewDiv(e, "../theme/system/colornew.htm", "colordlg");
LoadNewDiv(e, "../theme/system/colornew.htm", "tipslite");
}
function ShowUrlTr() {
var jumpTest = $Obj("flagsj");
@@ -128,13 +133,13 @@ function ShowUrlTrEdit() {
if (!jumpTest.checked) rurl.value = '';
}
function ChangeFullDiv(showhide, screenheigt) {
var newobj = $Obj("fullpagediv");
var newobj = $Obj("adminmodalbg");
if (showhide == "show") {
if (!newobj) {
newobj = document.createElement("div");
newobj.id = "fullpagediv";
newobj.id = "adminmodalbg";
newobj.style.position = "fixed";
newobj.className = "fullpagediv";
newobj.className = "adminmodalbg";
//newobj.style.height = document.body.clientHeight + "px";
document.body.appendChild(newobj);
} else {
@@ -148,14 +153,14 @@ function ChangeFullDiv(showhide, screenheigt) {
}
function LoadNewDiv(e, surl, oname) {
var pxStr = '';
var posLeft = e.pageX - 20;
var posTop = e.pageY - 30;
var posLeft = e.pageX - 18;
var posTop = e.pageY - 18;
pxStr = 'px';
var newobj = $Obj(oname);
if (!newobj) {
newobj = document.createElement("div");
newobj.id = oname;
newobj.style.position = "fixed";
newobj.style.position = "absolute";
newobj.className = oname;
newobj.className += " dlgws";
newobj.style.top = posTop + pxStr;
@@ -176,7 +181,7 @@ function LoadQuickDiv(e, surl, oname, w, h) {
newobj = document.createElement("div");
newobj.id = oname;
newobj.style.position = "fixed";
newobj.className = "pubdlg";
newobj.className = "adminmodal";
//newobj.style.width = w;
//newobj.style.height = h + 30;
document.body.appendChild(newobj);
@@ -194,7 +199,7 @@ function ShowCatMap(e, obj, cid, targetId, oldvalue) {
ChangeFullDiv("show");
}
function getSelCat(targetId) {
var selBox = document.quicksel.seltypeid;
var selBox = document.fastselectbox.seltypeid;
var targetObj = $Obj(targetId);
var selvalue = '';
if (targetId == 'typeid2') {


+ 1
- 1
src/system/typelink/typeunit.class.selector.php Прегледај датотеку

@@ -76,7 +76,7 @@ class TypeUnitSelector
$soncat = '';
$this->LogicListAllSunType($id, $channel, $soncat);
if ($chackRadio == '' && $soncat == '') continue;
echo "<div class='quickselitem'>\r\n";
echo "<div class='fastselect'>\r\n";
echo "<div class='topcat'><label>{$chackRadio} {$typeName}</label></div>\r\n";
if ($soncat != '') echo "<div class='soncat'>{$soncat}</div>\r\n";
echo "</div>\r\n";


Loading…
Откажи
Сачувај