From 56381c086fcacbd3db2d2711c9527ccc05df011a Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 28 Aug 2010 08:57:27 -0400 Subject: [PATCH] adapted patch #3050492 to new code --- ChangeLog | 2 ++ js/functions.js | 1 + libraries/schema/User_Schema.class.php | 8 +++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0c5fc26b6..981d244ef 100755 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/js/functions.js b/js/functions.js index e8893c716..d89a8278c 100755 --- a/js/functions.js +++ b/js/functions.js @@ -1406,6 +1406,7 @@ function refreshDragOption(e) { var elm = $('#' + e); if (elm.css('visibility') == 'visible') { refreshLayout(); + TableDragInit(); } } diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php index ebf977028..09eb25f3e 100644 --- a/libraries/schema/User_Schema.class.php +++ b/libraries/schema/User_Schema.class.php @@ -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'); + TableDragInit(); + } + + function TableDragInit() { + myid = getElement('pdflayout'); + } function resetDrag() {