[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_2-15043-g3782a6c
Piotr Przybylski
crackpl at users.sourceforge.net
Tue Aug 16 00:37:14 CEST 2011
The branch, master has been updated
via 3782a6c89b1ef507d6a777e68509870c7ac3020c (commit)
from 824fac0da5af56dbad589cebe47a1f3587d022fc (commit)
- Log -----------------------------------------------------------------
commit 3782a6c89b1ef507d6a777e68509870c7ac3020c
Author: Piotr Przybylski <piotrprz at gmail.com>
Date: Tue Aug 16 00:34:44 2011 +0200
Remove JS function: getElement
-----------------------------------------------------------------------
Summary of changes:
js/functions.js | 20 --------------------
libraries/schema/User_Schema.class.php | 16 ++++++++--------
2 files changed, 8 insertions(+), 28 deletions(-)
diff --git a/js/functions.js b/js/functions.js
index ee83b8a..d1c5544 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -903,26 +903,6 @@ function goToUrl(selObj, goToLocation)
}
/**
- * getElement
- */
-function getElement(e,f)
-{
- if(document.layers){
- f=(f)?f:self;
- if(f.document.layers[e]) {
- return f.document.layers[e];
- }
- for(W=0;W<f.document.layers.length;W++) {
- return(getElement(e,f.document.layers[W]));
- }
- }
- if(document.all) {
- return document.all[e];
- }
- return document.getElementById(e);
-}
-
-/**
* Refresh the WYSIWYG scratchboard after changes have been made
*/
function refreshDragOption(e)
diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php
index 986efad..95d60e1 100644
--- a/libraries/schema/User_Schema.class.php
+++ b/libraries/schema/User_Schema.class.php
@@ -496,12 +496,12 @@ class PMA_User_Schema
$drag_x = $temp_sh_page['x'];
$drag_y = $temp_sh_page['y'];
- $draginit2 .= ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
- $draginit2 .= ' 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";
- $reset_draginit .= ' getElement("table_' . $i . '").style.left = "2px";' . "\n";
- $reset_draginit .= ' getElement("table_' . $i . '").style.top = "' . (15 * $i) . 'px";' . "\n";
+ $draginit2 .= ' Drag.init($("#table_' . $i . '")[0], null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
+ $draginit2 .= ' $("#table_' . $i . '")[0].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 .= ' $("#table_' . $i . '")[0].style.left = "' . $drag_x . 'px";' . "\n";
+ $draginit .= ' $("#table_' . $i . '")[0].style.top = "' . $drag_y . 'px";' . "\n";
+ $reset_draginit .= ' $("#table_' . $i . '")[0].style.left = "2px";' . "\n";
+ $reset_draginit .= ' $("#table_' . $i . '")[0].style.top = "' . (15 * $i) . 'px";' . "\n";
$reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[x]"].value = "2"' . "\n";
$reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[y]"].value = "' . (15 * $i) . '"' . "\n";
@@ -529,13 +529,13 @@ class PMA_User_Schema
//<![CDATA[
function PDFinit() {
refreshLayout();
- myid = getElement('pdflayout');
+ myid = $('#pdflayout')[0];
<?php echo $draginit; ?>
TableDragInit();
}
function TableDragInit() {
- myid = getElement('pdflayout');
+ myid = $('#pdflayout')[0];
<?php echo $draginit2; ?>
}
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list