The branch, master has been updated
via 3913ebbd0c24fe576d3c77fc6f99c12a2a87afc7 (commit)
from 6fc5270d7c9f37e06439e77d11b8838baff464bd (commit)
- Log -----------------------------------------------------------------
commit 3913ebbd0c24fe576d3c77fc6f99c12a2a87afc7
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sun Dec 26 08:53:59 2010 -0500
Optimize DOM querying
-----------------------------------------------------------------------
Summary of changes:
js/functions.js | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/js/functions.js b/js/functions.js
index 409de9b..ee6d60e 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -2149,11 +2149,13 @@ $(document).ready(function() {
// Position the dropdown
$(".structure_actions_dropdown").each(function() {
+ // Optimize DOM querying
+ var $this_dropdown = $(this);
// The top offset must be set for IE even if it didn't change
- var cell_right_edge_offset = $(this).parent().offset().left +
$(this).parent().innerWidth();
- var left_offset = cell_right_edge_offset - $(this).innerWidth();
- var top_offset = $(this).parent().offset().top +
$(this).parent().innerHeight();
- $(this).offset({ top: top_offset, left: left_offset });
+ var cell_right_edge_offset = $this_dropdown.parent().offset().left +
$this_dropdown.parent().innerWidth();
+ var left_offset = cell_right_edge_offset - $this_dropdown.innerWidth();
+ var top_offset = $this_dropdown.parent().offset().top +
$this_dropdown.parent().innerHeight();
+ $this_dropdown.offset({ top: top_offset, left: left_offset });
});
// A hack for IE6 to prevent the after_field select element from being displayed
on top of the dropdown by
hooks/post-receive
--
phpMyAdmin