[Jifty-commit] jifty-plugin-chart branch, master, updated. 8f654e620172dc2b67df803ea3bf644c5229c68a
Jifty commits
jifty-commit at lists.jifty.org
Fri Jan 15 14:22:24 EST 2010
The branch, master has been updated
via 8f654e620172dc2b67df803ea3bf644c5229c68a (commit)
from 0676cc664fa6d186c47e3e1e19e1a591d3c88520 (commit)
Summary of changes:
share/web/static/js/chart_img_behaviour.js | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 8f654e620172dc2b67df803ea3bf644c5229c68a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jan 15 14:22:00 2010 -0500
Use jQuery, not Prototype to get dimensions
diff --git a/share/web/static/js/chart_img_behaviour.js b/share/web/static/js/chart_img_behaviour.js
index 46ec316..ba944cb 100644
--- a/share/web/static/js/chart_img_behaviour.js
+++ b/share/web/static/js/chart_img_behaviour.js
@@ -6,7 +6,6 @@
Behaviour.register({
'img.chart': function(e) {
- var dim = Element.getDimensions(e);
var url = e.src;
var path = url;
@@ -23,8 +22,8 @@ Behaviour.register({
}
}
- query.set('width', dim.width + 'px');
- query.set('height', dim.height + 'px');
+ query.set('width', jQuery(e).width() + 'px');
+ query.set('height', jQuery(e).height() + 'px');
url = path + '?' + query.toQueryString();
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list