[Jifty-commit] r4752 - in jifty/branches/cssquery-refactor:
share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Dec 20 04:48:40 EST 2007
Author: gugod
Date: Thu Dec 20 04:48:39 2007
New Revision: 4752
Modified:
jifty/branches/cssquery-refactor/lib/Jifty/Web.pm
jifty/branches/cssquery-refactor/share/web/static/js/behaviour.js
Log:
Remove cssQuery-jquery.js entirely, say good-bye to cssQuery().
Also re-work the apply method to use jQuery.fn.each instead of a for
loop.
Also get rid of that $() in there.
Modified: jifty/branches/cssquery-refactor/lib/Jifty/Web.pm
==============================================================================
--- jifty/branches/cssquery-refactor/lib/Jifty/Web.pm (original)
+++ jifty/branches/cssquery-refactor/lib/Jifty/Web.pm Thu Dec 20 04:48:39 2007
@@ -41,7 +41,6 @@
prototype.js
jquery-1.2.1.js
jquery_noconflict.js
- cssQuery-jquery.js
behaviour.js
scriptaculous/builder.js
scriptaculous/effects.js
Modified: jifty/branches/cssquery-refactor/share/web/static/js/behaviour.js
==============================================================================
--- jifty/branches/cssquery-refactor/share/web/static/js/behaviour.js (original)
+++ jifty/branches/cssquery-refactor/share/web/static/js/behaviour.js Thu Dec 20 04:48:39 2007
@@ -35,18 +35,11 @@
apply: function() {
var root = arguments[0];
- if(root) root = $(root);
-
for (var h = 0; sheet = Behaviour.list[h]; h++) {
for (var selector in sheet) {
- var start = new Date();
- var elements = jQuery(selector, root);
-
- if ( !elements ) continue;
-
- for (var i = 0; element = elements[i]; i++) {
- sheet[selector](element);
- }
+ jQuery(selector, root).each(function() {
+ sheet[selector](this);
+ });
}
}
}
More information about the Jifty-commit
mailing list