@@ -12,17 +12,17 @@ | |||||
//表格折叠 | //表格折叠 | ||||
$(".tform").find("tbody tr th[_show]").each(function(i){ | $(".tform").find("tbody tr th[_show]").each(function(i){ | ||||
//加入折叠提示 | //加入折叠提示 | ||||
if($(this).attr("_show")=="no"){ | |||||
$(this).append(" <button type=\"button\" class=\"tbody_up\"></button>"); | |||||
}else{ | |||||
$(this).append(" <button type=\"button\" class=\"tbody_down\"></button>"); | |||||
if ($(this).attr("_show")=="no"){ | |||||
$(this).append(" <button type=\"button\" class=\"tbody_up\"></button>"); | |||||
} else { | |||||
$(this).append(" <button type=\"button\" class=\"tbody_down\"></button>"); | |||||
} | } | ||||
//折叠动作 | //折叠动作 | ||||
$(this).click(function(){ | $(this).click(function(){ | ||||
if($(this).find("button[class^='tbody_']").attr("class")=="tbody_up"){ | |||||
if ($(this).find("button[class^='tbody_']").attr("class")=="tbody_up"){ | |||||
$(this).find("button[class^='tbody_']").attr("class","tbody_down"); | $(this).find("button[class^='tbody_']").attr("class","tbody_down"); | ||||
$(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).hide(); | $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).hide(); | ||||
}else if($(this).find("button[class^='tbody_']").attr("class")=="tbody_down"){ | |||||
} else if ($(this).find("button[class^='tbody_']").attr("class")=="tbody_down"){ | |||||
$(this).find("button[class^='tbody_']").attr("class","tbody_up"); | $(this).find("button[class^='tbody_']").attr("class","tbody_up"); | ||||
$(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).show(); | $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).show(); | ||||
} | } | ||||
@@ -34,7 +34,7 @@ | |||||
}); | }); | ||||
//列表行高亮 | //列表行高亮 | ||||
$("table[_dlist*='light']").children("tbody").children("tr").mouseover(function(){ | $("table[_dlist*='light']").children("tbody").children("tr").mouseover(function(){ | ||||
if($(this).attr("_nolight")!="yes")$(this).addClass("t_on"); | |||||
if ($(this).attr("_nolight")!="yes")$(this).addClass("t_on"); | |||||
}).mouseout(function(){ | }).mouseout(function(){ | ||||
$(this).removeClass("t_on"); | $(this).removeClass("t_on"); | ||||
}); | }); | ||||
@@ -44,23 +44,21 @@ | |||||
$(this).find("tbody tr").click(function(){ | $(this).find("tbody tr").click(function(){ | ||||
checkbox = $(this).find("td input[type='checkbox']"); | checkbox = $(this).find("td input[type='checkbox']"); | ||||
tr = $(this); | tr = $(this); | ||||
if(checkbox.attr("checked")===false){ | |||||
if (checkbox.attr("checked")===false){ | |||||
checkbox.attr("checked","checked"); | checkbox.attr("checked","checked"); | ||||
tr.addClass("t_sl"); | tr.addClass("t_sl"); | ||||
}else{ | |||||
} else { | |||||
checkbox.removeAttr("checked"); | checkbox.removeAttr("checked"); | ||||
tr.removeClass("t_sl"); | tr.removeClass("t_sl"); | ||||
} | } | ||||
}); | }); | ||||
//处理checkbox点击 | //处理checkbox点击 | ||||
$(this).find("td input[type='checkbox']").click(function(){ | $(this).find("td input[type='checkbox']").click(function(){ | ||||
tr = $(this).parent("td").parent("tr"); | tr = $(this).parent("td").parent("tr"); | ||||
if($(this).attr("checked")===false){ | |||||
if ($(this).attr("checked")===false){ | |||||
$(this).attr("checked","checked"); | $(this).attr("checked","checked"); | ||||
tr.removeClass("t_sl"); | tr.removeClass("t_sl"); | ||||
}else{ | |||||
} else { | |||||
$(this).removeAttr("checked"); | $(this).removeAttr("checked"); | ||||
tr.addClass("t_sl"); | tr.addClass("t_sl"); | ||||
} | } | ||||
@@ -69,15 +67,14 @@ | |||||
$(this).find("tbody tr td a,tbody tr td button,tbody tr td table").click(function(){ | $(this).find("tbody tr td a,tbody tr td button,tbody tr td table").click(function(){ | ||||
tr = $(this).parent("td").parent("tr"); | tr = $(this).parent("td").parent("tr"); | ||||
checkbox = tr.find("td input[type='checkbox']"); | checkbox = tr.find("td input[type='checkbox']"); | ||||
if(checkbox.attr("checked")===false){ | |||||
if (checkbox.attr("checked")===false){ | |||||
checkbox.attr("checked","checked"); | checkbox.attr("checked","checked"); | ||||
tr.removeClass("t_sl"); | tr.removeClass("t_sl"); | ||||
}else{ | |||||
} else { | |||||
checkbox.removeAttr("checked"); | checkbox.removeAttr("checked"); | ||||
tr.addClass("t_sl"); | tr.addClass("t_sl"); | ||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
//高亮初始化 | //高亮初始化 | ||||
setChecklight(); | setChecklight(); | ||||
@@ -93,15 +90,14 @@ | |||||
ckbox.each(function(){ | ckbox.each(function(){ | ||||
$(this).attr("checked") === false ? $(this).attr("checked","checked") : $(this).removeAttr("checked"); | $(this).attr("checked") === false ? $(this).attr("checked","checked") : $(this).removeAttr("checked"); | ||||
}); | }); | ||||
setChecklight(); | setChecklight(); | ||||
}); | }); | ||||
//自定义提交 | //自定义提交 | ||||
$("button[_submit]").click(function(){ | $("button[_submit]").click(function(){ | ||||
url = $(this).attr("_submit"); | url = $(this).attr("_submit"); | ||||
if(/\[new\].*/.test(url)){ | |||||
if (/\[new\].*/.test(url)){ | |||||
url = url.replace(/\[new\]/,""); | url = url.replace(/\[new\]/,""); | ||||
}else{ | |||||
} else { | |||||
url = $(this).parents("form").attr("action")+url; | url = $(this).parents("form").attr("action")+url; | ||||
} | } | ||||
$(this).parents("form").attr("action",url).submit(); | $(this).parents("form").attr("action",url).submit(); | ||||
@@ -111,9 +107,9 @@ | |||||
function setChecklight(){ | function setChecklight(){ | ||||
$(".tlist[_dlist*='check']").find("tbody tr td input[type='checkbox']").each(function(i){ | $(".tlist[_dlist*='check']").find("tbody tr td input[type='checkbox']").each(function(i){ | ||||
tr = $(this).parent("td").parent("tr"); | tr = $(this).parent("td").parent("tr"); | ||||
if($(this).attr("checked")){ | |||||
if ($(this).attr("checked")){ | |||||
tr.addClass("t_sl"); | tr.addClass("t_sl"); | ||||
}else{ | |||||
} else { | |||||
tr.removeClass("t_sl"); | tr.removeClass("t_sl"); | ||||
} | } | ||||
}); | }); | ||||
@@ -122,20 +118,20 @@ | |||||
function AC(mid){ | function AC(mid){ | ||||
f = $(window.parent.document); | f = $(window.parent.document); | ||||
mlink = f.find("a[id='"+mid+"']"); | mlink = f.find("a[id='"+mid+"']"); | ||||
if(mlink.size()>0){ | |||||
if (mlink.size()>0){ | |||||
box = mlink.parents("div[id^='menu_']"); | box = mlink.parents("div[id^='menu_']"); | ||||
boxid = box.attr("id").substring(5,128); | boxid = box.attr("id").substring(5,128); | ||||
if($("body").attr("class")!="showmenu")$("#togglemenu").click(); | |||||
if(mlink.attr("_url")){ | |||||
if ($("body").attr("class")!="showmenu")$("#togglemenu").click(); | |||||
if (mlink.attr("_url")){ | |||||
$("#menu").find("div[id^=menu]").hide(); | $("#menu").find("div[id^=menu]").hide(); | ||||
box.show(); | box.show(); | ||||
mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); | mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); | ||||
if($("#mod_"+boxid).attr("class")==""){ | |||||
if ($("#mod_"+boxid).attr("class")==""){ | |||||
$("#nav").find("a").removeClass("thisclass"); | $("#nav").find("a").removeClass("thisclass"); | ||||
$("#nav").find("a[id='mod_"+boxid+"']").addClass("thisclass").blur(); | $("#nav").find("a[id='mod_"+boxid+"']").addClass("thisclass").blur(); | ||||
} | } | ||||
window.location.href = mlink.attr("_url"); | window.location.href = mlink.attr("_url"); | ||||
}else if(mlink.attr("_open") && mlink.attr("_open")!=undefined){ | |||||
} else if (mlink.attr("_open") && mlink.attr("_open")!=undefined){ | |||||
window.open(mlink.attr("_open")); | window.open(mlink.attr("_open")); | ||||
} | } | ||||
} | } | ||||
@@ -28,7 +28,7 @@ function insertHtm(op, code, isStart) { | |||||
ContextMenu.WebFX_PopUp = null; | ContextMenu.WebFX_PopUp = null; | ||||
ContextMenu.WbFX_PopUpcss = null; | ContextMenu.WbFX_PopUpcss = null; | ||||
ContextMenu.intializeContextMenu = function () { | ContextMenu.intializeContextMenu = function () { | ||||
insertHtm(document.body, '<iframe src="#" scrolling="no" class="WebFX-ContextMenu" marginwidth="0" marginheight="0" frameborder="0" style="position:absolute;display:none;z-index:50000000;" id="WebFX_PopUp"></iframe>', true); | |||||
insertHtm(document.body, '<iframe src="" scrolling="no" class="WebFX-ContextMenu" marginwidth="0" marginheight="0" frameborder="0" style="position:absolute;display:none;z-index:50000000;" id="WebFX_PopUp"></iframe>', true); | |||||
if (curNav() == 'IE') WebFX_PopUp = document.frames['WebFX_PopUp']; | if (curNav() == 'IE') WebFX_PopUp = document.frames['WebFX_PopUp']; | ||||
else WebFX_PopUp = document.getElementById('WebFX_PopUp'); | else WebFX_PopUp = document.getElementById('WebFX_PopUp'); | ||||
WebFX_PopUpcss = document.getElementById('WebFX_PopUp'); | WebFX_PopUpcss = document.getElementById('WebFX_PopUp'); | ||||
@@ -38,7 +38,6 @@ ContextMenu.intializeContextMenu = function () { | |||||
else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); | else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); | ||||
if (curNav() == 'IE') document.attachEvent("onblur", function () { WebFX_PopUpcss.style.display = "none" }); | if (curNav() == 'IE') document.attachEvent("onblur", function () { WebFX_PopUpcss.style.display = "none" }); | ||||
else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); | else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); | ||||
} | } | ||||
function ContextSeperator() { } | function ContextSeperator() { } | ||||
function ContextMenu() { } | function ContextMenu() { } | ||||
@@ -19,9 +19,9 @@ function AlertMsg(title, id) { | |||||
//弹出窗口设置 | //弹出窗口设置 | ||||
msgw = 600;//窗口宽度 | msgw = 600;//窗口宽度 | ||||
msgbg = "#FFF";//内容背景 | msgbg = "#FFF";//内容背景 | ||||
msgcolor = "#000";//内容颜色 | |||||
msgcolor = "#333";//内容颜色 | |||||
titlecolor = "#254015";//标题颜色 | titlecolor = "#254015";//标题颜色 | ||||
titlebg = "#369 url(../../static/web/img/tbg.gif)";//标题背景 | |||||
titlebg = "url(../../static/web/img/tbg.gif)";//标题背景 | |||||
//遮罩背景设置 | //遮罩背景设置 | ||||
content = "<div id=show_news>对不起,载入失败</div>"; | content = "<div id=show_news>对不起,载入失败</div>"; | ||||
var sWidth, sHeight; | var sWidth, sHeight; | ||||
@@ -39,7 +39,7 @@ function AlertMsg(title, id) { | |||||
maskObj.style.left = "0"; | maskObj.style.left = "0"; | ||||
maskObj.style.background = "#666"; | maskObj.style.background = "#666"; | ||||
maskObj.style.filter = "Alpha(opacity=30);"; | maskObj.style.filter = "Alpha(opacity=30);"; | ||||
maskObj.style.opacity = "0.3"; | |||||
maskObj.style.opacity = "0.2"; | |||||
maskObj.style.width = sWidth + "px"; | maskObj.style.width = sWidth + "px"; | ||||
maskObj.style.height = sHeight + "px"; | maskObj.style.height = sHeight + "px"; | ||||
maskObj.style.zIndex = "10000"; | maskObj.style.zIndex = "10000"; | ||||
@@ -30,7 +30,6 @@ function heartBeat() { | |||||
if (NS) document.floater.left += percent; | if (NS) document.floater.left += percent; | ||||
lastScrollX = lastScrollX + percent; | lastScrollX = lastScrollX + percent; | ||||
} | } | ||||
} | } | ||||
function checkFocus(x, y) { | function checkFocus(x, y) { | ||||
stalkerx = document.floater.pageX; | stalkerx = document.floater.pageX; | ||||
@@ -35,7 +35,6 @@ function fileQueueError(file, errorCode, message) { | |||||
} catch (ex) { | } catch (ex) { | ||||
this.debug(ex); | this.debug(ex); | ||||
} | } | ||||
} | } | ||||
function fileDialogComplete(numFilesSelected, numFilesQueued) { | function fileDialogComplete(numFilesSelected, numFilesQueued) { | ||||
try { | try { | ||||
@@ -131,7 +130,6 @@ function uploadError(file, errorCode, message) { | |||||
} catch (ex3) { | } catch (ex3) { | ||||
this.debug(ex3); | this.debug(ex3); | ||||
} | } | ||||
} | } | ||||
var albImg = 0; | var albImg = 0; | ||||
function addImage(src, pid) { | function addImage(src, pid) { | ||||
@@ -152,10 +150,10 @@ function addImage(src, pid) { | |||||
if (typeof arctype != 'undefined' && arctype == 'article') { | if (typeof arctype != 'undefined' && arctype == 'article') { | ||||
iptwidth = 100; | iptwidth = 100; | ||||
if (pid != 0) { | if (pid != 0) { | ||||
newImgDiv.innerHTML = '<img src="' + src + '" style="width:160px" onClick="addtoEdit(' + pid + ')">' + delstr; | |||||
newImgDiv.innerHTML = '<img src="' + src + '" onClick="addtoEdit(' + pid + ')" style="width:160px">' + delstr; | |||||
} | } | ||||
} | } | ||||
newImgDiv.innerHTML += '<div style="margin-top:10px">注释:<input type="text" name="picinfo' + albImg + '" value="" style="width:' + iptwidth + 'px;"></div>'; | |||||
newImgDiv.innerHTML += '<div style="margin-top:10px">注释:<input type="text" name="picinfo' + albImg + '" value="" style="width:' + iptwidth + 'px"></div>'; | |||||
} | } | ||||
/* ****************************************** | /* ****************************************** | ||||
* FileProgress Object | * FileProgress Object | ||||
@@ -221,7 +219,6 @@ FileProgress.prototype.setCancelled = function () { | |||||
FileProgress.prototype.setStatus = function (status) { | FileProgress.prototype.setStatus = function (status) { | ||||
this.fileProgressElement.childNodes[2].innerHTML = status; | this.fileProgressElement.childNodes[2].innerHTML = status; | ||||
}; | }; | ||||
FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { | FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { | ||||
this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; | this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; | ||||
if (swfuploadInstance) { | if (swfuploadInstance) { | ||||
@@ -80,7 +80,7 @@ function LoadServer() { | |||||
$.get("index_body.php?dopost=system_info", function (data) { | $.get("index_body.php?dopost=system_info", function (data) { | ||||
let rsp = JSON.parse(data); | let rsp = JSON.parse(data); | ||||
if (rsp.code === 200) { | if (rsp.code === 200) { | ||||
let infoStr = `<table width="100%" class="table table-borderless"><tbody>`; | |||||
let infoStr = `<table class="table table-borderless"><tbody>`; | |||||
if (typeof rsp.result.domain !== "undefined") { | if (typeof rsp.result.domain !== "undefined") { | ||||
infoStr += ` | infoStr += ` | ||||
<tr> | <tr> | ||||
@@ -46,7 +46,6 @@ function adArc(aid){ | |||||
if(aid==0) aid = getOneItem(); | if(aid==0) aid = getOneItem(); | ||||
location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; | location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; | ||||
} | } | ||||
function cAtts(jname, e, obj) | function cAtts(jname, e, obj) | ||||
{ | { | ||||
var qstr=getCheckboxItem(); | var qstr=getCheckboxItem(); | ||||
@@ -56,16 +55,14 @@ function cAtts(jname, e, obj) | |||||
ShowMsg('必须选择一个或多个文档'); | ShowMsg('必须选择一个或多个文档'); | ||||
return; | return; | ||||
} | } | ||||
LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr='+qstr+'&dojob='+jname+'&rnd='+Math.random(), 'attsDlg', '450px', '160px'); | |||||
LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr='+qstr+'&dojob='+jname+'&rnd='+Math.random(), 'attsDlg', '450px', '180px'); | |||||
ChangeFullDiv('show', screeheight); | ChangeFullDiv('show', screeheight); | ||||
} | } | ||||
function delArc(aid){ | function delArc(aid){ | ||||
var qstr=getCheckboxItem(); | var qstr=getCheckboxItem(); | ||||
if(aid==0) aid = getOneItem(); | if(aid==0) aid = getOneItem(); | ||||
location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; | location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; | ||||
} | } | ||||
function QuickEdit(aid, e, obj) | 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'); | ||||
@@ -77,7 +74,7 @@ function ShowMenu(evt,obj,aid,atitle) | |||||
var popupoptions | var popupoptions | ||||
popupoptions = [ | popupoptions = [ | ||||
new ContextItem("浏览文档",function(){ viewArc(aid); }), | new ContextItem("浏览文档",function(){ viewArc(aid); }), | ||||
new ContextItem("编辑属性",function(){ QuickEdit(aid, evt, obj); }), | |||||
new ContextItem("编辑属性",function(){ QuickEdit(aid, evt, obj); }), | |||||
new ContextItem("编辑文档",function(){ editArc(aid); }), | new ContextItem("编辑文档",function(){ editArc(aid); }), | ||||
new ContextSeperator(), | new ContextSeperator(), | ||||
new ContextItem("更新HTML",function(){ updateArc(aid); }), | new ContextItem("更新HTML",function(){ updateArc(aid); }), | ||||
@@ -6,20 +6,16 @@ var nForm = null; | |||||
var nFrame = null; | var nFrame = null; | ||||
var picnameObj = null; | var picnameObj = null; | ||||
var vImg = null; | var vImg = null; | ||||
function GetWinPos(w, h) { | function GetWinPos(w, h) { | ||||
var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX; | var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX; | ||||
var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY; | var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY; | ||||
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; | var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; | ||||
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; | var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; | ||||
var systemZoom = width / window.screen.availWidth; | var systemZoom = width / window.screen.availWidth; | ||||
var left = (width - w) / 2 / systemZoom + dualScreenLeft; | var left = (width - w) / 2 / systemZoom + dualScreenLeft; | ||||
var top = (height - h) / 2 / systemZoom + dualScreenTop; | var top = (height - h) / 2 / systemZoom + dualScreenTop; | ||||
return { left: left, top: top }; | return { left: left, top: top }; | ||||
} | } | ||||
function $Nav() { | function $Nav() { | ||||
if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; | if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; | ||||
else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; | else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; | ||||