wpa_cli_web 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/.bowerrc +3 -0
  2. data/lib/wpa_cli_web.rb +19 -31
  3. data/lib/wpa_cli_web/public/bower_components/house-style/.bower.json +14 -0
  4. data/lib/wpa_cli_web/public/bower_components/house-style/.bowerrc +3 -0
  5. data/lib/wpa_cli_web/public/bower_components/house-style/.gitignore +2 -0
  6. data/lib/wpa_cli_web/public/bower_components/house-style/Gemfile +6 -0
  7. data/lib/wpa_cli_web/public/bower_components/house-style/Gruntfile.js +99 -0
  8. data/lib/wpa_cli_web/public/bower_components/house-style/Guardfile +19 -0
  9. data/lib/wpa_cli_web/public/bower_components/house-style/bower.json +7 -0
  10. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/LICENSE.md +19 -0
  11. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/README.md +49 -0
  12. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/bower.json +23 -0
  13. data/lib/wpa_cli_web/public/bower_components/house-style/bower_components/normalize-css/normalize.css +396 -0
  14. data/lib/wpa_cli_web/public/bower_components/house-style/house-style.css +860 -0
  15. data/lib/wpa_cli_web/public/bower_components/house-style/house-style.min.css +1 -0
  16. data/lib/wpa_cli_web/public/bower_components/house-style/modules/base/base.css +37 -0
  17. data/lib/wpa_cli_web/public/bower_components/house-style/modules/button/button.css +26 -0
  18. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/grid.css +151 -0
  19. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/grid.png +0 -0
  20. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/images.html +208 -0
  21. data/lib/wpa_cli_web/public/bower_components/house-style/modules/grid/index.html +141 -0
  22. data/lib/wpa_cli_web/public/bower_components/house-style/modules/loading/index.html +22 -0
  23. data/lib/wpa_cli_web/public/bower_components/house-style/modules/loading/loading.css +41 -0
  24. data/lib/wpa_cli_web/public/bower_components/house-style/modules/loading/spinner.svg +11 -0
  25. data/lib/wpa_cli_web/public/bower_components/house-style/modules/masthead/bbc-blocks-white.png +0 -0
  26. data/lib/wpa_cli_web/public/bower_components/house-style/modules/masthead/index.html +20 -0
  27. data/lib/wpa_cli_web/public/bower_components/house-style/modules/masthead/masthead.css +23 -0
  28. data/lib/wpa_cli_web/public/bower_components/house-style/modules/panel/panel.css +71 -0
  29. data/lib/wpa_cli_web/public/bower_components/house-style/modules/project-header/index.html +22 -0
  30. data/lib/wpa_cli_web/public/bower_components/house-style/modules/project-header/project-header.css +37 -0
  31. data/lib/wpa_cli_web/public/bower_components/house-style/modules/table/index.html +26 -0
  32. data/lib/wpa_cli_web/public/bower_components/house-style/modules/table/table.css +6 -0
  33. data/lib/wpa_cli_web/public/bower_components/house-style/modules/transitions/transitions.css +11 -0
  34. data/lib/wpa_cli_web/public/bower_components/house-style/package.json +21 -0
  35. data/lib/wpa_cli_web/public/bower_components/house-style/vendor/prefixfree.min.js +5 -0
  36. data/lib/wpa_cli_web/public/bower_components/normalize-css/.bower.json +21 -0
  37. data/lib/wpa_cli_web/public/bower_components/normalize-css/LICENSE.md +19 -0
  38. data/lib/wpa_cli_web/public/bower_components/normalize-css/README.md +49 -0
  39. data/lib/wpa_cli_web/public/bower_components/normalize-css/bower.json +12 -0
  40. data/lib/wpa_cli_web/public/bower_components/normalize-css/normalize.css +396 -0
  41. data/lib/wpa_cli_web/public/bower_components/qwery/.bower.json +14 -0
  42. data/lib/wpa_cli_web/public/bower_components/qwery/.gitignore +3 -0
  43. data/lib/wpa_cli_web/public/bower_components/qwery/.travis.yml +10 -0
  44. data/lib/wpa_cli_web/public/bower_components/qwery/LICENSE +7 -0
  45. data/lib/wpa_cli_web/public/bower_components/qwery/Makefile +6 -0
  46. data/lib/wpa_cli_web/public/bower_components/qwery/README.md +167 -0
  47. data/lib/wpa_cli_web/public/bower_components/qwery/config/smoosh.json +35 -0
  48. data/lib/wpa_cli_web/public/bower_components/qwery/integration/ender.js +1033 -0
  49. data/lib/wpa_cli_web/public/bower_components/qwery/integration/integration.html +26 -0
  50. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/ender.js +62 -0
  51. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/package.json +14 -0
  52. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/qwery-mobile.js +79 -0
  53. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/qwery-mobile.min.js +7 -0
  54. data/lib/wpa_cli_web/public/bower_components/qwery/mobile/src/mobile.js +72 -0
  55. data/lib/wpa_cli_web/public/bower_components/qwery/package.json +25 -0
  56. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/package.json +17 -0
  57. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/qwery-pseudos.js +106 -0
  58. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/qwery-pseudos.min.js +7 -0
  59. data/lib/wpa_cli_web/public/bower_components/qwery/pseudos/src/pseudos.js +99 -0
  60. data/lib/wpa_cli_web/public/bower_components/qwery/qwery.js +369 -0
  61. data/lib/wpa_cli_web/public/bower_components/qwery/qwery.min.js +7 -0
  62. data/lib/wpa_cli_web/public/bower_components/qwery/src/copyright.js +6 -0
  63. data/lib/wpa_cli_web/public/bower_components/qwery/src/ender.js +62 -0
  64. data/lib/wpa_cli_web/public/bower_components/qwery/src/qwery.js +362 -0
  65. data/lib/wpa_cli_web/public/bower_components/qwery/tests/W3C-Selector-tests.html +1372 -0
  66. data/lib/wpa_cli_web/public/bower_components/qwery/tests/benchmarks.html +220 -0
  67. data/lib/wpa_cli_web/public/bower_components/qwery/tests/index.html +132 -0
  68. data/lib/wpa_cli_web/public/bower_components/qwery/tests/mobile.html +58 -0
  69. data/lib/wpa_cli_web/public/bower_components/qwery/tests/phantom.js +43 -0
  70. data/lib/wpa_cli_web/public/bower_components/qwery/tests/test-env.js +25 -0
  71. data/lib/wpa_cli_web/public/bower_components/qwery/tests/tests.js +533 -0
  72. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/nw.js +1680 -0
  73. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/sink.css +79 -0
  74. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/sink.js +181 -0
  75. data/lib/wpa_cli_web/public/bower_components/qwery/vendor/sizzle.js +1400 -0
  76. data/lib/wpa_cli_web/public/bower_components/reqwest/.bower.json +14 -0
  77. data/lib/wpa_cli_web/public/bower_components/reqwest/.gitignore +1 -0
  78. data/lib/wpa_cli_web/public/bower_components/reqwest/.jshintrc +61 -0
  79. data/lib/wpa_cli_web/public/bower_components/reqwest/Makefile +8 -0
  80. data/lib/wpa_cli_web/public/bower_components/reqwest/README.md +308 -0
  81. data/lib/wpa_cli_web/public/bower_components/reqwest/build.json +74 -0
  82. data/lib/wpa_cli_web/public/bower_components/reqwest/make/tests.js +89 -0
  83. data/lib/wpa_cli_web/public/bower_components/reqwest/package.json +27 -0
  84. data/lib/wpa_cli_web/public/bower_components/reqwest/reqwest.js +565 -0
  85. data/lib/wpa_cli_web/public/bower_components/reqwest/reqwest.min.js +7 -0
  86. data/lib/wpa_cli_web/public/bower_components/reqwest/src/copyright.js +6 -0
  87. data/lib/wpa_cli_web/public/bower_components/reqwest/src/ender.js +26 -0
  88. data/lib/wpa_cli_web/public/bower_components/reqwest/src/reqwest.js +559 -0
  89. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/ender.js +117 -0
  90. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/badfixtures.xml +1 -0
  91. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.html +1 -0
  92. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.js +1 -0
  93. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.json +1 -0
  94. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures.xml +1 -0
  95. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp.jsonp +1 -0
  96. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp2.jsonp +1 -0
  97. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp3.jsonp +1 -0
  98. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp_multi.jsonp +1 -0
  99. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp_multi_b.jsonp +1 -0
  100. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_jsonp_multi_c.jsonp +1 -0
  101. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/fixtures_with_prefix.json +1 -0
  102. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/fixtures/invalidJSON.json +5 -0
  103. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/tests.html +105 -0
  104. data/lib/wpa_cli_web/public/bower_components/reqwest/tests/tests.js +1723 -0
  105. data/lib/wpa_cli_web/views/access_points.erb +5 -0
  106. data/lib/wpa_cli_web/views/access_points_list.erb +19 -0
  107. data/lib/wpa_cli_web/views/layout.erb +141 -0
  108. data/lib/wpa_cli_web/views/networks_edit.erb +15 -0
  109. data/lib/wpa_cli_web/views/restart.erb +7 -0
  110. data/lib/wpa_cli_web/views/restarting.erb +14 -0
  111. data/wpa_cli_web.gemspec +1 -1
  112. metadata +111 -2
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE HTML>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
+ <title>qwery integration with ender</title>
6
+ <script src="ender.js"></script>
7
+ <script src="../src/qwery.js"></script>
8
+ <script src="../src/ender.js"></script>
9
+ <script type="text/javascript">
10
+ $.domReady(function () {
11
+ var test = $('#test')
12
+ , elements = test.find('li.check').css('color', 'red').append(' ✓').next().css('color', 'blue')
13
+ $(' <p>eyo</p> <p>wuzup</p> ').css({opacity: 0.4}).appendTo(document.body)
14
+ })
15
+ </script>
16
+ </head>
17
+ <body>
18
+ <div id="test">
19
+ <ul>
20
+ <li class="check">uno</li>
21
+ <li><span><b>dos</b></span></li>
22
+ <li class="check">tres</li>
23
+ </ul>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,62 @@
1
+ (function ($) {
2
+ var q = function () {
3
+ var r
4
+ try {
5
+ r = require('qwery')
6
+ } catch (ex) {
7
+ r = require('qwery-mobile')
8
+ } finally {
9
+ return r
10
+ }
11
+ }()
12
+
13
+ $.pseudos = q.pseudos
14
+
15
+ $._select = function (s, r) {
16
+ // detect if sibling module 'bonzo' is available at run-time
17
+ // rather than load-time since technically it's not a dependency and
18
+ // can be loaded in any order
19
+ // hence the lazy function re-definition
20
+ return ($._select = (function () {
21
+ var b
22
+ if (typeof $.create == 'function') return function (s, r) {
23
+ return /^\s*</.test(s) ? $.create(s, r) : q(s, r)
24
+ }
25
+ try {
26
+ b = require('bonzo')
27
+ return function (s, r) {
28
+ return /^\s*</.test(s) ? b.create(s, r) : q(s, r)
29
+ }
30
+ } catch (e) { }
31
+ return q
32
+ })())(s, r)
33
+ }
34
+
35
+ $.ender({
36
+ find: function (s) {
37
+ var r = [], i, l, j, k, els
38
+ for (i = 0, l = this.length; i < l; i++) {
39
+ els = q(s, this[i])
40
+ for (j = 0, k = els.length; j < k; j++) r.push(els[j])
41
+ }
42
+ return $(q.uniq(r))
43
+ }
44
+ , and: function (s) {
45
+ var plus = $(s)
46
+ for (var i = this.length, j = 0, l = this.length + plus.length; i < l; i++, j++) {
47
+ this[i] = plus[j]
48
+ }
49
+ this.length += plus.length
50
+ return this
51
+ }
52
+ , is: function(s, r) {
53
+ var i, l
54
+ for (i = 0, l = this.length; i < l; i++) {
55
+ if (q.is(this[i], s, r)) {
56
+ return true
57
+ }
58
+ }
59
+ return false
60
+ }
61
+ }, true)
62
+ }(ender));
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "qwery-mobile",
3
+ "description": "Mobile query selector engine",
4
+ "version": "1.0.13",
5
+ "homepage": "https://github.com/ded/qwery",
6
+ "authors": ["Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)", "Jacob Thornton"],
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/ded/qwery.git"
10
+ },
11
+ "main": "./qwery-mobile.js",
12
+ "keywords": ["ender", "query", "css", "mobile", "selector engine"],
13
+ "ender": "ender.js"
14
+ }
@@ -0,0 +1,79 @@
1
+ /*!
2
+ * @preserve Qwery - A Blazing Fast query selector engine
3
+ * https://github.com/ded/qwery
4
+ * copyright Dustin Diaz 2012
5
+ * MIT License
6
+ */
7
+
8
+ (function (name, context, definition) {
9
+ if (typeof module != 'undefined' && module.exports) module.exports = definition()
10
+ else if (typeof define == 'function' && define.amd) define(definition)
11
+ else context[name] = definition()
12
+ })('qwery', this, function () {
13
+
14
+ var classOnly = /^\.([\w\-]+)$/
15
+ , doc = document
16
+ , win = window
17
+ , html = doc.documentElement
18
+ , isAncestor = 'compareDocumentPosition' in html ?
19
+ function (element, container) {
20
+ return (container.compareDocumentPosition(element) & 16) == 16
21
+ } :
22
+ function (element, container) {
23
+ container = container == doc || container == window ? html : container
24
+ return container !== element && container.contains(element)
25
+ }
26
+
27
+ function toArray(ar) {
28
+ return [].slice.call(ar, 0)
29
+ }
30
+
31
+ function isNode(el) {
32
+ var t
33
+ return el && typeof el === 'object' && (t = el.nodeType) && (t == 1 || t == 9)
34
+ }
35
+
36
+ function uniq(ar) {
37
+ var a = [], i, j
38
+ label:
39
+ for (i = 0; i < ar.length; i++) {
40
+ for (j = 0; j < a.length; j++) {
41
+ if (a[j] == ar[i]) {
42
+ continue label
43
+ }
44
+ }
45
+ a[a.length] = ar[i]
46
+ }
47
+ return a
48
+ }
49
+
50
+
51
+ /**
52
+ * @param {string|Array.<Element>|Element|Node} selector
53
+ * @param {string|Array.<Element>|Element|Node=} opt_root
54
+ * @return {Array.<Element>}
55
+ */
56
+ function qwery(selector, opt_root) {
57
+ var m, root = (typeof opt_root == 'string') ? qwery(opt_root)[0] : (opt_root || doc)
58
+ root = isFinite(root.length) && root[0] && !root.nodeName ? root[0] : root
59
+ if (!root || !selector) {
60
+ return []
61
+ }
62
+ if (doc.getElementsByClassName && selector == 'string' && (m = selector.match(classOnly))) {
63
+ return toArray((root).getElementsByClassName(m[1]))
64
+ }
65
+ // using duck typing for 'a' window or 'a' document (not 'the' window || document)
66
+ if (selector && (selector.document || (selector.nodeType && selector.nodeType == 9))) {
67
+ return !opt_root ? [selector] : []
68
+ }
69
+ if (isNode(selector)) {
70
+ return !opt_root || (isAncestor(selector, root)) ? [selector] : []
71
+ }
72
+ return toArray((root).querySelectorAll(selector))
73
+ }
74
+
75
+
76
+ qwery.uniq = uniq
77
+
78
+ return qwery
79
+ }, this);
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * @preserve Qwery - A Blazing Fast query selector engine
3
+ * https://github.com/ded/qwery
4
+ * copyright Dustin Diaz 2012
5
+ * MIT License
6
+ */
7
+ (function(e,t,n){typeof module!="undefined"&&module.exports?module.exports=n():typeof define=="function"&&define.amd?define(n):t[e]=n()})("qwery",this,function(){function s(e){return[].slice.call(e,0)}function o(e){var t;return e&&typeof e=="object"&&(t=e.nodeType)&&(t==1||t==9)}function u(e){var t=[],n,r;e:for(n=0;n<e.length;n++){for(r=0;r<t.length;r++)if(t[r]==e[n])continue e;t[t.length]=e[n]}return t}function a(n,r){var u,f=typeof r=="string"?a(r)[0]:r||t;return f=isFinite(f.length)&&f[0]&&!f.nodeName?f[0]:f,!f||!n?[]:t.getElementsByClassName&&n=="string"&&(u=n.match(e))?s(f.getElementsByClassName(u[1])):n&&(n.document||n.nodeType&&n.nodeType==9)?r?[]:[n]:o(n)?!r||i(n,f)?[n]:[]:s(f.querySelectorAll(n))}var e=/^\.([\w\-]+)$/,t=document,n=window,r=t.documentElement,i="compareDocumentPosition"in r?function(e,t){return(t.compareDocumentPosition(e)&16)==16}:function(e,n){return n=n==t||n==window?r:n,n!==e&&n.contains(e)};return a.uniq=u,a},this)
@@ -0,0 +1,72 @@
1
+ (function (name, context, definition) {
2
+ if (typeof module != 'undefined' && module.exports) module.exports = definition()
3
+ else if (typeof define == 'function' && define.amd) define(definition)
4
+ else context[name] = definition()
5
+ })('qwery', this, function () {
6
+
7
+ var classOnly = /^\.([\w\-]+)$/
8
+ , doc = document
9
+ , win = window
10
+ , html = doc.documentElement
11
+ , isAncestor = 'compareDocumentPosition' in html ?
12
+ function (element, container) {
13
+ return (container.compareDocumentPosition(element) & 16) == 16
14
+ } :
15
+ function (element, container) {
16
+ container = container == doc || container == window ? html : container
17
+ return container !== element && container.contains(element)
18
+ }
19
+
20
+ function toArray(ar) {
21
+ return [].slice.call(ar, 0)
22
+ }
23
+
24
+ function isNode(el) {
25
+ var t
26
+ return el && typeof el === 'object' && (t = el.nodeType) && (t == 1 || t == 9)
27
+ }
28
+
29
+ function uniq(ar) {
30
+ var a = [], i, j
31
+ label:
32
+ for (i = 0; i < ar.length; i++) {
33
+ for (j = 0; j < a.length; j++) {
34
+ if (a[j] == ar[i]) {
35
+ continue label
36
+ }
37
+ }
38
+ a[a.length] = ar[i]
39
+ }
40
+ return a
41
+ }
42
+
43
+
44
+ /**
45
+ * @param {string|Array.<Element>|Element|Node} selector
46
+ * @param {string|Array.<Element>|Element|Node=} opt_root
47
+ * @return {Array.<Element>}
48
+ */
49
+ function qwery(selector, opt_root) {
50
+ var m, root = (typeof opt_root == 'string') ? qwery(opt_root)[0] : (opt_root || doc)
51
+ root = isFinite(root.length) && root[0] && !root.nodeName ? root[0] : root
52
+ if (!root || !selector) {
53
+ return []
54
+ }
55
+ if (doc.getElementsByClassName && selector == 'string' && (m = selector.match(classOnly))) {
56
+ return toArray((root).getElementsByClassName(m[1]))
57
+ }
58
+ // using duck typing for 'a' window or 'a' document (not 'the' window || document)
59
+ if (selector && (selector.document || (selector.nodeType && selector.nodeType == 9))) {
60
+ return !opt_root ? [selector] : []
61
+ }
62
+ if (isNode(selector)) {
63
+ return !opt_root || (isAncestor(selector, root)) ? [selector] : []
64
+ }
65
+ return toArray((root).querySelectorAll(selector))
66
+ }
67
+
68
+
69
+ qwery.uniq = uniq
70
+
71
+ return qwery
72
+ }, this);
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "qwery"
3
+ , "description": "blazing fast CSS3 query selector engine"
4
+ , "version": "3.4.1"
5
+ , "homepage": "https://github.com/ded/qwery"
6
+ , "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
7
+ , "contributors": [
8
+ "Jacob Thornton <> (https://github.com/fat)"
9
+ , "Rod Vagg <> (https://github.com/rvagg)"
10
+ , "Andrew McCollum <> (https://github.com/amccollum)"
11
+ ]
12
+ , "main": "./qwery.js"
13
+ , "keywords": ["ender", "query", "css", "selector engine"]
14
+ , "ender": "./src/ender.js"
15
+ , "repository": {
16
+ "type": "git"
17
+ , "url": "https://github.com/ded/qwery.git"
18
+ }
19
+ , "devDependencies": {
20
+ "sink-test": ">= 1.0.1"
21
+ , "serve": "*"
22
+ , "smoosh": "0.4.0"
23
+ , "phantomjs": "0.2.3"
24
+ }
25
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "qwery-pseudos",
3
+ "description": "Pseudo-selector extensions for Qwery",
4
+ "version": "1.0.0",
5
+ "homepage": "https://github.com/ded/qwery",
6
+ "authors": ["Dustin Diaz, @ded", "Jacob Thornton, @fat"],
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/ded/qwery.git"
10
+ },
11
+ "dependencies": {
12
+ "qwery": "*"
13
+ },
14
+ "main": "./qwery-pseudos.js",
15
+ "keywords": ["ender", "query", "css", "pseudos", "pseudo", "selector engine"],
16
+ "ender": "noop"
17
+ }
@@ -0,0 +1,106 @@
1
+ /*!
2
+ * @preserve Qwery - A Blazing Fast query selector engine
3
+ * https://github.com/ded/qwery
4
+ * copyright Dustin Diaz 2012
5
+ * MIT License
6
+ */
7
+
8
+ !function () {
9
+ var q, pseudos, i, l, p, r, nodes, m, nthPattern = /\s*((?:\+|\-)?(\d*))n\s*((?:\+|\-)\s*\d+)?\s*/
10
+ if (typeof module != 'undefined' && typeof 'require' != 'undefined')
11
+ q = require('qwery')
12
+ else if (typeof qwery != 'undefined')
13
+ q = qwery
14
+ else
15
+ return
16
+
17
+ pseudos = q.pseudos
18
+
19
+ function children(node, ofType) {
20
+ var r = []
21
+ nodes = node.childNodes
22
+
23
+ for (i = 0, l = nodes.length; i < l; i++) {
24
+ if (nodes[i].nodeType == 1 && (!ofType || nodes[i].nodeName == ofType)) r.push(nodes[i])
25
+ }
26
+ return r
27
+ }
28
+
29
+ function checkNthExpr(el, nodes, a, b) {
30
+ if (!a) return (nodes[b - 1] == el)
31
+ for (i = b, l = nodes.length; ((a > 0) ? (i <= l) : (i >= 1)); i += a) if (el == nodes[i - 1]) return true
32
+ return false
33
+ }
34
+
35
+ function checkNth(el, nodes, val) {
36
+ if (isFinite(val)) return nodes[val - 1] == el
37
+ else if (val == 'odd') return checkNthExpr(el, nodes, 2, 1)
38
+ else if (val == 'even') return checkNthExpr(el, nodes, 2, 0)
39
+ else if (m = nthPattern.exec(val))
40
+ return checkNthExpr(el, nodes,
41
+ (m[2] ? parseInt(m[1], 10) : parseInt(m[1] + '1', 10)), // Check case where coefficient is omitted
42
+ (m[3] ? parseInt(m[3].replace(/\s*/, ''), 10) : 0)) // Check case where constant is omitted
43
+
44
+ return false
45
+ }
46
+
47
+ function text(el, s) {
48
+ if (el.nodeType === 3 || el.nodeType === 4) return el.nodeValue;
49
+ if (el.nodeType !== 1 && el.nodeType !== 9) return '';
50
+ for (s = '', el = el.firstChild; el; el = el.nextSibling) {
51
+ if (el.nodeType !== 8) s += el.textContent || el.innerText || text(el)
52
+ }
53
+ return s
54
+ }
55
+
56
+ // *was* going to be in CSS3, didn't quite make it
57
+ pseudos.contains = function (el, val) { return text(el).indexOf(val) != -1 }
58
+
59
+ pseudos.not = function (el, val) { return !q.is(el, val) }
60
+
61
+ pseudos['nth-child'] = function (el, val) {
62
+ if (!val || !(p = el.parentNode)) return false
63
+ return checkNth(el, children(p), val)
64
+ }
65
+
66
+ pseudos['nth-last-child'] = function (el, val) {
67
+ if (!val || !(p = el.parentNode)) return false
68
+ return checkNth(el, children(p).reverse(), val)
69
+ }
70
+
71
+ pseudos['nth-of-type'] = function (el, val) {
72
+ if (!val || !(p = el.parentNode)) return false
73
+ return checkNth(el, children(p, el.nodeName), val)
74
+ }
75
+
76
+ pseudos['nth-last-of-type'] = function (el, val) {
77
+ if (!val || !(p = el.parentNode)) return false
78
+ return checkNth(el, children(p, el.nodeName).reverse(), val)
79
+ }
80
+
81
+ pseudos['first-child'] = function (el) { return pseudos['nth-child'](el, 1) }
82
+ pseudos['last-child'] = function (el) { return pseudos['nth-last-child'](el, 1) }
83
+ pseudos['first-of-type'] = function (el) { return pseudos['nth-of-type'](el, 1) }
84
+ pseudos['last-of-type'] = function (el) { return pseudos['nth-last-of-type'](el, 1) }
85
+
86
+ pseudos['only-child'] = function (el) {
87
+ return (p = el.parentNode) && (nodes = children(p)) && (nodes.length == 1) && (el == nodes[0])
88
+ };
89
+
90
+ pseudos['only-of-type'] = function (el) {
91
+ return (p = el.parentNode) && (nodes = children(p, el.nodeName)) && (nodes.length == 1) && (el == nodes[0])
92
+ }
93
+
94
+ pseudos.target = function (el) {
95
+ return (el.getAttribute('id') == location.hash.substr(1))
96
+ }
97
+
98
+ pseudos.checked = function (el) { return el.checked }
99
+
100
+ pseudos.enabled = function (el) { return !el.disabled }
101
+
102
+ pseudos.disabled = function (el) { return el.disabled }
103
+
104
+ pseudos.empty = function (el) { return !el.childNodes.length }
105
+
106
+ }();
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * @preserve Qwery - A Blazing Fast query selector engine
3
+ * https://github.com/ded/qwery
4
+ * copyright Dustin Diaz 2012
5
+ * MIT License
6
+ */
7
+ !function(){function f(e,t){var i=[];o=e.childNodes;for(n=0,r=o.length;n<r;n++)o[n].nodeType==1&&(!t||o[n].nodeName==t)&&i.push(o[n]);return i}function l(e,t,i,s){if(!i)return t[s-1]==e;for(n=s,r=t.length;i>0?n<=r:n>=1;n+=i)if(e==t[n-1])return!0;return!1}function c(e,t,n){return isFinite(n)?t[n-1]==e:n=="odd"?l(e,t,2,1):n=="even"?l(e,t,2,0):(u=a.exec(n))?l(e,t,u[2]?parseInt(u[1],10):parseInt(u[1]+"1",10),u[3]?parseInt(u[3].replace(/\s*/,""),10):0):!1}function h(e,t){if(e.nodeType===3||e.nodeType===4)return e.nodeValue;if(e.nodeType!==1&&e.nodeType!==9)return"";for(t="",e=e.firstChild;e;e=e.nextSibling)e.nodeType!==8&&(t+=e.textContent||e.innerText||h(e));return t}var e,t,n,r,i,s,o,u,a=/\s*((?:\+|\-)?(\d*))n\s*((?:\+|\-)\s*\d+)?\s*/;if(typeof module!="undefined"&&!0)e=require("qwery");else{if(typeof qwery=="undefined")return;e=qwery}t=e.pseudos,t.contains=function(e,t){return h(e).indexOf(t)!=-1},t.not=function(t,n){return!e.is(t,n)},t["nth-child"]=function(e,t){return!t||!(i=e.parentNode)?!1:c(e,f(i),t)},t["nth-last-child"]=function(e,t){return!t||!(i=e.parentNode)?!1:c(e,f(i).reverse(),t)},t["nth-of-type"]=function(e,t){return!t||!(i=e.parentNode)?!1:c(e,f(i,e.nodeName),t)},t["nth-last-of-type"]=function(e,t){return!t||!(i=e.parentNode)?!1:c(e,f(i,e.nodeName).reverse(),t)},t["first-child"]=function(e){return t["nth-child"](e,1)},t["last-child"]=function(e){return t["nth-last-child"](e,1)},t["first-of-type"]=function(e){return t["nth-of-type"](e,1)},t["last-of-type"]=function(e){return t["nth-last-of-type"](e,1)},t["only-child"]=function(e){return(i=e.parentNode)&&(o=f(i))&&o.length==1&&e==o[0]},t["only-of-type"]=function(e){return(i=e.parentNode)&&(o=f(i,e.nodeName))&&o.length==1&&e==o[0]},t.target=function(e){return e.getAttribute("id")==location.hash.substr(1)},t.checked=function(e){return e.checked},t.enabled=function(e){return!e.disabled},t.disabled=function(e){return e.disabled},t.empty=function(e){return!e.childNodes.length}}()
@@ -0,0 +1,99 @@
1
+ !function () {
2
+ var q, pseudos, i, l, p, r, nodes, m, nthPattern = /\s*((?:\+|\-)?(\d*))n\s*((?:\+|\-)\s*\d+)?\s*/
3
+ if (typeof module != 'undefined' && typeof 'require' != 'undefined')
4
+ q = require('qwery')
5
+ else if (typeof qwery != 'undefined')
6
+ q = qwery
7
+ else
8
+ return
9
+
10
+ pseudos = q.pseudos
11
+
12
+ function children(node, ofType) {
13
+ var r = []
14
+ nodes = node.childNodes
15
+
16
+ for (i = 0, l = nodes.length; i < l; i++) {
17
+ if (nodes[i].nodeType == 1 && (!ofType || nodes[i].nodeName == ofType)) r.push(nodes[i])
18
+ }
19
+ return r
20
+ }
21
+
22
+ function checkNthExpr(el, nodes, a, b) {
23
+ if (!a) return (nodes[b - 1] == el)
24
+ for (i = b, l = nodes.length; ((a > 0) ? (i <= l) : (i >= 1)); i += a) if (el == nodes[i - 1]) return true
25
+ return false
26
+ }
27
+
28
+ function checkNth(el, nodes, val) {
29
+ if (isFinite(val)) return nodes[val - 1] == el
30
+ else if (val == 'odd') return checkNthExpr(el, nodes, 2, 1)
31
+ else if (val == 'even') return checkNthExpr(el, nodes, 2, 0)
32
+ else if (m = nthPattern.exec(val))
33
+ return checkNthExpr(el, nodes,
34
+ (m[2] ? parseInt(m[1], 10) : parseInt(m[1] + '1', 10)), // Check case where coefficient is omitted
35
+ (m[3] ? parseInt(m[3].replace(/\s*/, ''), 10) : 0)) // Check case where constant is omitted
36
+
37
+ return false
38
+ }
39
+
40
+ function text(el, s) {
41
+ if (el.nodeType === 3 || el.nodeType === 4) return el.nodeValue;
42
+ if (el.nodeType !== 1 && el.nodeType !== 9) return '';
43
+ for (s = '', el = el.firstChild; el; el = el.nextSibling) {
44
+ if (el.nodeType !== 8) s += el.textContent || el.innerText || text(el)
45
+ }
46
+ return s
47
+ }
48
+
49
+ // *was* going to be in CSS3, didn't quite make it
50
+ pseudos.contains = function (el, val) { return text(el).indexOf(val) != -1 }
51
+
52
+ pseudos.not = function (el, val) { return !q.is(el, val) }
53
+
54
+ pseudos['nth-child'] = function (el, val) {
55
+ if (!val || !(p = el.parentNode)) return false
56
+ return checkNth(el, children(p), val)
57
+ }
58
+
59
+ pseudos['nth-last-child'] = function (el, val) {
60
+ if (!val || !(p = el.parentNode)) return false
61
+ return checkNth(el, children(p).reverse(), val)
62
+ }
63
+
64
+ pseudos['nth-of-type'] = function (el, val) {
65
+ if (!val || !(p = el.parentNode)) return false
66
+ return checkNth(el, children(p, el.nodeName), val)
67
+ }
68
+
69
+ pseudos['nth-last-of-type'] = function (el, val) {
70
+ if (!val || !(p = el.parentNode)) return false
71
+ return checkNth(el, children(p, el.nodeName).reverse(), val)
72
+ }
73
+
74
+ pseudos['first-child'] = function (el) { return pseudos['nth-child'](el, 1) }
75
+ pseudos['last-child'] = function (el) { return pseudos['nth-last-child'](el, 1) }
76
+ pseudos['first-of-type'] = function (el) { return pseudos['nth-of-type'](el, 1) }
77
+ pseudos['last-of-type'] = function (el) { return pseudos['nth-last-of-type'](el, 1) }
78
+
79
+ pseudos['only-child'] = function (el) {
80
+ return (p = el.parentNode) && (nodes = children(p)) && (nodes.length == 1) && (el == nodes[0])
81
+ };
82
+
83
+ pseudos['only-of-type'] = function (el) {
84
+ return (p = el.parentNode) && (nodes = children(p, el.nodeName)) && (nodes.length == 1) && (el == nodes[0])
85
+ }
86
+
87
+ pseudos.target = function (el) {
88
+ return (el.getAttribute('id') == location.hash.substr(1))
89
+ }
90
+
91
+ pseudos.checked = function (el) { return el.checked }
92
+
93
+ pseudos.enabled = function (el) { return !el.disabled }
94
+
95
+ pseudos.disabled = function (el) { return el.disabled }
96
+
97
+ pseudos.empty = function (el) { return !el.childNodes.length }
98
+
99
+ }();