Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add wrapper for mootools Slick CSS selector. Usage:

    $ git submodule init vendor/slick/repository
    $ git submodule update vendor/slick/repository
    $ rake dist SELECTOR_ENGINE=slick

Run tests:

    $ rake test TESTS=selector SELECTOR_ENGINE=slick
  • Loading branch information...
commit 443e1e1feca21b9b9e2d325e335fb814923b0255 1 parent eb26357
@tobie tobie authored
View
3  .gitmodules
@@ -18,3 +18,6 @@
[submodule "vendor/sizzle/repository"]
path = vendor/sizzle/repository
url = git://github.com/jeresig/sizzle.git
+[submodule "vendor/slick/repository"]
+ path = vendor/slick/repository
+ url = http://github.com/mootools/slick.git

Why aren't you using git://github.com/mootools/slick.git gere? It's faster, no?

I wouldn't mind switching all submodules to http, as this would make it easier for those that sit behind a firewall.

Aaahhh, I hadn't considered that. Well I have no objections. It's a one time thing, so I don't really care how fast it is, I'm more interested in it being consistent I guess (not that it really matters in the end).

@tobie Collaborator
tobie added a note

Fixed in f372474.

That was a typo due to Github changing its default to HTTP when copy-pasting urls.

I'm all for consistency so if we want to move this to HTTP we'll want to change all repos at the same. I'm personally not too much in favor of that change, but please feel free to open a ticket.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1  vendor/slick/repository
@@ -0,0 +1 @@
+Subproject commit b7d3a3305675cfaa326c55b3eb1d4c4d4f962744
View
26 vendor/slick/selector_engine.js
@@ -0,0 +1,26 @@
+Prototype._original_property = window.Slick;
+//= require "repository/Source/Slick.Parser.js"
+//= require "repository/Source/Slick.Finder.js"
+
+Prototype.Selector = (function(engine) {
+ function extend(elements) {
+ for (var i = 0, length = elements.length; i < length; i++) {
+ Element.extend(elements[i]);
+ }
+ return elements;
+ }
+
+ function select(selector, scope) {
+ return extend(engine.search(scope || document, selector));
+ }
+
+ return {
+ engine: engine,
+ select: select,
+ match: engine.match
+ };
+})(Slick);
+
+// Restore globals.
+window.Slick = Prototype._original_property;
+delete Prototype._original_property;

1 comment on commit 443e1e1

@TooTallNate

Swweeetttt

Please sign in to comment.
Something went wrong with that request. Please try again.