logster 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/Guardfile +8 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +38 -0
  7. data/Rakefile +18 -0
  8. data/assets/javascript/app.js +377 -0
  9. data/assets/javascript/external/ember.js +44267 -0
  10. data/assets/javascript/external/ember.min.js +19 -0
  11. data/assets/javascript/external/handlebars.min.js +28 -0
  12. data/assets/javascript/external/jquery.min.js +5 -0
  13. data/assets/javascript/external/lodash.min.js +56 -0
  14. data/assets/javascript/external/moment.min.js +6 -0
  15. data/assets/javascript/templates/application.handlebars +1 -0
  16. data/assets/javascript/templates/index.handlebars +48 -0
  17. data/assets/javascript/templates/message.handlebars +7 -0
  18. data/assets/stylesheets/app.css +188 -0
  19. data/bower_components/ember/.bower.json +22 -0
  20. data/bower_components/ember/.gitignore +5 -0
  21. data/bower_components/ember/Makefile +9 -0
  22. data/bower_components/ember/README.md +12 -0
  23. data/bower_components/ember/bower.json +11 -0
  24. data/bower_components/ember/component.json +13 -0
  25. data/bower_components/ember/composer.json +27 -0
  26. data/bower_components/ember/ember-template-compiler.js +320 -0
  27. data/bower_components/ember/ember.js +44267 -0
  28. data/bower_components/ember/ember.min.js +19 -0
  29. data/bower_components/ember/ember.prod.js +42649 -0
  30. data/bower_components/ember/package.json +11 -0
  31. data/bower_components/handlebars/.bower.json +16 -0
  32. data/bower_components/handlebars/.gitignore +2 -0
  33. data/bower_components/handlebars/README.md +11 -0
  34. data/bower_components/handlebars/bower.json +6 -0
  35. data/bower_components/handlebars/component.json +9 -0
  36. data/bower_components/handlebars/composer.json +35 -0
  37. data/bower_components/handlebars/handlebars-source.gemspec +21 -0
  38. data/bower_components/handlebars/handlebars.amd.js +2719 -0
  39. data/bower_components/handlebars/handlebars.amd.min.js +28 -0
  40. data/bower_components/handlebars/handlebars.js +2746 -0
  41. data/bower_components/handlebars/handlebars.js.nuspec +17 -0
  42. data/bower_components/handlebars/handlebars.min.js +28 -0
  43. data/bower_components/handlebars/handlebars.runtime.amd.js +515 -0
  44. data/bower_components/handlebars/handlebars.runtime.amd.min.js +27 -0
  45. data/bower_components/handlebars/handlebars.runtime.js +530 -0
  46. data/bower_components/handlebars/handlebars.runtime.min.js +27 -0
  47. data/bower_components/handlebars/lib/handlebars/source.rb +11 -0
  48. data/bower_components/jquery/.bower.json +37 -0
  49. data/bower_components/jquery/MIT-LICENSE.txt +21 -0
  50. data/bower_components/jquery/bower.json +27 -0
  51. data/bower_components/jquery/dist/jquery.js +9111 -0
  52. data/bower_components/jquery/dist/jquery.min.js +5 -0
  53. data/bower_components/jquery/dist/jquery.min.map +1 -0
  54. data/bower_components/jquery/src/ajax.js +806 -0
  55. data/bower_components/jquery/src/ajax/jsonp.js +89 -0
  56. data/bower_components/jquery/src/ajax/load.js +75 -0
  57. data/bower_components/jquery/src/ajax/parseJSON.js +13 -0
  58. data/bower_components/jquery/src/ajax/parseXML.js +28 -0
  59. data/bower_components/jquery/src/ajax/script.js +64 -0
  60. data/bower_components/jquery/src/ajax/var/nonce.js +5 -0
  61. data/bower_components/jquery/src/ajax/var/rquery.js +3 -0
  62. data/bower_components/jquery/src/ajax/xhr.js +130 -0
  63. data/bower_components/jquery/src/attributes.js +11 -0
  64. data/bower_components/jquery/src/attributes/attr.js +143 -0
  65. data/bower_components/jquery/src/attributes/classes.js +158 -0
  66. data/bower_components/jquery/src/attributes/prop.js +96 -0
  67. data/bower_components/jquery/src/attributes/support.js +35 -0
  68. data/bower_components/jquery/src/attributes/val.js +153 -0
  69. data/bower_components/jquery/src/callbacks.js +205 -0
  70. data/bower_components/jquery/src/core.js +500 -0
  71. data/bower_components/jquery/src/core/access.js +60 -0
  72. data/bower_components/jquery/src/core/init.js +123 -0
  73. data/bower_components/jquery/src/core/parseHTML.js +39 -0
  74. data/bower_components/jquery/src/core/ready.js +96 -0
  75. data/bower_components/jquery/src/core/var/rsingleTag.js +4 -0
  76. data/bower_components/jquery/src/css.js +455 -0
  77. data/bower_components/jquery/src/css/addGetHookIf.js +24 -0
  78. data/bower_components/jquery/src/css/curCSS.js +57 -0
  79. data/bower_components/jquery/src/css/defaultDisplay.js +69 -0
  80. data/bower_components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  81. data/bower_components/jquery/src/css/support.js +83 -0
  82. data/bower_components/jquery/src/css/swap.js +28 -0
  83. data/bower_components/jquery/src/css/var/cssExpand.js +3 -0
  84. data/bower_components/jquery/src/css/var/getStyles.js +5 -0
  85. data/bower_components/jquery/src/css/var/isHidden.js +13 -0
  86. data/bower_components/jquery/src/css/var/rmargin.js +3 -0
  87. data/bower_components/jquery/src/css/var/rnumnonpx.js +5 -0
  88. data/bower_components/jquery/src/data.js +175 -0
  89. data/bower_components/jquery/src/data/Data.js +181 -0
  90. data/bower_components/jquery/src/data/accepts.js +20 -0
  91. data/bower_components/jquery/src/data/var/data_priv.js +5 -0
  92. data/bower_components/jquery/src/data/var/data_user.js +5 -0
  93. data/bower_components/jquery/src/deferred.js +149 -0
  94. data/bower_components/jquery/src/deprecated.js +13 -0
  95. data/bower_components/jquery/src/dimensions.js +50 -0
  96. data/bower_components/jquery/src/effects.js +642 -0
  97. data/bower_components/jquery/src/effects/Tween.js +114 -0
  98. data/bower_components/jquery/src/effects/animatedSelector.js +13 -0
  99. data/bower_components/jquery/src/event.js +859 -0
  100. data/bower_components/jquery/src/event/alias.js +39 -0
  101. data/bower_components/jquery/src/event/support.js +9 -0
  102. data/bower_components/jquery/src/exports/amd.js +18 -0
  103. data/bower_components/jquery/src/exports/global.js +32 -0
  104. data/bower_components/jquery/src/intro.js +44 -0
  105. data/bower_components/jquery/src/jquery.js +36 -0
  106. data/bower_components/jquery/src/manipulation.js +583 -0
  107. data/bower_components/jquery/src/manipulation/_evalUrl.js +18 -0
  108. data/bower_components/jquery/src/manipulation/support.js +24 -0
  109. data/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -0
  110. data/bower_components/jquery/src/offset.js +204 -0
  111. data/bower_components/jquery/src/outro.js +1 -0
  112. data/bower_components/jquery/src/queue.js +142 -0
  113. data/bower_components/jquery/src/queue/delay.js +22 -0
  114. data/bower_components/jquery/src/selector-native.js +171 -0
  115. data/bower_components/jquery/src/selector-sizzle.js +14 -0
  116. data/bower_components/jquery/src/selector.js +1 -0
  117. data/bower_components/jquery/src/serialize.js +111 -0
  118. data/bower_components/jquery/src/sizzle/dist/sizzle.js +2015 -0
  119. data/bower_components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  120. data/bower_components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  121. data/bower_components/jquery/src/traversing.js +200 -0
  122. data/bower_components/jquery/src/traversing/findFilter.js +100 -0
  123. data/bower_components/jquery/src/traversing/var/rneedsContext.js +6 -0
  124. data/bower_components/jquery/src/var/arr.js +3 -0
  125. data/bower_components/jquery/src/var/class2type.js +4 -0
  126. data/bower_components/jquery/src/var/concat.js +5 -0
  127. data/bower_components/jquery/src/var/hasOwn.js +5 -0
  128. data/bower_components/jquery/src/var/indexOf.js +5 -0
  129. data/bower_components/jquery/src/var/pnum.js +3 -0
  130. data/bower_components/jquery/src/var/push.js +5 -0
  131. data/bower_components/jquery/src/var/rnotwhite.js +3 -0
  132. data/bower_components/jquery/src/var/slice.js +5 -0
  133. data/bower_components/jquery/src/var/strundefined.js +3 -0
  134. data/bower_components/jquery/src/var/support.js +4 -0
  135. data/bower_components/jquery/src/var/toString.js +5 -0
  136. data/bower_components/jquery/src/var/trim.js +3 -0
  137. data/bower_components/jquery/src/wrap.js +78 -0
  138. data/bower_components/lodash/.bower.json +34 -0
  139. data/bower_components/lodash/LICENSE.txt +22 -0
  140. data/bower_components/lodash/bower.json +23 -0
  141. data/bower_components/lodash/dist/lodash.compat.js +7157 -0
  142. data/bower_components/lodash/dist/lodash.compat.min.js +61 -0
  143. data/bower_components/lodash/dist/lodash.js +6785 -0
  144. data/bower_components/lodash/dist/lodash.min.js +56 -0
  145. data/bower_components/lodash/dist/lodash.underscore.js +4979 -0
  146. data/bower_components/lodash/dist/lodash.underscore.min.js +39 -0
  147. data/bower_components/moment/.bower.json +31 -0
  148. data/bower_components/moment/LICENSE +22 -0
  149. data/bower_components/moment/bower.json +20 -0
  150. data/bower_components/moment/lang/ar-ma.js +56 -0
  151. data/bower_components/moment/lang/ar.js +56 -0
  152. data/bower_components/moment/lang/bg.js +86 -0
  153. data/bower_components/moment/lang/br.js +107 -0
  154. data/bower_components/moment/lang/bs.js +139 -0
  155. data/bower_components/moment/lang/ca.js +66 -0
  156. data/bower_components/moment/lang/cs.js +155 -0
  157. data/bower_components/moment/lang/cv.js +59 -0
  158. data/bower_components/moment/lang/cy.js +77 -0
  159. data/bower_components/moment/lang/da.js +56 -0
  160. data/bower_components/moment/lang/de.js +71 -0
  161. data/bower_components/moment/lang/el.js +79 -0
  162. data/bower_components/moment/lang/en-au.js +62 -0
  163. data/bower_components/moment/lang/en-ca.js +59 -0
  164. data/bower_components/moment/lang/en-gb.js +63 -0
  165. data/bower_components/moment/lang/eo.js +65 -0
  166. data/bower_components/moment/lang/es.js +75 -0
  167. data/bower_components/moment/lang/et.js +76 -0
  168. data/bower_components/moment/lang/eu.js +60 -0
  169. data/bower_components/moment/lang/fa.js +97 -0
  170. data/bower_components/moment/lang/fi.js +103 -0
  171. data/bower_components/moment/lang/fo.js +56 -0
  172. data/bower_components/moment/lang/fr-ca.js +54 -0
  173. data/bower_components/moment/lang/fr.js +58 -0
  174. data/bower_components/moment/lang/gl.js +71 -0
  175. data/bower_components/moment/lang/he.js +77 -0
  176. data/bower_components/moment/lang/hi.js +105 -0
  177. data/bower_components/moment/lang/hr.js +140 -0
  178. data/bower_components/moment/lang/hu.js +105 -0
  179. data/bower_components/moment/lang/hy-am.js +113 -0
  180. data/bower_components/moment/lang/id.js +67 -0
  181. data/bower_components/moment/lang/is.js +124 -0
  182. data/bower_components/moment/lang/it.js +59 -0
  183. data/bower_components/moment/lang/ja.js +58 -0
  184. data/bower_components/moment/lang/ka.js +108 -0
  185. data/bower_components/moment/lang/km.js +55 -0
  186. data/bower_components/moment/lang/ko.js +63 -0
  187. data/bower_components/moment/lang/lb.js +160 -0
  188. data/bower_components/moment/lang/lt.js +118 -0
  189. data/bower_components/moment/lang/lv.js +77 -0
  190. data/bower_components/moment/lang/mk.js +86 -0
  191. data/bower_components/moment/lang/ml.js +64 -0
  192. data/bower_components/moment/lang/mr.js +104 -0
  193. data/bower_components/moment/lang/ms-my.js +66 -0
  194. data/bower_components/moment/lang/nb.js +57 -0
  195. data/bower_components/moment/lang/ne.js +105 -0
  196. data/bower_components/moment/lang/nl.js +67 -0
  197. data/bower_components/moment/lang/nn.js +56 -0
  198. data/bower_components/moment/lang/pl.js +98 -0
  199. data/bower_components/moment/lang/pt-br.js +56 -0
  200. data/bower_components/moment/lang/pt.js +60 -0
  201. data/bower_components/moment/lang/ro.js +72 -0
  202. data/bower_components/moment/lang/ru.js +163 -0
  203. data/bower_components/moment/lang/sk.js +156 -0
  204. data/bower_components/moment/lang/sl.js +144 -0
  205. data/bower_components/moment/lang/sq.js +61 -0
  206. data/bower_components/moment/lang/sr-cyr.js +106 -0
  207. data/bower_components/moment/lang/sr.js +106 -0
  208. data/bower_components/moment/lang/sv.js +63 -0
  209. data/bower_components/moment/lang/ta.js +112 -0
  210. data/bower_components/moment/lang/th.js +58 -0
  211. data/bower_components/moment/lang/tl-ph.js +58 -0
  212. data/bower_components/moment/lang/tr.js +93 -0
  213. data/bower_components/moment/lang/tzm-la.js +55 -0
  214. data/bower_components/moment/lang/tzm.js +55 -0
  215. data/bower_components/moment/lang/uk.js +157 -0
  216. data/bower_components/moment/lang/uz.js +55 -0
  217. data/bower_components/moment/lang/vi.js +62 -0
  218. data/bower_components/moment/lang/zh-cn.js +108 -0
  219. data/bower_components/moment/lang/zh-tw.js +84 -0
  220. data/bower_components/moment/min/langs.js +5991 -0
  221. data/bower_components/moment/min/langs.min.js +3 -0
  222. data/bower_components/moment/min/moment-with-langs.js +7993 -0
  223. data/bower_components/moment/min/moment-with-langs.min.js +9 -0
  224. data/bower_components/moment/min/moment.min.js +6 -0
  225. data/bower_components/moment/moment.js +2489 -0
  226. data/bower_components/moment/readme.md +368 -0
  227. data/lib/logster.rb +9 -0
  228. data/lib/logster/logger.rb +31 -0
  229. data/lib/logster/message.rb +42 -0
  230. data/lib/logster/middleware/reporter.rb +13 -0
  231. data/lib/logster/middleware/viewer.rb +122 -0
  232. data/lib/logster/rails/railtie.rb +39 -0
  233. data/lib/logster/redis_store.rb +124 -0
  234. data/lib/logster/version.rb +3 -0
  235. data/logster.gemspec +30 -0
  236. data/test/logster/middleware/test_viewer.rb +34 -0
  237. data/test/logster/test_redis_store.rb +112 -0
  238. data/test/test_helper.rb +6 -0
  239. data/website/Gemfile +6 -0
  240. data/website/config.ru +2 -0
  241. data/website/data/data.json +1 -0
  242. data/website/docker_container/logster.yml +95 -0
  243. data/website/sample.rb +85 -0
  244. data/website/scripts/persist_logs.rb +13 -0
  245. metadata +375 -0
@@ -0,0 +1,18 @@
1
+ define([
2
+ "../ajax"
3
+ ], function( jQuery ) {
4
+
5
+ jQuery._evalUrl = function( url ) {
6
+ return jQuery.ajax({
7
+ url: url,
8
+ type: "GET",
9
+ dataType: "script",
10
+ async: false,
11
+ global: false,
12
+ "throws": true
13
+ });
14
+ };
15
+
16
+ return jQuery._evalUrl;
17
+
18
+ });
@@ -0,0 +1,24 @@
1
+ define([
2
+ "../var/support"
3
+ ], function( support ) {
4
+
5
+ (function() {
6
+ var fragment = document.createDocumentFragment(),
7
+ div = fragment.appendChild( document.createElement( "div" ) );
8
+
9
+ // #11217 - WebKit loses check when the name is after the checked attribute
10
+ div.innerHTML = "<input type='radio' checked='checked' name='t'/>";
11
+
12
+ // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
13
+ // old WebKit doesn't clone checked state correctly in fragments
14
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
15
+
16
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
17
+ // Support: IE9-IE11+
18
+ div.innerHTML = "<textarea>x</textarea>";
19
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
20
+ })();
21
+
22
+ return support;
23
+
24
+ });
@@ -0,0 +1,3 @@
1
+ define(function() {
2
+ return (/^(?:checkbox|radio)$/i);
3
+ });
@@ -0,0 +1,204 @@
1
+ define([
2
+ "./core",
3
+ "./var/strundefined",
4
+ "./core/access",
5
+ "./css/var/rnumnonpx",
6
+ "./css/curCSS",
7
+ "./css/addGetHookIf",
8
+ "./css/support",
9
+
10
+ "./core/init",
11
+ "./css",
12
+ "./selector" // contains
13
+ ], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
14
+
15
+ var docElem = window.document.documentElement;
16
+
17
+ /**
18
+ * Gets a window from an element
19
+ */
20
+ function getWindow( elem ) {
21
+ return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
22
+ }
23
+
24
+ jQuery.offset = {
25
+ setOffset: function( elem, options, i ) {
26
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
27
+ position = jQuery.css( elem, "position" ),
28
+ curElem = jQuery( elem ),
29
+ props = {};
30
+
31
+ // Set position first, in-case top/left are set even on static elem
32
+ if ( position === "static" ) {
33
+ elem.style.position = "relative";
34
+ }
35
+
36
+ curOffset = curElem.offset();
37
+ curCSSTop = jQuery.css( elem, "top" );
38
+ curCSSLeft = jQuery.css( elem, "left" );
39
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
40
+ ( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
41
+
42
+ // Need to be able to calculate position if either top or left is auto and position is either absolute or fixed
43
+ if ( calculatePosition ) {
44
+ curPosition = curElem.position();
45
+ curTop = curPosition.top;
46
+ curLeft = curPosition.left;
47
+
48
+ } else {
49
+ curTop = parseFloat( curCSSTop ) || 0;
50
+ curLeft = parseFloat( curCSSLeft ) || 0;
51
+ }
52
+
53
+ if ( jQuery.isFunction( options ) ) {
54
+ options = options.call( elem, i, curOffset );
55
+ }
56
+
57
+ if ( options.top != null ) {
58
+ props.top = ( options.top - curOffset.top ) + curTop;
59
+ }
60
+ if ( options.left != null ) {
61
+ props.left = ( options.left - curOffset.left ) + curLeft;
62
+ }
63
+
64
+ if ( "using" in options ) {
65
+ options.using.call( elem, props );
66
+
67
+ } else {
68
+ curElem.css( props );
69
+ }
70
+ }
71
+ };
72
+
73
+ jQuery.fn.extend({
74
+ offset: function( options ) {
75
+ if ( arguments.length ) {
76
+ return options === undefined ?
77
+ this :
78
+ this.each(function( i ) {
79
+ jQuery.offset.setOffset( this, options, i );
80
+ });
81
+ }
82
+
83
+ var docElem, win,
84
+ elem = this[ 0 ],
85
+ box = { top: 0, left: 0 },
86
+ doc = elem && elem.ownerDocument;
87
+
88
+ if ( !doc ) {
89
+ return;
90
+ }
91
+
92
+ docElem = doc.documentElement;
93
+
94
+ // Make sure it's not a disconnected DOM node
95
+ if ( !jQuery.contains( docElem, elem ) ) {
96
+ return box;
97
+ }
98
+
99
+ // If we don't have gBCR, just use 0,0 rather than error
100
+ // BlackBerry 5, iOS 3 (original iPhone)
101
+ if ( typeof elem.getBoundingClientRect !== strundefined ) {
102
+ box = elem.getBoundingClientRect();
103
+ }
104
+ win = getWindow( doc );
105
+ return {
106
+ top: box.top + win.pageYOffset - docElem.clientTop,
107
+ left: box.left + win.pageXOffset - docElem.clientLeft
108
+ };
109
+ },
110
+
111
+ position: function() {
112
+ if ( !this[ 0 ] ) {
113
+ return;
114
+ }
115
+
116
+ var offsetParent, offset,
117
+ elem = this[ 0 ],
118
+ parentOffset = { top: 0, left: 0 };
119
+
120
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
121
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
122
+ // We assume that getBoundingClientRect is available when computed position is fixed
123
+ offset = elem.getBoundingClientRect();
124
+
125
+ } else {
126
+ // Get *real* offsetParent
127
+ offsetParent = this.offsetParent();
128
+
129
+ // Get correct offsets
130
+ offset = this.offset();
131
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
132
+ parentOffset = offsetParent.offset();
133
+ }
134
+
135
+ // Add offsetParent borders
136
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
137
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
138
+ }
139
+
140
+ // Subtract parent offsets and element margins
141
+ return {
142
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
143
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
144
+ };
145
+ },
146
+
147
+ offsetParent: function() {
148
+ return this.map(function() {
149
+ var offsetParent = this.offsetParent || docElem;
150
+
151
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
152
+ offsetParent = offsetParent.offsetParent;
153
+ }
154
+
155
+ return offsetParent || docElem;
156
+ });
157
+ }
158
+ });
159
+
160
+ // Create scrollLeft and scrollTop methods
161
+ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
162
+ var top = "pageYOffset" === prop;
163
+
164
+ jQuery.fn[ method ] = function( val ) {
165
+ return access( this, function( elem, method, val ) {
166
+ var win = getWindow( elem );
167
+
168
+ if ( val === undefined ) {
169
+ return win ? win[ prop ] : elem[ method ];
170
+ }
171
+
172
+ if ( win ) {
173
+ win.scrollTo(
174
+ !top ? val : window.pageXOffset,
175
+ top ? val : window.pageYOffset
176
+ );
177
+
178
+ } else {
179
+ elem[ method ] = val;
180
+ }
181
+ }, method, val, arguments.length, null );
182
+ };
183
+ });
184
+
185
+ // Add the top/left cssHooks using jQuery.fn.position
186
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
187
+ // getComputedStyle returns percent when specified for top/left/bottom/right
188
+ // rather than make the css module depend on the offset module, we just check for it here
189
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
190
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
191
+ function( elem, computed ) {
192
+ if ( computed ) {
193
+ computed = curCSS( elem, prop );
194
+ // if curCSS returns percentage, fallback to offset
195
+ return rnumnonpx.test( computed ) ?
196
+ jQuery( elem ).position()[ prop ] + "px" :
197
+ computed;
198
+ }
199
+ }
200
+ );
201
+ });
202
+
203
+ return jQuery;
204
+ });
@@ -0,0 +1,142 @@
1
+ define([
2
+ "./core",
3
+ "./data/var/data_priv",
4
+ "./deferred",
5
+ "./callbacks"
6
+ ], function( jQuery, data_priv ) {
7
+
8
+ jQuery.extend({
9
+ queue: function( elem, type, data ) {
10
+ var queue;
11
+
12
+ if ( elem ) {
13
+ type = ( type || "fx" ) + "queue";
14
+ queue = data_priv.get( elem, type );
15
+
16
+ // Speed up dequeue by getting out quickly if this is just a lookup
17
+ if ( data ) {
18
+ if ( !queue || jQuery.isArray( data ) ) {
19
+ queue = data_priv.access( elem, type, jQuery.makeArray(data) );
20
+ } else {
21
+ queue.push( data );
22
+ }
23
+ }
24
+ return queue || [];
25
+ }
26
+ },
27
+
28
+ dequeue: function( elem, type ) {
29
+ type = type || "fx";
30
+
31
+ var queue = jQuery.queue( elem, type ),
32
+ startLength = queue.length,
33
+ fn = queue.shift(),
34
+ hooks = jQuery._queueHooks( elem, type ),
35
+ next = function() {
36
+ jQuery.dequeue( elem, type );
37
+ };
38
+
39
+ // If the fx queue is dequeued, always remove the progress sentinel
40
+ if ( fn === "inprogress" ) {
41
+ fn = queue.shift();
42
+ startLength--;
43
+ }
44
+
45
+ if ( fn ) {
46
+
47
+ // Add a progress sentinel to prevent the fx queue from being
48
+ // automatically dequeued
49
+ if ( type === "fx" ) {
50
+ queue.unshift( "inprogress" );
51
+ }
52
+
53
+ // clear up the last queue stop function
54
+ delete hooks.stop;
55
+ fn.call( elem, next, hooks );
56
+ }
57
+
58
+ if ( !startLength && hooks ) {
59
+ hooks.empty.fire();
60
+ }
61
+ },
62
+
63
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
64
+ _queueHooks: function( elem, type ) {
65
+ var key = type + "queueHooks";
66
+ return data_priv.get( elem, key ) || data_priv.access( elem, key, {
67
+ empty: jQuery.Callbacks("once memory").add(function() {
68
+ data_priv.remove( elem, [ type + "queue", key ] );
69
+ })
70
+ });
71
+ }
72
+ });
73
+
74
+ jQuery.fn.extend({
75
+ queue: function( type, data ) {
76
+ var setter = 2;
77
+
78
+ if ( typeof type !== "string" ) {
79
+ data = type;
80
+ type = "fx";
81
+ setter--;
82
+ }
83
+
84
+ if ( arguments.length < setter ) {
85
+ return jQuery.queue( this[0], type );
86
+ }
87
+
88
+ return data === undefined ?
89
+ this :
90
+ this.each(function() {
91
+ var queue = jQuery.queue( this, type, data );
92
+
93
+ // ensure a hooks for this queue
94
+ jQuery._queueHooks( this, type );
95
+
96
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
97
+ jQuery.dequeue( this, type );
98
+ }
99
+ });
100
+ },
101
+ dequeue: function( type ) {
102
+ return this.each(function() {
103
+ jQuery.dequeue( this, type );
104
+ });
105
+ },
106
+ clearQueue: function( type ) {
107
+ return this.queue( type || "fx", [] );
108
+ },
109
+ // Get a promise resolved when queues of a certain type
110
+ // are emptied (fx is the type by default)
111
+ promise: function( type, obj ) {
112
+ var tmp,
113
+ count = 1,
114
+ defer = jQuery.Deferred(),
115
+ elements = this,
116
+ i = this.length,
117
+ resolve = function() {
118
+ if ( !( --count ) ) {
119
+ defer.resolveWith( elements, [ elements ] );
120
+ }
121
+ };
122
+
123
+ if ( typeof type !== "string" ) {
124
+ obj = type;
125
+ type = undefined;
126
+ }
127
+ type = type || "fx";
128
+
129
+ while ( i-- ) {
130
+ tmp = data_priv.get( elements[ i ], type + "queueHooks" );
131
+ if ( tmp && tmp.empty ) {
132
+ count++;
133
+ tmp.empty.add( resolve );
134
+ }
135
+ }
136
+ resolve();
137
+ return defer.promise( obj );
138
+ }
139
+ });
140
+
141
+ return jQuery;
142
+ });
@@ -0,0 +1,22 @@
1
+ define([
2
+ "../core",
3
+ "../queue",
4
+ "../effects" // Delay is optional because of this dependency
5
+ ], function( jQuery ) {
6
+
7
+ // Based off of the plugin by Clint Helfers, with permission.
8
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
9
+ jQuery.fn.delay = function( time, type ) {
10
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
11
+ type = type || "fx";
12
+
13
+ return this.queue( type, function( next, hooks ) {
14
+ var timeout = setTimeout( next, time );
15
+ hooks.stop = function() {
16
+ clearTimeout( timeout );
17
+ };
18
+ });
19
+ };
20
+
21
+ return jQuery.fn.delay;
22
+ });
@@ -0,0 +1,171 @@
1
+ define([
2
+ "./core"
3
+ ], function( jQuery ) {
4
+
5
+ /*
6
+ * Optional (non-Sizzle) selector module for custom builds.
7
+ *
8
+ * Note that this DOES NOT SUPPORT many documented jQuery
9
+ * features in exchange for its smaller size:
10
+ *
11
+ * Attribute not equal selector
12
+ * Positional selectors (:first; :eq(n); :odd; etc.)
13
+ * Type selectors (:input; :checkbox; :button; etc.)
14
+ * State-based selectors (:animated; :visible; :hidden; etc.)
15
+ * :has(selector)
16
+ * :not(complex selector)
17
+ * custom selectors via Sizzle extensions
18
+ * Leading combinators (e.g., $collection.find("> *"))
19
+ * Reliable functionality on XML fragments
20
+ * Requiring all parts of a selector to match elements under context
21
+ * (e.g., $div.find("div > *") now matches children of $div)
22
+ * Matching against non-elements
23
+ * Reliable sorting of disconnected nodes
24
+ * querySelectorAll bug fixes (e.g., unreliable :focus on WebKit)
25
+ *
26
+ * If any of these are unacceptable tradeoffs, either use Sizzle or
27
+ * customize this stub for the project's specific needs.
28
+ */
29
+
30
+ var docElem = window.document.documentElement,
31
+ selector_hasDuplicate,
32
+ matches = docElem.webkitMatchesSelector ||
33
+ docElem.mozMatchesSelector ||
34
+ docElem.oMatchesSelector ||
35
+ docElem.msMatchesSelector,
36
+ selector_sortOrder = function( a, b ) {
37
+ // Flag for duplicate removal
38
+ if ( a === b ) {
39
+ selector_hasDuplicate = true;
40
+ return 0;
41
+ }
42
+
43
+ var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
44
+
45
+ if ( compare ) {
46
+ // Disconnected nodes
47
+ if ( compare & 1 ) {
48
+
49
+ // Choose the first element that is related to our document
50
+ if ( a === document || jQuery.contains(document, a) ) {
51
+ return -1;
52
+ }
53
+ if ( b === document || jQuery.contains(document, b) ) {
54
+ return 1;
55
+ }
56
+
57
+ // Maintain original order
58
+ return 0;
59
+ }
60
+
61
+ return compare & 4 ? -1 : 1;
62
+ }
63
+
64
+ // Not directly comparable, sort on existence of method
65
+ return a.compareDocumentPosition ? -1 : 1;
66
+ };
67
+
68
+ jQuery.extend({
69
+ find: function( selector, context, results, seed ) {
70
+ var elem, nodeType,
71
+ i = 0;
72
+
73
+ results = results || [];
74
+ context = context || document;
75
+
76
+ // Same basic safeguard as Sizzle
77
+ if ( !selector || typeof selector !== "string" ) {
78
+ return results;
79
+ }
80
+
81
+ // Early return if context is not an element or document
82
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
83
+ return [];
84
+ }
85
+
86
+ if ( seed ) {
87
+ while ( (elem = seed[i++]) ) {
88
+ if ( jQuery.find.matchesSelector(elem, selector) ) {
89
+ results.push( elem );
90
+ }
91
+ }
92
+ } else {
93
+ jQuery.merge( results, context.querySelectorAll(selector) );
94
+ }
95
+
96
+ return results;
97
+ },
98
+ unique: function( results ) {
99
+ var elem,
100
+ duplicates = [],
101
+ i = 0,
102
+ j = 0;
103
+
104
+ selector_hasDuplicate = false;
105
+ results.sort( selector_sortOrder );
106
+
107
+ if ( selector_hasDuplicate ) {
108
+ while ( (elem = results[i++]) ) {
109
+ if ( elem === results[ i ] ) {
110
+ j = duplicates.push( i );
111
+ }
112
+ }
113
+ while ( j-- ) {
114
+ results.splice( duplicates[ j ], 1 );
115
+ }
116
+ }
117
+
118
+ return results;
119
+ },
120
+ text: function( elem ) {
121
+ var node,
122
+ ret = "",
123
+ i = 0,
124
+ nodeType = elem.nodeType;
125
+
126
+ if ( !nodeType ) {
127
+ // If no nodeType, this is expected to be an array
128
+ while ( (node = elem[i++]) ) {
129
+ // Do not traverse comment nodes
130
+ ret += jQuery.text( node );
131
+ }
132
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
133
+ // Use textContent for elements
134
+ return elem.textContent;
135
+ } else if ( nodeType === 3 || nodeType === 4 ) {
136
+ return elem.nodeValue;
137
+ }
138
+ // Do not include comment or processing instruction nodes
139
+
140
+ return ret;
141
+ },
142
+ contains: function( a, b ) {
143
+ var adown = a.nodeType === 9 ? a.documentElement : a,
144
+ bup = b && b.parentNode;
145
+ return a === bup || !!( bup && bup.nodeType === 1 && adown.contains(bup) );
146
+ },
147
+ isXMLDoc: function( elem ) {
148
+ return (elem.ownerDocument || elem).documentElement.nodeName !== "HTML";
149
+ },
150
+ expr: {
151
+ attrHandle: {},
152
+ match: {
153
+ bool: /^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,
154
+ needsContext: /^[\x20\t\r\n\f]*[>+~]/
155
+ }
156
+ }
157
+ });
158
+
159
+ jQuery.extend( jQuery.find, {
160
+ matches: function( expr, elements ) {
161
+ return jQuery.find( expr, null, null, elements );
162
+ },
163
+ matchesSelector: function( elem, expr ) {
164
+ return matches.call( elem, expr );
165
+ },
166
+ attr: function( elem, name ) {
167
+ return elem.getAttribute( name );
168
+ }
169
+ });
170
+
171
+ });