postrest 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app.rb +1 -1
- data/public/index.htm +116 -0
- data/public/node_modules/pivottable/CONTRIBUTING.md +19 -0
- data/public/node_modules/pivottable/LICENSE.md +9 -0
- data/public/node_modules/pivottable/ReadMe.md +155 -0
- data/public/node_modules/pivottable/bower.json +31 -0
- data/public/node_modules/pivottable/c3_renderers.coffee +155 -0
- data/public/node_modules/pivottable/d3_renderers.coffee +73 -0
- data/public/node_modules/pivottable/dist/c3_renderers.js +256 -0
- data/public/node_modules/pivottable/dist/c3_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/c3_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/c3_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/d3_renderers.js +105 -0
- data/public/node_modules/pivottable/dist/d3_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/d3_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/d3_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/export_renderers.js +80 -0
- data/public/node_modules/pivottable/dist/export_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/export_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/export_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.js +183 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.css +97 -0
- data/public/node_modules/pivottable/dist/pivot.es.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.es.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.es.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.es.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.fr.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.fr.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.fr.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.fr.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.js +1511 -0
- data/public/node_modules/pivottable/dist/pivot.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.min.css +1 -0
- data/public/node_modules/pivottable/dist/pivot.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.nl.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.nl.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.nl.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.nl.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.pt.js +104 -0
- data/public/node_modules/pivottable/dist/pivot.pt.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.pt.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.pt.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.ru.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.ru.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.ru.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.ru.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.tr.js +104 -0
- data/public/node_modules/pivottable/dist/pivot.tr.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.tr.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.tr.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/tips_data.min.js +247 -0
- data/public/node_modules/pivottable/examples/c3.html +61 -0
- data/public/node_modules/pivottable/examples/d3.html +49 -0
- data/public/node_modules/pivottable/examples/fully_loaded.html +80 -0
- data/public/node_modules/pivottable/examples/gchart.html +53 -0
- data/public/node_modules/pivottable/examples/gh-fork-ribbon.css +140 -0
- data/public/node_modules/pivottable/examples/gh-fork-ribbon.ie.css +78 -0
- data/public/node_modules/pivottable/examples/index.html +85 -0
- data/public/node_modules/pivottable/examples/local.html +74 -0
- data/public/node_modules/pivottable/examples/montreal_2014.csv +366 -0
- data/public/node_modules/pivottable/examples/montreal_2014.html +106 -0
- data/public/node_modules/pivottable/examples/mps.csv +309 -0
- data/public/node_modules/pivottable/examples/mps.html +45 -0
- data/public/node_modules/pivottable/examples/mps.json +1 -0
- data/public/node_modules/pivottable/examples/mps_agg.html +44 -0
- data/public/node_modules/pivottable/examples/mps_csv.html +42 -0
- data/public/node_modules/pivottable/examples/mps_export.html +44 -0
- data/public/node_modules/pivottable/examples/mps_fr.html +40 -0
- data/public/node_modules/pivottable/examples/mps_prepop.html +42 -0
- data/public/node_modules/pivottable/examples/onrefresh.html +52 -0
- data/public/node_modules/pivottable/examples/rcsvs.html +87 -0
- data/public/node_modules/pivottable/examples/scatter.html +53 -0
- data/public/node_modules/pivottable/examples/show_code.js +17 -0
- data/public/node_modules/pivottable/examples/simple.html +41 -0
- data/public/node_modules/pivottable/examples/simple_agg.html +51 -0
- data/public/node_modules/pivottable/examples/simple_function.html +57 -0
- data/public/node_modules/pivottable/examples/simple_ui.html +42 -0
- data/public/node_modules/pivottable/examples/simple_ui_from_table.html +60 -0
- data/public/node_modules/pivottable/export_renderers.coffee +57 -0
- data/public/node_modules/pivottable/gchart_renderers.coffee +111 -0
- data/public/node_modules/pivottable/gulpFile.js +95 -0
- data/public/node_modules/pivottable/images/animation.gif +0 -0
- data/public/node_modules/pivottable/images/filters.png +0 -0
- data/public/node_modules/pivottable/images/gender_age_bins.png +0 -0
- data/public/node_modules/pivottable/images/gender_imbalance.png +0 -0
- data/public/node_modules/pivottable/images/gender_imbalance_instructions.png +0 -0
- data/public/node_modules/pivottable/images/initial_state.png +0 -0
- data/public/node_modules/pivottable/images/province_x_party_heatmap.png +0 -0
- data/public/node_modules/pivottable/images/province_x_party_heatmap_instructions.png +0 -0
- data/public/node_modules/pivottable/images/simple.png +0 -0
- data/public/node_modules/pivottable/images/simple_ui.png +0 -0
- data/public/node_modules/pivottable/images/whats_what.png +0 -0
- data/public/node_modules/pivottable/index.html +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/AUTHORS.txt +278 -0
- data/public/node_modules/pivottable/node_modules/jquery/LICENSE.txt +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/README.md +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/bower.json +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.js +9842 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.js +4 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.js +7877 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.js +4 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/package.json +122 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/LICENSE.txt +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.js +2143 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax.js +845 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/jsonp.js +100 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/load.js +83 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseJSON.js +13 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseXML.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/script.js +68 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/location.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/nonce.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/rquery.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/xhr.js +167 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes.js +11 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/attr.js +142 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/classes.js +177 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/prop.js +125 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/support.js +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/val.js +177 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/callbacks.js +232 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core.js +494 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/DOMEval.js +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/access.js +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/init.js +134 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/parseHTML.js +41 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/ready.js +103 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/support.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css.js +515 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/addGetHookIf.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/adjustCSS.js +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/curCSS.js +60 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/defaultDisplay.js +72 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/hiddenVisibleSelectors.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/showHide.js +48 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/support.js +121 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/cssExpand.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/getStyles.js +15 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/isHidden.js +16 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rmargin.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/swap.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data.js +187 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/Data.js +200 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/accepts.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/support.js +23 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/acceptData.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataPriv.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataUser.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deferred.js +158 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deferred/exceptionHook.js +19 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deprecated.js +32 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/dimensions.js +54 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects.js +629 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/Tween.js +121 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/animatedSelector.js +13 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/support.js +58 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event.js +710 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/ajax.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/alias.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/focusin.js +53 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/support.js +9 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/trigger.js +199 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/exports/amd.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/exports/global.js +26 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/intro.js +44 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/jquery.js +37 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation.js +481 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/_evalUrl.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/buildFragment.js +102 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/createSafeFragment.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/getAll.js +21 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/support.js +33 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/nodeNames.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/wrapMap.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/offset.js +218 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/outro.js +2 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/queue.js +143 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/queue/delay.js +22 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector-native.js +211 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector-sizzle.js +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector.js +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/serialize.js +125 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/support.js +63 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing.js +175 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/findFilter.js +100 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/dir.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/siblings.js +15 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/arr.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/class2type.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/concat.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/deletedIds.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/document.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/documentElement.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/hasOwn.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/indexOf.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/pnum.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/push.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/rcssNum.js +7 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/rnotwhite.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/slice.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/support.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/toString.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/wrap.js +79 -0
- data/public/node_modules/pivottable/package.json +70 -0
- data/public/node_modules/pivottable/pivot.coffee +957 -0
- data/public/node_modules/pivottable/pivot.es.coffee +57 -0
- data/public/node_modules/pivottable/pivot.fr.coffee +57 -0
- data/public/node_modules/pivottable/pivot.nl.coffee +55 -0
- data/public/node_modules/pivottable/pivot.pt.coffee +80 -0
- data/public/node_modules/pivottable/pivot.ru.coffee +56 -0
- data/public/node_modules/pivottable/pivot.tr.coffee +80 -0
- data/public/node_modules/pivottable/pivottable.jquery.json +33 -0
- data/public/node_modules/pivottable/tests/boot.js +152 -0
- data/public/node_modules/pivottable/tests/index.html +35 -0
- data/public/node_modules/pivottable/tests/pivot_spec.coffee +458 -0
- data/public/vendor.js +5 -0
- metadata +232 -1
@@ -0,0 +1,63 @@
|
|
1
|
+
define( [
|
2
|
+
"./core",
|
3
|
+
"./var/support",
|
4
|
+
"./var/document",
|
5
|
+
"./core/init", // Needed for hasOwn support test
|
6
|
+
// This is listed as a dependency for build order, but it's still optional in builds
|
7
|
+
"./core/ready"
|
8
|
+
], function( jQuery, support, document ) {
|
9
|
+
|
10
|
+
// Support: IE<9
|
11
|
+
// Iteration over object's inherited properties before its own
|
12
|
+
var i;
|
13
|
+
for ( i in jQuery( support ) ) {
|
14
|
+
break;
|
15
|
+
}
|
16
|
+
support.ownFirst = i === "0";
|
17
|
+
|
18
|
+
// Note: most support tests are defined in their respective modules.
|
19
|
+
// false until the test is run
|
20
|
+
support.inlineBlockNeedsLayout = false;
|
21
|
+
|
22
|
+
// Execute ASAP in case we need to set body.style.zoom
|
23
|
+
jQuery( function() {
|
24
|
+
|
25
|
+
// Minified: var a,b,c,d
|
26
|
+
var val, div, body, container;
|
27
|
+
|
28
|
+
body = document.getElementsByTagName( "body" )[ 0 ];
|
29
|
+
if ( !body || !body.style ) {
|
30
|
+
|
31
|
+
// Return for frameset docs that don't have a body
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
|
35
|
+
// Setup
|
36
|
+
div = document.createElement( "div" );
|
37
|
+
container = document.createElement( "div" );
|
38
|
+
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
|
39
|
+
body.appendChild( container ).appendChild( div );
|
40
|
+
|
41
|
+
if ( typeof div.style.zoom !== "undefined" ) {
|
42
|
+
|
43
|
+
// Support: IE<8
|
44
|
+
// Check if natively block-level elements act like inline-block
|
45
|
+
// elements when setting their display to 'inline' and giving
|
46
|
+
// them layout
|
47
|
+
div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";
|
48
|
+
|
49
|
+
support.inlineBlockNeedsLayout = val = div.offsetWidth === 3;
|
50
|
+
if ( val ) {
|
51
|
+
|
52
|
+
// Prevent IE 6 from affecting layout for positioned elements #11048
|
53
|
+
// Prevent IE from shrinking the body in IE 7 mode #12869
|
54
|
+
// Support: IE<8
|
55
|
+
body.style.zoom = 1;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
body.removeChild( container );
|
60
|
+
} );
|
61
|
+
|
62
|
+
return support;
|
63
|
+
} );
|
@@ -0,0 +1,175 @@
|
|
1
|
+
define( [
|
2
|
+
"./core",
|
3
|
+
"./var/indexOf",
|
4
|
+
"./traversing/var/dir",
|
5
|
+
"./traversing/var/siblings",
|
6
|
+
"./traversing/var/rneedsContext",
|
7
|
+
"./core/init",
|
8
|
+
"./traversing/findFilter",
|
9
|
+
"./selector"
|
10
|
+
], function( jQuery, indexOf, dir, siblings, rneedsContext ) {
|
11
|
+
|
12
|
+
var rparentsprev = /^(?:parents|prev(?:Until|All))/,
|
13
|
+
|
14
|
+
// Methods guaranteed to produce a unique set when starting from a unique set
|
15
|
+
guaranteedUnique = {
|
16
|
+
children: true,
|
17
|
+
contents: true,
|
18
|
+
next: true,
|
19
|
+
prev: true
|
20
|
+
};
|
21
|
+
|
22
|
+
jQuery.fn.extend( {
|
23
|
+
has: function( target ) {
|
24
|
+
var targets = jQuery( target, this ),
|
25
|
+
l = targets.length;
|
26
|
+
|
27
|
+
return this.filter( function() {
|
28
|
+
var i = 0;
|
29
|
+
for ( ; i < l; i++ ) {
|
30
|
+
if ( jQuery.contains( this, targets[ i ] ) ) {
|
31
|
+
return true;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
} );
|
35
|
+
},
|
36
|
+
|
37
|
+
closest: function( selectors, context ) {
|
38
|
+
var cur,
|
39
|
+
i = 0,
|
40
|
+
l = this.length,
|
41
|
+
matched = [],
|
42
|
+
pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
|
43
|
+
jQuery( selectors, context || this.context ) :
|
44
|
+
0;
|
45
|
+
|
46
|
+
for ( ; i < l; i++ ) {
|
47
|
+
for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
|
48
|
+
|
49
|
+
// Always skip document fragments
|
50
|
+
if ( cur.nodeType < 11 && ( pos ?
|
51
|
+
pos.index( cur ) > -1 :
|
52
|
+
|
53
|
+
// Don't pass non-elements to Sizzle
|
54
|
+
cur.nodeType === 1 &&
|
55
|
+
jQuery.find.matchesSelector( cur, selectors ) ) ) {
|
56
|
+
|
57
|
+
matched.push( cur );
|
58
|
+
break;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
|
64
|
+
},
|
65
|
+
|
66
|
+
// Determine the position of an element within the set
|
67
|
+
index: function( elem ) {
|
68
|
+
|
69
|
+
// No argument, return index in parent
|
70
|
+
if ( !elem ) {
|
71
|
+
return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Index in selector
|
75
|
+
if ( typeof elem === "string" ) {
|
76
|
+
return indexOf.call( jQuery( elem ), this[ 0 ] );
|
77
|
+
}
|
78
|
+
|
79
|
+
// Locate the position of the desired element
|
80
|
+
return indexOf.call( this,
|
81
|
+
|
82
|
+
// If it receives a jQuery object, the first element is used
|
83
|
+
elem.jquery ? elem[ 0 ] : elem
|
84
|
+
);
|
85
|
+
},
|
86
|
+
|
87
|
+
add: function( selector, context ) {
|
88
|
+
return this.pushStack(
|
89
|
+
jQuery.uniqueSort(
|
90
|
+
jQuery.merge( this.get(), jQuery( selector, context ) )
|
91
|
+
)
|
92
|
+
);
|
93
|
+
},
|
94
|
+
|
95
|
+
addBack: function( selector ) {
|
96
|
+
return this.add( selector == null ?
|
97
|
+
this.prevObject : this.prevObject.filter( selector )
|
98
|
+
);
|
99
|
+
}
|
100
|
+
} );
|
101
|
+
|
102
|
+
function sibling( cur, dir ) {
|
103
|
+
while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
|
104
|
+
return cur;
|
105
|
+
}
|
106
|
+
|
107
|
+
jQuery.each( {
|
108
|
+
parent: function( elem ) {
|
109
|
+
var parent = elem.parentNode;
|
110
|
+
return parent && parent.nodeType !== 11 ? parent : null;
|
111
|
+
},
|
112
|
+
parents: function( elem ) {
|
113
|
+
return dir( elem, "parentNode" );
|
114
|
+
},
|
115
|
+
parentsUntil: function( elem, i, until ) {
|
116
|
+
return dir( elem, "parentNode", until );
|
117
|
+
},
|
118
|
+
next: function( elem ) {
|
119
|
+
return sibling( elem, "nextSibling" );
|
120
|
+
},
|
121
|
+
prev: function( elem ) {
|
122
|
+
return sibling( elem, "previousSibling" );
|
123
|
+
},
|
124
|
+
nextAll: function( elem ) {
|
125
|
+
return dir( elem, "nextSibling" );
|
126
|
+
},
|
127
|
+
prevAll: function( elem ) {
|
128
|
+
return dir( elem, "previousSibling" );
|
129
|
+
},
|
130
|
+
nextUntil: function( elem, i, until ) {
|
131
|
+
return dir( elem, "nextSibling", until );
|
132
|
+
},
|
133
|
+
prevUntil: function( elem, i, until ) {
|
134
|
+
return dir( elem, "previousSibling", until );
|
135
|
+
},
|
136
|
+
siblings: function( elem ) {
|
137
|
+
return siblings( ( elem.parentNode || {} ).firstChild, elem );
|
138
|
+
},
|
139
|
+
children: function( elem ) {
|
140
|
+
return siblings( elem.firstChild );
|
141
|
+
},
|
142
|
+
contents: function( elem ) {
|
143
|
+
return elem.contentDocument || jQuery.merge( [], elem.childNodes );
|
144
|
+
}
|
145
|
+
}, function( name, fn ) {
|
146
|
+
jQuery.fn[ name ] = function( until, selector ) {
|
147
|
+
var matched = jQuery.map( this, fn, until );
|
148
|
+
|
149
|
+
if ( name.slice( -5 ) !== "Until" ) {
|
150
|
+
selector = until;
|
151
|
+
}
|
152
|
+
|
153
|
+
if ( selector && typeof selector === "string" ) {
|
154
|
+
matched = jQuery.filter( selector, matched );
|
155
|
+
}
|
156
|
+
|
157
|
+
if ( this.length > 1 ) {
|
158
|
+
|
159
|
+
// Remove duplicates
|
160
|
+
if ( !guaranteedUnique[ name ] ) {
|
161
|
+
jQuery.uniqueSort( matched );
|
162
|
+
}
|
163
|
+
|
164
|
+
// Reverse order for parents* and prev-derivatives
|
165
|
+
if ( rparentsprev.test( name ) ) {
|
166
|
+
matched.reverse();
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
return this.pushStack( matched );
|
171
|
+
};
|
172
|
+
} );
|
173
|
+
|
174
|
+
return jQuery;
|
175
|
+
} );
|
@@ -0,0 +1,100 @@
|
|
1
|
+
define( [
|
2
|
+
"../core",
|
3
|
+
"../var/indexOf",
|
4
|
+
"./var/rneedsContext",
|
5
|
+
"../selector"
|
6
|
+
], function( jQuery, indexOf, rneedsContext ) {
|
7
|
+
|
8
|
+
var risSimple = /^.[^:#\[\.,]*$/;
|
9
|
+
|
10
|
+
// Implement the identical functionality for filter and not
|
11
|
+
function winnow( elements, qualifier, not ) {
|
12
|
+
if ( jQuery.isFunction( qualifier ) ) {
|
13
|
+
return jQuery.grep( elements, function( elem, i ) {
|
14
|
+
/* jshint -W018 */
|
15
|
+
return !!qualifier.call( elem, i, elem ) !== not;
|
16
|
+
} );
|
17
|
+
|
18
|
+
}
|
19
|
+
|
20
|
+
if ( qualifier.nodeType ) {
|
21
|
+
return jQuery.grep( elements, function( elem ) {
|
22
|
+
return ( elem === qualifier ) !== not;
|
23
|
+
} );
|
24
|
+
|
25
|
+
}
|
26
|
+
|
27
|
+
if ( typeof qualifier === "string" ) {
|
28
|
+
if ( risSimple.test( qualifier ) ) {
|
29
|
+
return jQuery.filter( qualifier, elements, not );
|
30
|
+
}
|
31
|
+
|
32
|
+
qualifier = jQuery.filter( qualifier, elements );
|
33
|
+
}
|
34
|
+
|
35
|
+
return jQuery.grep( elements, function( elem ) {
|
36
|
+
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
37
|
+
} );
|
38
|
+
}
|
39
|
+
|
40
|
+
jQuery.filter = function( expr, elems, not ) {
|
41
|
+
var elem = elems[ 0 ];
|
42
|
+
|
43
|
+
if ( not ) {
|
44
|
+
expr = ":not(" + expr + ")";
|
45
|
+
}
|
46
|
+
|
47
|
+
return elems.length === 1 && elem.nodeType === 1 ?
|
48
|
+
jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
|
49
|
+
jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
50
|
+
return elem.nodeType === 1;
|
51
|
+
} ) );
|
52
|
+
};
|
53
|
+
|
54
|
+
jQuery.fn.extend( {
|
55
|
+
find: function( selector ) {
|
56
|
+
var i,
|
57
|
+
len = this.length,
|
58
|
+
ret = [],
|
59
|
+
self = this;
|
60
|
+
|
61
|
+
if ( typeof selector !== "string" ) {
|
62
|
+
return this.pushStack( jQuery( selector ).filter( function() {
|
63
|
+
for ( i = 0; i < len; i++ ) {
|
64
|
+
if ( jQuery.contains( self[ i ], this ) ) {
|
65
|
+
return true;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
} ) );
|
69
|
+
}
|
70
|
+
|
71
|
+
for ( i = 0; i < len; i++ ) {
|
72
|
+
jQuery.find( selector, self[ i ], ret );
|
73
|
+
}
|
74
|
+
|
75
|
+
// Needed because $( selector, context ) becomes $( context ).find( selector )
|
76
|
+
ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
|
77
|
+
ret.selector = this.selector ? this.selector + " " + selector : selector;
|
78
|
+
return ret;
|
79
|
+
},
|
80
|
+
filter: function( selector ) {
|
81
|
+
return this.pushStack( winnow( this, selector || [], false ) );
|
82
|
+
},
|
83
|
+
not: function( selector ) {
|
84
|
+
return this.pushStack( winnow( this, selector || [], true ) );
|
85
|
+
},
|
86
|
+
is: function( selector ) {
|
87
|
+
return !!winnow(
|
88
|
+
this,
|
89
|
+
|
90
|
+
// If this is a positional/relative selector, check membership in the returned set
|
91
|
+
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
92
|
+
typeof selector === "string" && rneedsContext.test( selector ) ?
|
93
|
+
jQuery( selector ) :
|
94
|
+
selector || [],
|
95
|
+
false
|
96
|
+
).length;
|
97
|
+
}
|
98
|
+
} );
|
99
|
+
|
100
|
+
} );
|
@@ -0,0 +1,20 @@
|
|
1
|
+
define( [
|
2
|
+
"../../core"
|
3
|
+
], function( jQuery ) {
|
4
|
+
|
5
|
+
return function( elem, dir, until ) {
|
6
|
+
var matched = [],
|
7
|
+
truncate = until !== undefined;
|
8
|
+
|
9
|
+
while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
|
10
|
+
if ( elem.nodeType === 1 ) {
|
11
|
+
if ( truncate && jQuery( elem ).is( until ) ) {
|
12
|
+
break;
|
13
|
+
}
|
14
|
+
matched.push( elem );
|
15
|
+
}
|
16
|
+
}
|
17
|
+
return matched;
|
18
|
+
};
|
19
|
+
|
20
|
+
} );
|