diff --git a/src/admin/js/base.js b/src/admin/js/base.js index 38ee19bd..ebc30e32 100644 --- a/src/admin/js/base.js +++ b/src/admin/js/base.js @@ -12,17 +12,17 @@ //表格折叠 $(".tform").find("tbody tr th[_show]").each(function(i){ //加入折叠提示 - if($(this).attr("_show")=="no"){ - $(this).append(" "); - }else{ - $(this).append(" "); + if ($(this).attr("_show")=="no"){ + $(this).append(" "); + } else { + $(this).append(" "); } //折叠动作 $(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).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).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).show(); } @@ -34,7 +34,7 @@ }); //列表行高亮 $("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(){ $(this).removeClass("t_on"); }); @@ -44,23 +44,21 @@ $(this).find("tbody tr").click(function(){ checkbox = $(this).find("td input[type='checkbox']"); tr = $(this); - - if(checkbox.attr("checked")===false){ + if (checkbox.attr("checked")===false){ checkbox.attr("checked","checked"); tr.addClass("t_sl"); - }else{ + } else { checkbox.removeAttr("checked"); tr.removeClass("t_sl"); } - }); //处理checkbox点击 $(this).find("td input[type='checkbox']").click(function(){ tr = $(this).parent("td").parent("tr"); - if($(this).attr("checked")===false){ + if ($(this).attr("checked")===false){ $(this).attr("checked","checked"); tr.removeClass("t_sl"); - }else{ + } else { $(this).removeAttr("checked"); tr.addClass("t_sl"); } @@ -69,15 +67,14 @@ $(this).find("tbody tr td a,tbody tr td button,tbody tr td table").click(function(){ tr = $(this).parent("td").parent("tr"); checkbox = tr.find("td input[type='checkbox']"); - if(checkbox.attr("checked")===false){ + if (checkbox.attr("checked")===false){ checkbox.attr("checked","checked"); tr.removeClass("t_sl"); - }else{ + } else { checkbox.removeAttr("checked"); tr.addClass("t_sl"); } }); - }); //高亮初始化 setChecklight(); @@ -93,15 +90,14 @@ ckbox.each(function(){ $(this).attr("checked") === false ? $(this).attr("checked","checked") : $(this).removeAttr("checked"); }); - setChecklight(); }); //自定义提交 $("button[_submit]").click(function(){ url = $(this).attr("_submit"); - if(/\[new\].*/.test(url)){ + if (/\[new\].*/.test(url)){ url = url.replace(/\[new\]/,""); - }else{ + } else { url = $(this).parents("form").attr("action")+url; } $(this).parents("form").attr("action",url).submit(); @@ -111,9 +107,9 @@ function setChecklight(){ $(".tlist[_dlist*='check']").find("tbody tr td input[type='checkbox']").each(function(i){ tr = $(this).parent("td").parent("tr"); - if($(this).attr("checked")){ + if ($(this).attr("checked")){ tr.addClass("t_sl"); - }else{ + } else { tr.removeClass("t_sl"); } }); @@ -122,20 +118,20 @@ function AC(mid){ f = $(window.parent.document); mlink = f.find("a[id='"+mid+"']"); - if(mlink.size()>0){ + if (mlink.size()>0){ box = mlink.parents("div[id^='menu_']"); 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(); box.show(); 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[id='mod_"+boxid+"']").addClass("thisclass").blur(); } 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")); } } diff --git a/src/admin/js/context_menu.js b/src/admin/js/context_menu.js index f8daa338..be64821d 100644 --- a/src/admin/js/context_menu.js +++ b/src/admin/js/context_menu.js @@ -28,7 +28,7 @@ function insertHtm(op, code, isStart) { ContextMenu.WebFX_PopUp = null; ContextMenu.WbFX_PopUpcss = null; ContextMenu.intializeContextMenu = function () { - insertHtm(document.body, '', true); + insertHtm(document.body, '', true); if (curNav() == 'IE') WebFX_PopUp = document.frames['WebFX_PopUp']; else WebFX_PopUp = 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); if (curNav() == 'IE') document.attachEvent("onblur", function () { WebFX_PopUpcss.style.display = "none" }); else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); - } function ContextSeperator() { } function ContextMenu() { } diff --git a/src/admin/js/dialog.js b/src/admin/js/dialog.js index ee9a62b0..dda352e4 100644 --- a/src/admin/js/dialog.js +++ b/src/admin/js/dialog.js @@ -19,9 +19,9 @@ function AlertMsg(title, id) { //弹出窗口设置 msgw = 600;//窗口宽度 msgbg = "#FFF";//内容背景 - msgcolor = "#000";//内容颜色 + msgcolor = "#333";//内容颜色 titlecolor = "#254015";//标题颜色 - titlebg = "#369 url(../../static/web/img/tbg.gif)";//标题背景 + titlebg = "url(../../static/web/img/tbg.gif)";//标题背景 //遮罩背景设置 content = "
对不起,载入失败
"; var sWidth, sHeight; @@ -39,7 +39,7 @@ function AlertMsg(title, id) { maskObj.style.left = "0"; maskObj.style.background = "#666"; maskObj.style.filter = "Alpha(opacity=30);"; - maskObj.style.opacity = "0.3"; + maskObj.style.opacity = "0.2"; maskObj.style.width = sWidth + "px"; maskObj.style.height = sHeight + "px"; maskObj.style.zIndex = "10000"; diff --git a/src/admin/js/float.js b/src/admin/js/float.js index f4b54fe3..473004e3 100644 --- a/src/admin/js/float.js +++ b/src/admin/js/float.js @@ -30,7 +30,6 @@ function heartBeat() { if (NS) document.floater.left += percent; lastScrollX = lastScrollX + percent; } - } function checkFocus(x, y) { stalkerx = document.floater.pageX; diff --git a/src/admin/js/handlers.js b/src/admin/js/handlers.js index 35ba47cf..b0ab32eb 100644 --- a/src/admin/js/handlers.js +++ b/src/admin/js/handlers.js @@ -35,7 +35,6 @@ function fileQueueError(file, errorCode, message) { } catch (ex) { this.debug(ex); } - } function fileDialogComplete(numFilesSelected, numFilesQueued) { try { @@ -131,7 +130,6 @@ function uploadError(file, errorCode, message) { } catch (ex3) { this.debug(ex3); } - } var albImg = 0; function addImage(src, pid) { @@ -152,10 +150,10 @@ function addImage(src, pid) { if (typeof arctype != 'undefined' && arctype == 'article') { iptwidth = 100; if (pid != 0) { - newImgDiv.innerHTML = '' + delstr; + newImgDiv.innerHTML = '' + delstr; } } - newImgDiv.innerHTML += '
注释:
'; + newImgDiv.innerHTML += '
注释:
'; } /* ****************************************** * FileProgress Object @@ -221,7 +219,6 @@ FileProgress.prototype.setCancelled = function () { FileProgress.prototype.setStatus = function (status) { this.fileProgressElement.childNodes[2].innerHTML = status; }; - FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; if (swfuploadInstance) { diff --git a/src/admin/js/indexbody.js b/src/admin/js/indexbody.js index faebb199..1c94c37b 100644 --- a/src/admin/js/indexbody.js +++ b/src/admin/js/indexbody.js @@ -80,7 +80,7 @@ function LoadServer() { $.get("index_body.php?dopost=system_info", function (data) { let rsp = JSON.parse(data); if (rsp.code === 200) { - let infoStr = ``; + let infoStr = `
`; if (typeof rsp.result.domain !== "undefined") { infoStr += ` diff --git a/src/admin/js/list.js b/src/admin/js/list.js index 7270a6f7..1ed693e2 100644 --- a/src/admin/js/list.js +++ b/src/admin/js/list.js @@ -46,7 +46,6 @@ function adArc(aid){ if(aid==0) aid = getOneItem(); location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; } - function cAtts(jname, e, obj) { var qstr=getCheckboxItem(); @@ -56,16 +55,14 @@ function cAtts(jname, e, obj) ShowMsg('必须选择一个或多个文档'); 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); } - function delArc(aid){ var qstr=getCheckboxItem(); if(aid==0) aid = getOneItem(); location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; } - function QuickEdit(aid, e, obj) { 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 popupoptions = [ 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 ContextSeperator(), new ContextItem("更新HTML",function(){ updateArc(aid); }), diff --git a/src/admin/js/main.js b/src/admin/js/main.js index b82e363a..1ae040b7 100644 --- a/src/admin/js/main.js +++ b/src/admin/js/main.js @@ -6,20 +6,16 @@ var nForm = null; var nFrame = null; var picnameObj = null; var vImg = null; - function GetWinPos(w, h) { var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX; var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY; - 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 systemZoom = width / window.screen.availWidth; var left = (width - w) / 2 / systemZoom + dualScreenLeft; var top = (height - h) / 2 / systemZoom + dualScreenTop; return { left: left, top: top }; } - function $Nav() { if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF';