kanpachi 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 (136) hide show
  1. checksums.yaml +4 -4
  2. data/.bowerrc +3 -0
  3. data/.travis.yml +3 -1
  4. data/bower.json +22 -0
  5. data/kanpachi.gemspec +6 -6
  6. data/lib/kanpachi/doc/template/components/html5shiv/.bower.json +26 -0
  7. data/lib/kanpachi/doc/template/components/html5shiv/dist/html5shiv-printshiv.js +11 -0
  8. data/lib/kanpachi/doc/template/{source/javascripts → components/html5shiv/dist}/html5shiv.js +4 -5
  9. data/lib/kanpachi/doc/template/components/html5shiv/readme.md +143 -0
  10. data/lib/kanpachi/doc/template/components/jquery/.bower.json +37 -0
  11. data/lib/kanpachi/doc/template/components/jquery/MIT-LICENSE.txt +21 -0
  12. data/lib/kanpachi/doc/template/components/jquery/bower.json +27 -0
  13. data/lib/kanpachi/doc/template/components/jquery/dist/jquery.js +10337 -0
  14. data/lib/kanpachi/doc/template/components/jquery/dist/jquery.min.js +5 -0
  15. data/lib/kanpachi/doc/template/components/jquery/dist/jquery.min.map +1 -0
  16. data/lib/kanpachi/doc/template/components/jquery/src/ajax.js +807 -0
  17. data/lib/kanpachi/doc/template/components/jquery/src/ajax/jsonp.js +89 -0
  18. data/lib/kanpachi/doc/template/components/jquery/src/ajax/load.js +75 -0
  19. data/lib/kanpachi/doc/template/components/jquery/src/ajax/parseJSON.js +51 -0
  20. data/lib/kanpachi/doc/template/components/jquery/src/ajax/parseXML.js +31 -0
  21. data/lib/kanpachi/doc/template/components/jquery/src/ajax/script.js +93 -0
  22. data/lib/kanpachi/doc/template/components/jquery/src/ajax/var/nonce.js +5 -0
  23. data/lib/kanpachi/doc/template/components/jquery/src/ajax/var/rquery.js +3 -0
  24. data/lib/kanpachi/doc/template/components/jquery/src/ajax/xhr.js +196 -0
  25. data/lib/kanpachi/doc/template/components/jquery/src/attributes.js +11 -0
  26. data/lib/kanpachi/doc/template/components/jquery/src/attributes/attr.js +271 -0
  27. data/lib/kanpachi/doc/template/components/jquery/src/attributes/classes.js +157 -0
  28. data/lib/kanpachi/doc/template/components/jquery/src/attributes/prop.js +134 -0
  29. data/lib/kanpachi/doc/template/components/jquery/src/attributes/support.js +64 -0
  30. data/lib/kanpachi/doc/template/components/jquery/src/attributes/val.js +176 -0
  31. data/lib/kanpachi/doc/template/components/jquery/src/callbacks.js +205 -0
  32. data/lib/kanpachi/doc/template/components/jquery/src/core.js +542 -0
  33. data/lib/kanpachi/doc/template/components/jquery/src/core/access.js +60 -0
  34. data/lib/kanpachi/doc/template/components/jquery/src/core/init.js +132 -0
  35. data/lib/kanpachi/doc/template/components/jquery/src/core/parseHTML.js +39 -0
  36. data/lib/kanpachi/doc/template/components/jquery/src/core/ready.js +151 -0
  37. data/lib/kanpachi/doc/template/components/jquery/src/core/var/rsingleTag.js +4 -0
  38. data/lib/kanpachi/doc/template/components/jquery/src/css.js +508 -0
  39. data/lib/kanpachi/doc/template/components/jquery/src/css/addGetHookIf.js +32 -0
  40. data/lib/kanpachi/doc/template/components/jquery/src/css/curCSS.js +117 -0
  41. data/lib/kanpachi/doc/template/components/jquery/src/css/defaultDisplay.js +68 -0
  42. data/lib/kanpachi/doc/template/components/jquery/src/css/hiddenVisibleSelectors.js +20 -0
  43. data/lib/kanpachi/doc/template/components/jquery/src/css/support.js +193 -0
  44. data/lib/kanpachi/doc/template/components/jquery/src/css/swap.js +28 -0
  45. data/lib/kanpachi/doc/template/components/jquery/src/css/var/cssExpand.js +3 -0
  46. data/lib/kanpachi/doc/template/components/jquery/src/css/var/isHidden.js +13 -0
  47. data/lib/kanpachi/doc/template/components/jquery/src/css/var/rmargin.js +3 -0
  48. data/lib/kanpachi/doc/template/components/jquery/src/css/var/rnumnonpx.js +5 -0
  49. data/lib/kanpachi/doc/template/components/jquery/src/data.js +332 -0
  50. data/lib/kanpachi/doc/template/components/jquery/src/data/accepts.js +21 -0
  51. data/lib/kanpachi/doc/template/components/jquery/src/data/support.js +25 -0
  52. data/lib/kanpachi/doc/template/components/jquery/src/deferred.js +150 -0
  53. data/lib/kanpachi/doc/template/components/jquery/src/deprecated.js +13 -0
  54. data/lib/kanpachi/doc/template/components/jquery/src/dimensions.js +50 -0
  55. data/lib/kanpachi/doc/template/components/jquery/src/effects.js +648 -0
  56. data/lib/kanpachi/doc/template/components/jquery/src/effects/Tween.js +114 -0
  57. data/lib/kanpachi/doc/template/components/jquery/src/effects/animatedSelector.js +13 -0
  58. data/lib/kanpachi/doc/template/components/jquery/src/effects/support.js +76 -0
  59. data/lib/kanpachi/doc/template/components/jquery/src/event.js +1029 -0
  60. data/lib/kanpachi/doc/template/components/jquery/src/event/alias.js +39 -0
  61. data/lib/kanpachi/doc/template/components/jquery/src/event/support.js +26 -0
  62. data/lib/kanpachi/doc/template/components/jquery/src/exports/amd.js +18 -0
  63. data/lib/kanpachi/doc/template/components/jquery/src/exports/global.js +32 -0
  64. data/lib/kanpachi/doc/template/components/jquery/src/intro.js +44 -0
  65. data/lib/kanpachi/doc/template/components/jquery/src/jquery.js +37 -0
  66. data/lib/kanpachi/doc/template/components/jquery/src/manipulation.js +744 -0
  67. data/lib/kanpachi/doc/template/components/jquery/src/manipulation/_evalUrl.js +18 -0
  68. data/lib/kanpachi/doc/template/components/jquery/src/manipulation/support.js +79 -0
  69. data/lib/kanpachi/doc/template/components/jquery/src/manipulation/var/rcheckableType.js +3 -0
  70. data/lib/kanpachi/doc/template/components/jquery/src/offset.js +211 -0
  71. data/lib/kanpachi/doc/template/components/jquery/src/outro.js +1 -0
  72. data/lib/kanpachi/doc/template/components/jquery/src/queue.js +142 -0
  73. data/lib/kanpachi/doc/template/components/jquery/src/queue/delay.js +22 -0
  74. data/lib/kanpachi/doc/template/components/jquery/src/selector-sizzle.js +14 -0
  75. data/lib/kanpachi/doc/template/components/jquery/src/selector.js +1 -0
  76. data/lib/kanpachi/doc/template/components/jquery/src/serialize.js +110 -0
  77. data/lib/kanpachi/doc/template/components/jquery/src/sizzle/dist/sizzle.js +2015 -0
  78. data/lib/kanpachi/doc/template/components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  79. data/lib/kanpachi/doc/template/components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  80. data/lib/kanpachi/doc/template/components/jquery/src/support.js +62 -0
  81. data/lib/kanpachi/doc/template/components/jquery/src/traversing.js +200 -0
  82. data/lib/kanpachi/doc/template/components/jquery/src/traversing/findFilter.js +100 -0
  83. data/lib/kanpachi/doc/template/components/jquery/src/traversing/var/rneedsContext.js +6 -0
  84. data/lib/kanpachi/doc/template/components/jquery/src/var/class2type.js +4 -0
  85. data/lib/kanpachi/doc/template/components/jquery/src/var/concat.js +5 -0
  86. data/lib/kanpachi/doc/template/components/jquery/src/var/deletedIds.js +3 -0
  87. data/lib/kanpachi/doc/template/components/jquery/src/var/hasOwn.js +5 -0
  88. data/lib/kanpachi/doc/template/components/jquery/src/var/indexOf.js +5 -0
  89. data/lib/kanpachi/doc/template/components/jquery/src/var/pnum.js +3 -0
  90. data/lib/kanpachi/doc/template/components/jquery/src/var/push.js +5 -0
  91. data/lib/kanpachi/doc/template/components/jquery/src/var/rnotwhite.js +3 -0
  92. data/lib/kanpachi/doc/template/components/jquery/src/var/slice.js +5 -0
  93. data/lib/kanpachi/doc/template/components/jquery/src/var/strundefined.js +3 -0
  94. data/lib/kanpachi/doc/template/components/jquery/src/var/support.js +4 -0
  95. data/lib/kanpachi/doc/template/components/jquery/src/var/toString.js +5 -0
  96. data/lib/kanpachi/doc/template/components/jquery/src/var/trim.js +3 -0
  97. data/lib/kanpachi/doc/template/components/jquery/src/wrap.js +75 -0
  98. data/lib/kanpachi/doc/template/components/respond/.bower.json +20 -0
  99. data/lib/kanpachi/doc/template/components/respond/Gruntfile.js +90 -0
  100. data/lib/kanpachi/doc/template/components/respond/LICENSE-MIT +22 -0
  101. data/lib/kanpachi/doc/template/components/respond/README.md +114 -0
  102. data/lib/kanpachi/doc/template/components/respond/bower.json +10 -0
  103. data/lib/kanpachi/doc/template/components/respond/cross-domain/example.html +24 -0
  104. data/lib/kanpachi/doc/template/components/respond/cross-domain/respond-proxy.html +96 -0
  105. data/lib/kanpachi/doc/template/components/respond/cross-domain/respond.proxy.gif +0 -0
  106. data/lib/kanpachi/doc/template/components/respond/cross-domain/respond.proxy.js +127 -0
  107. data/lib/kanpachi/doc/template/components/respond/dest/respond.matchmedia.addListener.min.js +5 -0
  108. data/lib/kanpachi/doc/template/components/respond/dest/respond.matchmedia.addListener.src.js +273 -0
  109. data/lib/kanpachi/doc/template/components/respond/dest/respond.min.js +5 -0
  110. data/lib/kanpachi/doc/template/components/respond/dest/respond.src.js +224 -0
  111. data/lib/kanpachi/doc/template/components/respond/package.json +32 -0
  112. data/lib/kanpachi/doc/template/components/respond/src/matchmedia.addListener.js +76 -0
  113. data/lib/kanpachi/doc/template/components/respond/src/matchmedia.polyfill.js +36 -0
  114. data/lib/kanpachi/doc/template/components/respond/src/respond.js +341 -0
  115. data/lib/kanpachi/doc/template/config.rb +4 -0
  116. data/lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.eot +0 -0
  117. data/lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.svg +201 -200
  118. data/lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.ttf +0 -0
  119. data/lib/kanpachi/doc/template/source/fonts/glyphicons-halflings-regular.woff +0 -0
  120. data/lib/kanpachi/doc/template/source/javascripts/all.coffee +2 -0
  121. data/lib/kanpachi/doc/template/source/javascripts/bootstrap.js +271 -319
  122. data/lib/kanpachi/doc/template/source/javascripts/bootstrap.min.js +6 -6
  123. data/lib/kanpachi/doc/template/source/javascripts/ie.coffee +2 -0
  124. data/lib/kanpachi/doc/template/source/layouts/layout.slim +4 -6
  125. data/lib/kanpachi/doc/template/source/stylesheets/bootstrap-theme.css +192 -229
  126. data/lib/kanpachi/doc/template/source/stylesheets/bootstrap-theme.css.map +1 -0
  127. data/lib/kanpachi/doc/template/source/stylesheets/bootstrap-theme.min.css +7 -1
  128. data/lib/kanpachi/doc/template/source/stylesheets/bootstrap.css +2036 -3056
  129. data/lib/kanpachi/doc/template/source/stylesheets/bootstrap.css.map +1 -0
  130. data/lib/kanpachi/doc/template/source/stylesheets/bootstrap.min.css +6 -8
  131. data/lib/kanpachi/version.rb +1 -1
  132. data/wercker.yml +27 -0
  133. metadata +143 -31
  134. data/lib/kanpachi/doc/template/source/javascripts/all.js +0 -1
  135. data/lib/kanpachi/doc/template/source/javascripts/jquery-1.10.2.min.js +0 -6
  136. data/lib/kanpachi/doc/template/source/javascripts/respond.min.js +0 -7
