Browse Source

移除弹出层移动窗口位置

tags/6.2.5
叙述、别离 2 years ago
parent
commit
4ce5eb479c
2 changed files with 3 additions and 61 deletions
  1. +3
    -3
      src/admin/archives_do.php
  2. +0
    -58
      src/admin/js/main.js

+ 3
- 3
src/admin/archives_do.php View File

@@ -253,7 +253,7 @@ else if ($dopost == "checkArchives") {
</select>";
//输出Ajax可移动窗体
$divname = 'moveArchives';
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 260);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">移动文档</div>";
echo "<div class='title'>移动文档</div>";
echo "<form name='quickeditform' action='archives_do.php' method='post'>";
echo "<input type='hidden' name='dopost' value='{$dopost}'>";
echo "<input type='hidden' name='qstr' value='{$qstr}'>";
@@ -477,7 +477,7 @@ else if ($dopost == 'quickEdit') {
$query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel LEFT JOIN `#@__arcrank` ar ON ar.`rank`=arc.arcrank WHERE arc.id='$aid' ";
$arcRow = $dsql->GetOne($query);
$divname = 'quickEdit';
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 260);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">文档属性修改</div>";
echo "<div class='title'>文档属性修改</div>";
echo "<form name='quickeditform' action='archives_do.php?dopost=quickEditSave&aid={$aid}' method='post'>";
echo "<input type='hidden' name='addtable' value='{$arcRow['addtable']}'>";
echo "<input type='hidden' name='oldtypeid' value='{$arcRow['typeid']}'>";
@@ -755,7 +755,7 @@ else if ($dopost == 'attsDlg') {
AjaxHead();
//输出Ajax可移动窗体
$divname = 'attsDlg';
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 260);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">{$dojobname}</div>";
echo "<div class='title'>{$dojobname}</div>";
echo "<form name='quickeditform' action='archives_do.php' method='post'>";
echo "<input type='hidden' name='dopost' value='{$dojob}'>";
echo "<input type='hidden' name='qstr' value='{$qstr}'>";


+ 0
- 58
src/admin/js/main.js View File

@@ -298,64 +298,6 @@ function LoadQuickDiv(e, surl, oname, w, h) {
});
fixupPos = false;
}
//通用事件获取接口
function getEvent() {
if ($Nav() == 'IE') return window.event;
func = getEvent.caller;
while (func != null) {
var arg0 = func.arguments[0];
if (arg0) {
if ((arg0.constructor == Event || arg0.constructor == MouseEvent) || (typeof (arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) {
return arg0;
}
}
func = func.caller;
}
return null;
}
//模拟ondrop事件相关代码
function DropStart() {
this.style.cursor = 'move';
}
function DropStop() {
this.style.cursor = 'default';
}
function DropMove() {
if (this.style.cursor != 'move') return;
var event = getEvent();
if ($Nav() == 'IE') {
var posLeft = event.clientX - 20;
var posTop = event.clientY - 30;
posTop += document.body.scrollTop;
} else {
var posLeft = event.pageX - 20;
var posTop = event.pageY - 30;
}
this.style.top = posTop;
this.style.left = posLeft - leftLeaning;
}
//对指定的元素绑定move事件
function DropStartHand() {
canMove = (canMove ? false : true);
}
function DropStopHand() {
canMove = false;
}
function DropMoveHand(objid, mleftLeaning) {
var event = getEvent();
var obj = $Obj(objid);
if (!canMove) return;
if ($Nav() == 'IE') {
var posLeft = event.clientX - 20;
var posTop = event.clientY - 20;
posTop += window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
} else {
var posLeft = event.pageX - 20;
var posTop = event.pageY - 20;
}
obj.style.top = posTop + "px";
obj.style.left = posLeft - mleftLeaning + "px";
}
//复制文档到剪切板
function copyToClipboard(txt) {
if (txt == null || txt == '') {


Loading…
Cancel
Save