adapted patch #3050492 to new code

This commit is contained in:
Marc Delisle
2010-08-28 08:57:27 -04:00
parent 35c4fc35ee
commit 56381c086f
3 changed files with 10 additions and 1 deletions

View File

@@ -113,6 +113,8 @@ $Id$
+ [interface] AJAXification on various pages
3.3.7.0 (not yet released)
- patch #3050492 [PDF scratchboard] Cannot drag table box to the edge after
a page size increase, thanks to Martin Schönberger - mad05
3.3.6.0 (not yet released)
- bug #3033063 [core] Navi gets wrong db name

View File

@@ -1406,6 +1406,7 @@ function refreshDragOption(e) {
var elm = $('#' + e);
if (elm.css('visibility') == 'visible') {
refreshLayout();
TableDragInit();
}
}

View File

@@ -481,7 +481,7 @@ class PMA_User_Schema
$drag_x = $temp_sh_page['x'];
$drag_y = $temp_sh_page['y'];
$draginit .= ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
$draginit2 = ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
$draginit .= ' getElement("table_' . $i . '").onDrag = function (x, y) { document.edcoord.elements["c_table_' . $i . '[x]"].value = parseInt(x); document.edcoord.elements["c_table_' . $i . '[y]"].value = parseInt(y) }' . "\n";
$draginit .= ' getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n";
$draginit .= ' getElement("table_' . $i . '").style.top = "' . $drag_y . 'px";' . "\n";
@@ -516,6 +516,12 @@ class PMA_User_Schema
refreshLayout();
myid = getElement('pdflayout');
<?php echo $draginit; ?>
TableDragInit();
}
function TableDragInit() {
myid = getElement('pdflayout');
<?php echo $draginit2; ?>
}
function resetDrag() {