@@ -0,0 +1,3 @@
1
+ define(function() {
2
+ return [ "Top", "Right", "Bottom", "Left" ];
3
+ });
@@ -0,0 +1,13 @@
1
+ define([
2
+ "../../core",
3
+ "../../selector"
4
+ // css is assumed
5
+ ], function( jQuery ) {
6
+
7
+ return function( elem, el ) {
8
+ // isHidden might be called from jQuery#filter function;
9
+ // in that case, element will be second argument
10
+ elem = el || elem;
11
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
12
+ };
13
+ });
@@ -0,0 +1,3 @@
1
+ define(function() {
2
+ return (/^margin/);
3
+ });
@@ -0,0 +1,5 @@
1
+ define([
2
+ "../../var/pnum"
3
+ ], function( pnum ) {
4
+ return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
5
+ });
@@ -0,0 +1,332 @@
1
+ define([
2
+ "./core",
3
+ "./var/deletedIds",
4
+ "./data/support",
5
+ "./data/accepts"
6
+ ], function( jQuery, deletedIds, support ) {
7
+
8
+ var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
9
+ rmultiDash = /([A-Z])/g;
10
+
11
+ function dataAttr( elem, key, data ) {
12
+ // If nothing was found internally, try to fetch any
13
+ // data from the HTML5 data-* attribute
14
+ if ( data === undefined && elem.nodeType === 1 ) {
15
+
16
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
17
+
18
+ data = elem.getAttribute( name );
19
+
20
+ if ( typeof data === "string" ) {
21
+ try {
22
+ data = data === "true" ? true :
23
+ data === "false" ? false :
24
+ data === "null" ? null :
25
+ // Only convert to a number if it doesn't change the string
26
+ +data + "" === data ? +data :
27
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
28
+ data;
29
+ } catch( e ) {}
30
+
31
+ // Make sure we set the data so it isn't changed later
32
+ jQuery.data( elem, key, data );
33
+
34
+ } else {
35
+ data = undefined;
36
+ }
37
+ }
38
+
39
+ return data;
40
+ }
41
+
42
+ // checks a cache object for emptiness
43
+ function isEmptyDataObject( obj ) {
44
+ var name;
45
+ for ( name in obj ) {
46
+
47
+ // if the public data object is empty, the private is still empty
48
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
49
+ continue;
50
+ }
51
+ if ( name !== "toJSON" ) {
52
+ return false;
53
+ }
54
+ }
55
+
56
+ return true;
57
+ }
58
+
59
+ function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
60
+ if ( !jQuery.acceptData( elem ) ) {
61
+ return;
62
+ }
63
+
64
+ var ret, thisCache,
65
+ internalKey = jQuery.expando,
66
+
67
+ // We have to handle DOM nodes and JS objects differently because IE6-7
68
+ // can't GC object references properly across the DOM-JS boundary
69
+ isNode = elem.nodeType,
70
+
71
+ // Only DOM nodes need the global jQuery cache; JS object data is
72
+ // attached directly to the object so GC can occur automatically
73
+ cache = isNode ? jQuery.cache : elem,
74
+
75
+ // Only defining an ID for JS objects if its cache already exists allows
76
+ // the code to shortcut on the same path as a DOM node with no cache
77
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
78
+
79
+ // Avoid doing any more work than we need to when trying to get data on an
80
+ // object that has no data at all
81
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
82
+ return;
83
+ }
84
+
85
+ if ( !id ) {
86
+ // Only DOM nodes need a new unique ID for each element since their data
87
+ // ends up in the global cache
88
+ if ( isNode ) {
89
+ id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;
90
+ } else {
91
+ id = internalKey;
92
+ }
93
+ }
94
+
95
+ if ( !cache[ id ] ) {
96
+ // Avoid exposing jQuery metadata on plain JS objects when the object
97
+ // is serialized using JSON.stringify
98
+ cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
99
+ }
100
+
101
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
102
+ // shallow copied over onto the existing cache
103
+ if ( typeof name === "object" || typeof name === "function" ) {
104
+ if ( pvt ) {
105
+ cache[ id ] = jQuery.extend( cache[ id ], name );
106
+ } else {
107
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
108
+ }
109
+ }
110
+
111
+ thisCache = cache[ id ];
112
+
113
+ // jQuery data() is stored in a separate object inside the object's internal data
114
+ // cache in order to avoid key collisions between internal data and user-defined
115
+ // data.
116
+ if ( !pvt ) {
117
+ if ( !thisCache.data ) {
118
+ thisCache.data = {};
119
+ }
120
+
121
+ thisCache = thisCache.data;
122
+ }
123
+
124
+ if ( data !== undefined ) {
125
+ thisCache[ jQuery.camelCase( name ) ] = data;
126
+ }
127
+
128
+ // Check for both converted-to-camel and non-converted data property names
129
+ // If a data property was specified
130
+ if ( typeof name === "string" ) {
131
+
132
+ // First Try to find as-is property data
133
+ ret = thisCache[ name ];
134
+
135
+ // Test for null|undefined property data
136
+ if ( ret == null ) {
137
+
138
+ // Try to find the camelCased property
139
+ ret = thisCache[ jQuery.camelCase( name ) ];
140
+ }
141
+ } else {
142
+ ret = thisCache;
143
+ }
144
+
145
+ return ret;
146
+ }
147
+
148
+ function internalRemoveData( elem, name, pvt ) {
149
+ if ( !jQuery.acceptData( elem ) ) {
150
+ return;
151
+ }
152
+
153
+ var thisCache, i,
154
+ isNode = elem.nodeType,
155
+
156
+ // See jQuery.data for more information
157
+ cache = isNode ? jQuery.cache : elem,
158
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
159
+
160
+ // If there is already no cache entry for this object, there is no
161
+ // purpose in continuing
162
+ if ( !cache[ id ] ) {
163
+ return;
164
+ }
165
+
166
+ if ( name ) {
167
+
168
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
169
+
170
+ if ( thisCache ) {
171
+
172
+ // Support array or space separated string names for data keys
173
+ if ( !jQuery.isArray( name ) ) {
174
+
175
+ // try the string as a key before any manipulation
176
+ if ( name in thisCache ) {
177
+ name = [ name ];
178
+ } else {
179
+
180
+ // split the camel cased version by spaces unless a key with the spaces exists
181
+ name = jQuery.camelCase( name );
182
+ if ( name in thisCache ) {
183
+ name = [ name ];
184
+ } else {
185
+ name = name.split(" ");
186
+ }
187
+ }
188
+ } else {
189
+ // If "name" is an array of keys...
190
+ // When data is initially created, via ("key", "val") signature,
191
+ // keys will be converted to camelCase.
192
+ // Since there is no way to tell _how_ a key was added, remove
193
+ // both plain key and camelCase key. #12786
194
+ // This will only penalize the array argument path.
195
+ name = name.concat( jQuery.map( name, jQuery.camelCase ) );
196
+ }
197
+
198
+ i = name.length;
199
+ while ( i-- ) {
200
+ delete thisCache[ name[i] ];
201
+ }
202
+
203
+ // If there is no data left in the cache, we want to continue
204
+ // and let the cache object itself get destroyed
205
+ if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
206
+ return;
207
+ }
208
+ }
209
+ }
210
+
211
+ // See jQuery.data for more information
212
+ if ( !pvt ) {
213
+ delete cache[ id ].data;
214
+
215
+ // Don't destroy the parent cache unless the internal data object
216
+ // had been the only thing left in it
217
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
218
+ return;
219
+ }
220
+ }
221
+
222
+ // Destroy the cache
223
+ if ( isNode ) {
224
+ jQuery.cleanData( [ elem ], true );
225
+
226
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
227
+ /* jshint eqeqeq: false */
228
+ } else if ( support.deleteExpando || cache != cache.window ) {
229
+ /* jshint eqeqeq: true */
230
+ delete cache[ id ];
231
+
232
+ // When all else fails, null
233
+ } else {
234
+ cache[ id ] = null;
235
+ }
236
+ }
237
+
238
+ jQuery.extend({
239
+ cache: {},
240
+
241
+ // The following elements (space-suffixed to avoid Object.prototype collisions)
242
+ // throw uncatchable exceptions if you attempt to set expando properties
243
+ noData: {
244
+ "applet ": true,
245
+ "embed ": true,
246
+ // ...but Flash objects (which have this classid) *can* handle expandos
247
+ "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
248
+ },
249
+
250
+ hasData: function( elem ) {
251
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
252
+ return !!elem && !isEmptyDataObject( elem );
253
+ },
254
+
255
+ data: function( elem, name, data ) {
256
+ return internalData( elem, name, data );
257
+ },
258
+
259
+ removeData: function( elem, name ) {
260
+ return internalRemoveData( elem, name );
261
+ },
262
+
263
+ // For internal use only.
264
+ _data: function( elem, name, data ) {
265
+ return internalData( elem, name, data, true );
266
+ },
267
+
268
+ _removeData: function( elem, name ) {
269
+ return internalRemoveData( elem, name, true );
270
+ }
271
+ });
272
+
273
+ jQuery.fn.extend({
274
+ data: function( key, value ) {
275
+ var i, name, data,
276
+ elem = this[0],
277
+ attrs = elem && elem.attributes;
278
+
279
+ // Special expections of .data basically thwart jQuery.access,
280
+ // so implement the relevant behavior ourselves
281
+
282
+ // Gets all values
283
+ if ( key === undefined ) {
284
+ if ( this.length ) {
285
+ data = jQuery.data( elem );
286
+
287
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
288
+ i = attrs.length;
289
+ while ( i-- ) {
290
+ name = attrs[i].name;
291
+
292
+ if ( name.indexOf("data-") === 0 ) {
293
+ name = jQuery.camelCase( name.slice(5) );
294
+
295
+ dataAttr( elem, name, data[ name ] );
296
+ }
297
+ }
298
+ jQuery._data( elem, "parsedAttrs", true );
299
+ }
300
+ }
301
+
302
+ return data;
303
+ }
304
+
305
+ // Sets multiple values
306
+ if ( typeof key === "object" ) {
307
+ return this.each(function() {
308
+ jQuery.data( this, key );
309
+ });
310
+ }
311
+
312
+ return arguments.length > 1 ?
313
+
314
+ // Sets one value
315
+ this.each(function() {
316
+ jQuery.data( this, key, value );
317
+ }) :
318
+
319
+ // Gets one value
320
+ // Try to fetch any internally stored data first
321
+ elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;
322
+ },
323
+
324
+ removeData: function( key ) {
325
+ return this.each(function() {
326
+ jQuery.removeData( this, key );
327
+ });
328
+ }
329
+ });
330
+
331
+ return jQuery;
332
+ });
@@ -0,0 +1,21 @@
1
+ define([
2
+ "../core"
3
+ ], function( jQuery ) {
4
+
5
+ /**
6
+ * Determines whether an object can have data
7
+ */
8
+ jQuery.acceptData = function( elem ) {
9
+ var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ],
10
+ nodeType = +elem.nodeType || 1;
11
+
12
+ // Do not set data on non-element DOM nodes because it will not be cleared (#8335).
13
+ return nodeType !== 1 && nodeType !== 9 ?
14
+ false :
15
+
16
+ // Nodes accept data unless otherwise specified; rejection can be conditional
17
+ !noData || noData !== true && elem.getAttribute("classid") === noData;
18
+ };
19
+
20
+ return jQuery.acceptData;
21
+ });
@@ -0,0 +1,25 @@
1
+ define([
2
+ "../var/support"
3
+ ], function( support ) {
4
+
5
+ (function() {
6
+ var div = document.createElement( "div" );
7
+
8
+ // Execute the test only if not already executed in another module.
9
+ if (support.deleteExpando == null) {
10
+ // Support: IE<9
11
+ support.deleteExpando = true;
12
+ try {
13
+ delete div.test;
14
+ } catch( e ) {
15
+ support.deleteExpando = false;
16
+ }
17
+ }
18
+
19
+ // Null elements to avoid leaks in IE.
20
+ div = null;
21
+ })();
22
+
23
+ return support;
24
+
25
+ });
@@ -0,0 +1,150 @@
1
+ define([
2
+ "./core",
3
+ "./var/slice",
4
+ "./callbacks"
5
+ ], function( jQuery, slice ) {
6
+
7
+ jQuery.extend({
8
+
9
+ Deferred: function( func ) {
10
+ var tuples = [
11
+ // action, add listener, listener list, final state
12
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
13
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
14
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
15
+ ],
16
+ state = "pending",
17
+ promise = {
18
+ state: function() {
19
+ return state;
20
+ },
21
+ always: function() {
22
+ deferred.done( arguments ).fail( arguments );
23
+ return this;
24
+ },
25
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
26
+ var fns = arguments;
27
+ return jQuery.Deferred(function( newDefer ) {
28
+ jQuery.each( tuples, function( i, tuple ) {
29
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
30
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
31
+ deferred[ tuple[1] ](function() {
32
+ var returned = fn && fn.apply( this, arguments );
33
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
34
+ returned.promise()
35
+ .done( newDefer.resolve )
36
+ .fail( newDefer.reject )
37
+ .progress( newDefer.notify );
38
+ } else {
39
+ newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
40
+ }
41
+ });
42
+ });
43
+ fns = null;
44
+ }).promise();
45
+ },
46
+ // Get a promise for this deferred
47
+ // If obj is provided, the promise aspect is added to the object
48
+ promise: function( obj ) {
49
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
50
+ }
51
+ },
52
+ deferred = {};
53
+
54
+ // Keep pipe for back-compat
55
+ promise.pipe = promise.then;
56
+
57
+ // Add list-specific methods
58
+ jQuery.each( tuples, function( i, tuple ) {
59
+ var list = tuple[ 2 ],
60
+ stateString = tuple[ 3 ];
61
+
62
+ // promise[ done | fail | progress ] = list.add
63
+ promise[ tuple[1] ] = list.add;
64
+
65
+ // Handle state
66
+ if ( stateString ) {
67
+ list.add(function() {
68
+ // state = [ resolved | rejected ]
69
+ state = stateString;
70
+
71
+ // [ reject_list | resolve_list ].disable; progress_list.lock
72
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
73
+ }
74
+
75
+ // deferred[ resolve | reject | notify ]
76
+ deferred[ tuple[0] ] = function() {
77
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
78
+ return this;
79
+ };
80
+ deferred[ tuple[0] + "With" ] = list.fireWith;
81
+ });
82
+
83
+ // Make the deferred a promise
84
+ promise.promise( deferred );
85
+
86
+ // Call given func if any
87
+ if ( func ) {
88
+ func.call( deferred, deferred );
89
+ }
90
+
91
+ // All done!
92
+ return deferred;
93
+ },
94
+
95
+ // Deferred helper
96
+ when: function( subordinate /* , ..., subordinateN */ ) {
97
+ var i = 0,
98
+ resolveValues = slice.call( arguments ),
99
+ length = resolveValues.length,
100
+
101
+ // the count of uncompleted subordinates
102
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
103
+
104
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
105
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
106
+
107
+ // Update function for both resolve and progress values
108
+ updateFunc = function( i, contexts, values ) {
109
+ return function( value ) {
110
+ contexts[ i ] = this;
111
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
112
+ if ( values === progressValues ) {
113
+ deferred.notifyWith( contexts, values );
114
+
115
+ } else if ( !(--remaining) ) {
116
+ deferred.resolveWith( contexts, values );
117
+ }
118
+ };
119
+ },
120
+
121
+ progressValues, progressContexts, resolveContexts;
122
+
123
+ // add listeners to Deferred subordinates; treat others as resolved
124
+ if ( length > 1 ) {
125
+ progressValues = new Array( length );
126
+ progressContexts = new Array( length );
127
+ resolveContexts = new Array( length );
128
+ for ( ; i < length; i++ ) {
129
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
130
+ resolveValues[ i ].promise()
131
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
132
+ .fail( deferred.reject )
133
+ .progress( updateFunc( i, progressContexts, progressValues ) );
134
+ } else {
135
+ --remaining;
136
+ }
137
+ }
138
+ }
139
+
140
+ // if we're not waiting on anything, resolve the master
141
+ if ( !remaining ) {
142
+ deferred.resolveWith( resolveContexts, resolveValues );
143
+ }
144
+
145
+ return deferred.promise();
146
+ }
147
+ });
148
+
149
+ return jQuery;
150
+ });