@@ -6,6 +6,20 @@ 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'; | |||
@@ -102,50 +116,43 @@ function SeePicNew(f, imgdid, frname, hpos, acname) { | |||
nForm.litpic.disabled = true; | |||
} | |||
function SelectFlash() { | |||
if ($Nav() == 'IE') { var posLeft = window.event.clientX - 300; var posTop = window.event.clientY; } | |||
else { var posLeft = 100; var posTop = 100; } | |||
window.open("./dialog/select_media.php?f=form1.flashurl", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("./dialog/select_media.php?f=form1.flashurl", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function SelectMedia(fname) { | |||
if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } | |||
else { var posLeft = 100; var posTop = 100; } | |||
window.open("./dialog/select_media.php?f=" + fname, "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("./dialog/select_media.php?f=" + fname, "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function SelectSoft(fname) { | |||
if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY - 50; } | |||
else { var posLeft = 100; var posTop = 100; } | |||
window.open("./dialog/select_soft.php?f=" + fname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("./dialog/select_soft.php?f=" + fname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function SelectImage(fname, stype, imgsel) { | |||
if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } | |||
else { var posLeft = 100; var posTop = 100; } | |||
var pos = GetWinPos(800,600); | |||
if (!fname) fname = 'form1.picname'; | |||
if (imgsel) imgsel = '&noeditor=yes'; | |||
if (!stype) stype = ''; | |||
window.open("./dialog/select_images.php?f=" + fname + "&noeditor=yes&imgstick=" + stype + imgsel, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=650,height=400,left=" + posLeft + ", top=" + posTop); | |||
window.open("./dialog/select_images.php?f=" + fname + "&noeditor=yes&imgstick=" + stype + imgsel, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function imageCut(fname) { | |||
if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } | |||
else { var posLeft = 100; var posTop = 100; } | |||
var pos = GetWinPos(800,600); | |||
if (!fname) fname = 'picname'; | |||
file = document.getElementById(fname).value; | |||
if (file == '') { | |||
alert('请先选择网站内已上传的图片'); | |||
return false; | |||
} | |||
window.open("imagecut.php?f=" + fname + "&file=" + file, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop); | |||
window.open("imagecut.php?f=" + fname + "&file=" + file, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function SelectImageN(fname, stype, vname) { | |||
if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } | |||
else { var posLeft = 100; var posTop = 100; } | |||
var pos = GetWinPos(800,600); | |||
if (!fname) fname = 'form1.picname'; | |||
if (!stype) stype = ''; | |||
window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + stype + "&v=" + vname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + stype + "&v=" + vname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function SelectKeywords(f) { | |||
if ($Nav() == 'IE') { var posLeft = window.event.clientX - 350; var posTop = window.event.clientY - 200; } | |||
else { var posLeft = 100; var posTop = 100; } | |||
window.open("article_keywords_select.php?f=" + f, "popUpkwWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("article_keywords_select.php?f=" + f, "popUpkwWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function InitPage() { | |||
var selsource = $Obj('selsource'); | |||
@@ -157,10 +164,12 @@ function InitPage() { | |||
if (titlechange) { titlechange.onchange = function (e) { TestHasTitle(e); } } | |||
} | |||
function OpenMyWin(surl) { | |||
window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=200, top=100"); | |||
var pos = GetWinPos(800,600); | |||
window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left="+pos.left+", top="+pos.top); | |||
} | |||
function OpenMyWinCoOne(surl) { | |||
window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=450,left=100,top=50"); | |||
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); | |||
} | |||
function PutSource(str) { | |||
var osource = $Obj('source'); | |||
@@ -202,7 +211,7 @@ function ChangeFullDiv(showhide, screenheigt) { | |||
newobj.className = 'fullpagediv'; | |||
newobj.style.height = document.body.clientHeight + 50 + 'px'; | |||
document.body.appendChild(newobj); | |||
} else { | |||
} else { | |||
newobj.style.display = 'block'; | |||
} | |||
} else { | |||
@@ -244,7 +253,7 @@ function LoadNewDiv(e, surl, oname) { | |||
newobj.style.display = "block"; | |||
} | |||
if (newobj.innerHTML.length < 10) { | |||
fetch(surl).then(resp=>resp.text()).then((d)=>{newobj.innerHTML = d}); | |||
fetch(surl).then(resp => resp.text()).then((d) => { newobj.innerHTML = d }); | |||
} | |||
} | |||
function TestHasTitle(e) { | |||
@@ -265,7 +274,7 @@ function LoadNewDiv2(e, surl, oname, dlgcls) { | |||
document.body.appendChild(newobj); | |||
} | |||
newobj.innerHTML = ''; | |||
fetch(surl).then(resp=>resp.text()).then((d)=>{ | |||
fetch(surl).then(resp => resp.text()).then((d) => { | |||
newobj.innerHTML = d; | |||
}); | |||
if (newobj.innerHTML == '') newobj.style.display = 'none'; | |||
@@ -329,7 +338,7 @@ function LoadQuickDiv(e, surl, oname, w, h) { | |||
newobj.style.left = posLeft + "px"; | |||
newobj.innerHTML = '<div style="margin-top:10px;margin-left:10px;"><img src="../../static/web/img/loadinglit.gif">Loading...</div>'; | |||
newobj.style.display = 'block'; | |||
fetch(surl).then(resp=>resp.text()).then((d)=>{ | |||
fetch(surl).then(resp => resp.text()).then((d) => { | |||
newobj.innerHTML = d; | |||
}); | |||
fixupPos = false; | |||
@@ -623,25 +632,25 @@ function useDefault(modalID) { | |||
CloseModal('GKModal' + modalID); | |||
} | |||
function uploadImage(litpicImgSrc) { | |||
const formData = new FormData() | |||
formData.append('litpic_b64', litpicImgSrc); | |||
fetch('archives_do.php?dopost=upload_base64_image', { | |||
method: 'POST', | |||
body: formData | |||
}) | |||
.then(r => { | |||
if (r.ok) { | |||
return r.json() | |||
} | |||
throw new Error(errMsg); | |||
}) | |||
.then(d => { | |||
if (d.code == 200) { | |||
$("#picname").val(d.data.image_url); | |||
} | |||
}).catch((error) => { | |||
alert("上传缩略图错误"); | |||
}); | |||
const formData = new FormData() | |||
formData.append('litpic_b64', litpicImgSrc); | |||
fetch('archives_do.php?dopost=upload_base64_image', { | |||
method: 'POST', | |||
body: formData | |||
}) | |||
.then(r => { | |||
if (r.ok) { | |||
return r.json() | |||
} | |||
throw new Error(errMsg); | |||
}) | |||
.then(d => { | |||
if (d.code == 200) { | |||
$("#picname").val(d.data.image_url); | |||
} | |||
}).catch((error) => { | |||
alert("上传缩略图错误"); | |||
}); | |||
} | |||
$(document).ready(function () { | |||
$("#btnClearAll").click(function (event) { | |||
@@ -663,7 +672,7 @@ $(document).ready(function () { | |||
reader.onload = (function (theFile) { | |||
return function (e) { | |||
litpicImgSrc = e.target.result; | |||
if (cfg_uplitpic_cut=='Y') { | |||
if (cfg_uplitpic_cut == 'Y') { | |||
SetThumb(litpicImgSrc); | |||
} else { | |||
uploadImage(litpicImgSrc); | |||
@@ -27,14 +27,8 @@ function Nav() { | |||
else return "OT"; | |||
} | |||
function SelectTemplets(fname) { | |||
if (document.all) { | |||
var posLeft = window.event.clientY - 100; | |||
var posTop = window.event.clientX - 400; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=680,height=400,left=" + posLeft + ", top=" + posTop); | |||
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 ShowHide(objname) { | |||
var obj = document.getElementById(objname); | |||
@@ -27,9 +27,8 @@ function Nav() { | |||
else return "OT"; | |||
} | |||
function SelectTemplets(fname) { | |||
var posLeft = 200; | |||
var posTop = 300; | |||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=680,height=400,left=" + posLeft + ", top=" + posTop); | |||
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 ShowHide(objname) { | |||
var obj = document.getElementById(objname); | |||
@@ -8,14 +8,8 @@ | |||
<script language="javascript" src="js/main.js"></script> | |||
<script language="javascript"> | |||
function SelectTemplets(fname){ | |||
if(document.all){ | |||
var posLeft = window.event.clientY-100; | |||
var posTop = window.event.clientX-400; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("dialog/select_templets.php?f="+fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left="+posLeft+", top="+posTop); | |||
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); | |||
} | |||
</script> | |||
</head> | |||
@@ -305,14 +305,8 @@ | |||
obj.style.display = "block"; | |||
} | |||
function SelectTemplets(fname) { | |||
if (document.all) { | |||
var posLeft = window.event.clientY - 200; | |||
var posTop = window.event.clientX - 300; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
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); | |||
} | |||
function CheckSubmit() { | |||
if (document.form1.title.value == "") { | |||
@@ -28,14 +28,8 @@ | |||
obj.style.display = "block"; | |||
} | |||
function SelectTemplets(fname) { | |||
if (document.all) { | |||
var posLeft = window.event.clientY - 200; | |||
var posTop = window.event.clientX - 300; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
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); | |||
} | |||
function CheckSubmit() { | |||
if (document.form1.title.value == "") { | |||
@@ -7,11 +7,11 @@ | |||
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css"> | |||
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="../static/web/css/admin.css"> | |||
<script src="js/main.js" language="javascript"></script> | |||
<script language="javascript"> | |||
function SelectTemplets(fname) { | |||
var posLeft = 200; | |||
var posTop = 300; | |||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
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 htmlSubmit() { | |||
form1.submit(); | |||
@@ -6,16 +6,11 @@ | |||
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css"> | |||
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="../static/web/css/admin.css"> | |||
<script src="js/main.js" language="javascript"></script> | |||
<script language="javascript"> | |||
function SelectTemplets(fname) { | |||
if (document.all) { | |||
var posLeft = window.event.clientY - 100; | |||
var posTop = window.event.clientX - 400; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir.'/plus')?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir.'/plus')?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
</script> | |||
</head> | |||
@@ -7,6 +7,7 @@ | |||
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="../static/web/css/admin.css"> | |||
<link rel="stylesheet" href="css/codemirror.css"> | |||
<script src="js/main.js" language="javascript"></script> | |||
<script type="text/javascript" src="js/codemirror.js"></script> | |||
<script type="text/javascript" src="js/mode/xml/xml.js"></script> | |||
<script type="text/javascript" src="js/mode/javascript/javascript.js"></script> | |||
@@ -221,9 +222,8 @@ | |||
document.form1.submit(); | |||
} | |||
function SelectArcList(fname) { | |||
var posLeft = 10; | |||
var posTop = 10; | |||
window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=700,height=500,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
</script> | |||
</body> |
@@ -6,9 +6,10 @@ | |||
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css"> | |||
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css"> | |||
<link rel="stylesheet" href="../static/web/css/admin.css"> | |||
<style> | |||
.table td,.table th{border-top:0} | |||
</style> | |||
<style> | |||
.table td,.table th{border-top:0} | |||
</style> | |||
<script src="js/main.js" language="javascript"></script> | |||
<script language="javascript"> | |||
//获得选中项 | |||
function getCheckboxItem() { | |||
@@ -63,7 +64,8 @@ | |||
location.href = "shops_operations.php?dopost=push&nid=" + nid; | |||
} | |||
function OpenMyWinN(surl, w, h) { | |||
window.open(surl, "popUpMyWinN", "scrollbars=yes,resizable=yes,statebar=no,width=" + w + ",height=" + h + ",left=200, top=100"); | |||
var pos = GetWinPos(w,h); | |||
window.open(surl, "popUpMyWinN", "scrollbars=yes,resizable=yes,statebar=no,width=" + w + ",height=" + h + ",left="+pos.left+", top="+pos.top); | |||
} | |||
</script> | |||
</head> | |||
@@ -125,11 +127,11 @@ | |||
<?php echo $fields['oid']; ?> | |||
</td> | |||
<td align="center"> | |||
<a href="javascript:OpenMyWinN('shops_operations_userinfo.php?oid=<?php echo $fields['oid']?>',500,350);"><?php echo $fields['consignee']?></a> | |||
<a href="javascript:OpenMyWinN('shops_operations_userinfo.php?oid=<?php echo $fields['oid']?>',800,600);"><?php echo $fields['consignee']?></a> | |||
</td> | |||
<td align="center"> | |||
<?php echo $fields['cartcount']?> | |||
<a class="btn btn-success btn-sm" href="javascript:OpenMyWinN('shops_operations_cart.php?oid=<?php echo $fields['oid']?>',680,450);">详情</a> | |||
<a class="btn btn-success btn-sm" href="javascript:OpenMyWinN('shops_operations_cart.php?oid=<?php echo $fields['oid']?>',800,600);">详情</a> | |||
</td> | |||
<td align="center"> | |||
<?php echo GetDateTimeMk($fields['stime'])?> | |||
@@ -31,19 +31,16 @@ | |||
} | |||
} | |||
function SelectArcList(fname) { | |||
var posLeft = 10; | |||
var posTop = 10; | |||
window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=500,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function SelectImage(fname, vlist) { | |||
var posLeft = 10; | |||
var posTop = 10; | |||
window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + vlist, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
var pos = GetWinPos(800,600); | |||
window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + vlist, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top); | |||
} | |||
function SelectTemplets(fname) { | |||
var posLeft = 10; | |||
var posTop = 10; | |||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
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 CheckVal(id) { | |||
var notename = $DE('notename' + id); | |||
@@ -19,24 +19,12 @@ | |||
<script src="../static/web/js/cropper.min.js"></script> | |||
<script language="javascript"> | |||
function SelectTemplets(fname) { | |||
if (document.all) { | |||
var posLeft = window.event.clientY - 100; | |||
var posTop = window.event.clientX - 400; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
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) { | |||
if (document.all) { | |||
var posLeft = window.event.clientY - 100; | |||
var posTop = window.event.clientX - 400; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("content_select_list.php?f=" + fname, "selArcList", "scrollbars=yes,resizable=yes,statebar=no,width=700,height=500,left=" + posLeft + ", top=" + posTop); | |||
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 == "") { | |||
@@ -9,16 +9,11 @@ | |||
<link rel="stylesheet" media="all" href="../static/web/js/calendar/calendar-win2k-1.css"> | |||
<script type="text/javascript" src="../static/web/js/calendar/calendar.js"></script> | |||
<script type="text/javascript" src="../static/web/js/calendar/calendar-cn.js"></script> | |||
<script language='javascript' src='js/main.js'></script> | |||
<script language="javascript"> | |||
function SelectTemplets(fname) { | |||
if (document.all) { | |||
var posLeft = window.event.clientY - 100; | |||
var posTop = window.event.clientX - 400; | |||
} else { | |||
var posLeft = 100; | |||
var posTop = 100; | |||
} | |||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
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); | |||
} | |||
</script> | |||
<link rel="stylesheet" href="css/codemirror.css"> | |||
@@ -4,8 +4,18 @@ CKEDITOR.plugins.add("ddfilebrowser", { | |||
a.addCommand("openDDFileBrowser", | |||
{ | |||
exec: function (a) { | |||
var posLeft = 100; var posTop = 100; | |||
window.open("./dialog/select_soft.php?f=" + a.name, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||
var w = 800; | |||
var h = 600; | |||
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 posLeft = (width - w) / 2 / systemZoom + dualScreenLeft; | |||
var posTop = (height - h) / 2 / systemZoom + dualScreenTop; | |||
window.open("./dialog/select_soft.php?f=" + a.name, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop); | |||
} | |||
}); | |||
a.ui.addButton("DDFileBrowser", | |||