moksha/public/javascript/moksha.js | 8 +++++---
moksha/public/javascript/ui/moksha.ui.grid.js | 3 ---
2 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 692930bc2e2c851cb64453aacf8bc55ebbe09a29
Merge: 22ab437... 21846c4...
Author: John (J5) Palmieri <johnp(a)redhat.com>
Date: Wed Apr 29 18:36:21 2009 -0400
Merge branch 'master' of git+ssh://johnp@git.fedorahosted.org/git/moksha
commit 22ab437cc456e6ac7810196a41690495dd2d00af
Author: John (J5) Palmieri <johnp(a)redhat.com>
Date: Wed Apr 29 18:34:36 2009 -0400
don't rewrite links wrapped in .rowtemplate or .template classes
* this allows us to mark link inside of javascript templates and
have the grid rewrite them when the template is rendered
diff --git a/moksha/public/javascript/moksha.js b/moksha/public/javascript/moksha.js
index e1513fb..da74f90 100644
--- a/moksha/public/javascript/moksha.js
+++ b/moksha/public/javascript/moksha.js
@@ -120,8 +120,7 @@ moksha = {
/******************************************************************
* Filter anchors in a fragment of HTML or jQuery DOM marked with
* a moksha_url attribute so that they have updated static links
- * (e.g. run moksha.url on them)
- * and dynamic moksha.goto links
+ * (e.g. run moksha.url on them) and dynamic moksha.goto links
*
* Dynamic links will eventually be able to load the correct tabs
* on click and static links are used when the user opens the link
@@ -134,7 +133,10 @@ moksha = {
if (!fragment.jquery)
fragment = $(fragment);
- var $a_list = $('a[moksha_url]', fragment);
+ // get all anchors with a moksha_url attr but not inside a rowtemplate
+ var $a_list = $('a[moksha_url]:not(.rowtemplate *):not(.template *)',
fragment);
+ if (!$a_list.length)
+ return fragment;
var _goto = function(e) {
var href = $(this).data('dynamic_href.moksha');
diff --git a/moksha/public/javascript/ui/moksha.ui.grid.js
b/moksha/public/javascript/ui/moksha.ui.grid.js
index 08a3361..d91de89 100644
--- a/moksha/public/javascript/ui/moksha.ui.grid.js
+++ b/moksha/public/javascript/ui/moksha.ui.grid.js
@@ -310,9 +310,6 @@
if (rowtemplate.length)
rowtemplate.after(self.$rowplaceholder);
- var $a = jQuery('a[href]', rowtemplate);
- $.each($a, function(i,e) { $(e).attr('moksha_url', 'dynamic') });
-
// hack to get the full html of the template including the root tag
// this also removes the template from the document
var container_div = jQuery('<div />');
Show replies by date