riojs 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/public/javascripts/components/lightbox.js +12 -9
- data/public/javascripts/components/popup.js +1 -1
- data/public/javascripts/lib/console/docs/files.html +1 -1
- data/public/javascripts/lib/console/docs/index.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/Object.html +49 -1
- data/public/javascripts/lib/console/docs/symbols/_global_.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Application.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Attr.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Binding.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Component.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Cookie.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.DelayedTask#initialize.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.DelayedTask.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.JsTemplate.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Juggernaut.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Model.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Page.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.Utils.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/rio.html +1 -1
- data/public/javascripts/lib/console/docs/symbols/src/public_javascripts_lib_protohack.js.html +10 -6
- data/public/javascripts/lib/protohack.js +4 -0
- data/public/javascripts/lib/spec.js +4 -0
- data/public/javascripts/specs/lib/spec_spec.js +14 -0
- data/public/stylesheets/components/textarea.css +1 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
@@ -119,17 +119,20 @@ rio.components.Lightbox = rio.Component.create(rio.components.Overlay, "Lightbox
|
|
119
119
|
|
120
120
|
// Example of creating your own functionality once lightbox is initiated
|
121
121
|
deactivate: function($super, skipFade){
|
122
|
-
|
123
|
-
Element.
|
122
|
+
try {
|
123
|
+
if (Element.isRendered(this._contentHtml)) {
|
124
|
+
Element.remove(this._contentHtml);
|
125
|
+
}
|
126
|
+
|
127
|
+
$super(skipFade);
|
128
|
+
Element.hide(this.outerHtml());
|
129
|
+
Event.stopObserving(window, "resize", this._resize);
|
130
|
+
Event.stopObserving(this.lightboxHtml(), 'click', this._markLightboxEvent);
|
131
|
+
Event.stopObserving(this.outerHtml(), 'click', this._outerLigthboxClick);
|
132
|
+
} finally {
|
133
|
+
if (rio.components.Lightbox.currentLightbox == this) { rio.components.Lightbox.currentLightbox = null; }
|
124
134
|
}
|
125
135
|
|
126
|
-
$super(skipFade);
|
127
|
-
Element.hide(this.outerHtml());
|
128
|
-
Event.stopObserving(window, "resize", this._resize);
|
129
|
-
Event.stopObserving(this.lightboxHtml(), 'click', this._markLightboxEvent);
|
130
|
-
Event.stopObserving(this.outerHtml(), 'click', this._outerLigthboxClick);
|
131
|
-
if (rio.components.Lightbox.currentLightbox == this) { rio.components.Lightbox.currentLightbox = null; }
|
132
|
-
|
133
136
|
this.fire("deactivate");
|
134
137
|
},
|
135
138
|
|
@@ -597,7 +597,7 @@ ul.inheritsList
|
|
597
597
|
</div>
|
598
598
|
<div class="fineprint" style="clear:both">
|
599
599
|
|
600
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.0.2 on
|
600
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
601
601
|
</div>
|
602
602
|
</body>
|
603
603
|
</html>
|
@@ -317,7 +317,7 @@ ul.inheritsList
|
|
317
317
|
</div>
|
318
318
|
<div class="fineprint" style="clear:both">
|
319
319
|
|
320
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.0.2 on
|
320
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
321
321
|
</div>
|
322
322
|
</body>
|
323
323
|
</html>
|
@@ -219,6 +219,15 @@ ul.inheritsList
|
|
219
219
|
</td>
|
220
220
|
</tr>
|
221
221
|
|
222
|
+
<tr>
|
223
|
+
<td class="attributes"><static> </td>
|
224
|
+
<td class="nameDescription">
|
225
|
+
<div class="fixedFont">Object.<b><a href="../symbols/Object.html#.isDate">isDate</a></b>(testObject)
|
226
|
+
</div>
|
227
|
+
<div class="description"></div>
|
228
|
+
</td>
|
229
|
+
</tr>
|
230
|
+
|
222
231
|
</tbody>
|
223
232
|
</table>
|
224
233
|
|
@@ -275,6 +284,45 @@ ul.inheritsList
|
|
275
284
|
|
276
285
|
|
277
286
|
|
287
|
+
<hr />
|
288
|
+
|
289
|
+
<a name=".isDate"> </a>
|
290
|
+
<div class="fixedFont"><static>
|
291
|
+
|
292
|
+
|
293
|
+
<span class="light">Object.</span><b>isDate</b>(testObject)
|
294
|
+
|
295
|
+
</div>
|
296
|
+
<div class="description">
|
297
|
+
|
298
|
+
|
299
|
+
<br />
|
300
|
+
<i>Defined in: </i> <a href="../symbols/src/public_javascripts_lib_protohack.js.html">protohack.js</a>.
|
301
|
+
|
302
|
+
|
303
|
+
</div>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
<dl class="detailList">
|
309
|
+
<dt class="heading">Parameters:</dt>
|
310
|
+
|
311
|
+
<dt>
|
312
|
+
<b>testObject</b>
|
313
|
+
|
314
|
+
</dt>
|
315
|
+
<dd></dd>
|
316
|
+
|
317
|
+
</dl>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
278
326
|
|
279
327
|
|
280
328
|
|
@@ -285,7 +333,7 @@ ul.inheritsList
|
|
285
333
|
<!-- ============================== footer ================================= -->
|
286
334
|
<div class="fineprint" style="clear:both">
|
287
335
|
|
288
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
336
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:19 GMT-0500 (CDT)
|
289
337
|
</div>
|
290
338
|
</body>
|
291
339
|
</html>
|
@@ -407,7 +407,7 @@ ul.inheritsList
|
|
407
407
|
<!-- ============================== footer ================================= -->
|
408
408
|
<div class="fineprint" style="clear:both">
|
409
409
|
|
410
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
410
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:19 GMT-0500 (CDT)
|
411
411
|
</div>
|
412
412
|
</body>
|
413
413
|
</html>
|
@@ -960,7 +960,7 @@ ul.inheritsList
|
|
960
960
|
<!-- ============================== footer ================================= -->
|
961
961
|
<div class="fineprint" style="clear:both">
|
962
962
|
|
963
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
963
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
964
964
|
</div>
|
965
965
|
</body>
|
966
966
|
</html>
|
@@ -1069,7 +1069,7 @@ ul.inheritsList
|
|
1069
1069
|
<!-- ============================== footer ================================= -->
|
1070
1070
|
<div class="fineprint" style="clear:both">
|
1071
1071
|
|
1072
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
1072
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
1073
1073
|
</div>
|
1074
1074
|
</body>
|
1075
1075
|
</html>
|
@@ -266,7 +266,7 @@ ul.inheritsList
|
|
266
266
|
<!-- ============================== footer ================================= -->
|
267
267
|
<div class="fineprint" style="clear:both">
|
268
268
|
|
269
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
269
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
270
270
|
</div>
|
271
271
|
</body>
|
272
272
|
</html>
|
@@ -413,7 +413,7 @@ ul.inheritsList
|
|
413
413
|
<!-- ============================== footer ================================= -->
|
414
414
|
<div class="fineprint" style="clear:both">
|
415
415
|
|
416
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
416
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
417
417
|
</div>
|
418
418
|
</body>
|
419
419
|
</html>
|
@@ -537,7 +537,7 @@ ul.inheritsList
|
|
537
537
|
<!-- ============================== footer ================================= -->
|
538
538
|
<div class="fineprint" style="clear:both">
|
539
539
|
|
540
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
540
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
541
541
|
</div>
|
542
542
|
</body>
|
543
543
|
</html>
|
@@ -264,7 +264,7 @@ ul.inheritsList
|
|
264
264
|
<!-- ============================== footer ================================= -->
|
265
265
|
<div class="fineprint" style="clear:both">
|
266
266
|
|
267
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
267
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
268
268
|
</div>
|
269
269
|
</body>
|
270
270
|
</html>
|
@@ -385,7 +385,7 @@ ul.inheritsList
|
|
385
385
|
<!-- ============================== footer ================================= -->
|
386
386
|
<div class="fineprint" style="clear:both">
|
387
387
|
|
388
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
388
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
389
389
|
</div>
|
390
390
|
</body>
|
391
391
|
</html>
|
@@ -265,7 +265,7 @@ ul.inheritsList
|
|
265
265
|
<!-- ============================== footer ================================= -->
|
266
266
|
<div class="fineprint" style="clear:both">
|
267
267
|
|
268
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
268
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
269
269
|
</div>
|
270
270
|
</body>
|
271
271
|
</html>
|
@@ -323,7 +323,7 @@ ul.inheritsList
|
|
323
323
|
<!-- ============================== footer ================================= -->
|
324
324
|
<div class="fineprint" style="clear:both">
|
325
325
|
|
326
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
326
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
327
327
|
</div>
|
328
328
|
</body>
|
329
329
|
</html>
|
@@ -816,7 +816,7 @@ ul.inheritsList
|
|
816
816
|
<!-- ============================== footer ================================= -->
|
817
817
|
<div class="fineprint" style="clear:both">
|
818
818
|
|
819
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
819
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
820
820
|
</div>
|
821
821
|
</body>
|
822
822
|
</html>
|
@@ -377,7 +377,7 @@ ul.inheritsList
|
|
377
377
|
<!-- ============================== footer ================================= -->
|
378
378
|
<div class="fineprint" style="clear:both">
|
379
379
|
|
380
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
380
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
381
381
|
</div>
|
382
382
|
</body>
|
383
383
|
</html>
|
@@ -611,7 +611,7 @@ ul.inheritsList
|
|
611
611
|
<!-- ============================== footer ================================= -->
|
612
612
|
<div class="fineprint" style="clear:both">
|
613
613
|
|
614
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
614
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
615
615
|
</div>
|
616
616
|
</body>
|
617
617
|
</html>
|
@@ -500,7 +500,7 @@ iiii jjjj
|
|
500
500
|
<!-- ============================== footer ================================= -->
|
501
501
|
<div class="fineprint" style="clear:both">
|
502
502
|
|
503
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on
|
503
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Tue May 18 2010 10:52:20 GMT-0500 (CDT)
|
504
504
|
</div>
|
505
505
|
</body>
|
506
506
|
</html>
|
data/public/javascripts/lib/console/docs/symbols/src/public_javascripts_lib_protohack.js.html
CHANGED
@@ -316,10 +316,14 @@
|
|
316
316
|
<span class='line'>309</span> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">testObject</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">(</span><span class="NAME">testObject.propertyIsEnumerable</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">testObject.propertyIsEnumerable</span><span class="PUNC">(</span><span class="STRN">'length'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">testObject</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">testObject.length</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">(</span><span class="NAME">testObject.tagName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"SELECT"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
317
317
|
<span class='line'>310</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
318
318
|
<span class='line'>311</span>
|
319
|
-
<span class='line'>312</span> </span><span class="NAME">
|
320
|
-
<span class='line'>313</span>
|
321
|
-
<span class='line'>314</span> </span><span class="
|
319
|
+
<span class='line'>312</span> </span><span class="NAME">Object.isDate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">testObject</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
320
|
+
<span class='line'>313</span> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">testObject</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">testObject.getTimezoneOffset</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="PUNC">;</span><span class="WHIT">
|
321
|
+
<span class='line'>314</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
322
322
|
<span class='line'>315</span>
|
323
|
-
<span class='line'>316</span>
|
324
|
-
<span class='line'>317</span>
|
325
|
-
<span class='line'>318</span> </span
|
323
|
+
<span class='line'>316</span> </span><span class="NAME">Prototype.Browser.IE6</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Prototype.Browser.IE</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent.substring</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent.indexOf</span><span class="PUNC">(</span><span class="STRN">"MSIE"</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NUMB">5</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">==</span><span class="NUMB">6</span><span class="PUNC">;</span><span class="WHIT">
|
324
|
+
<span class='line'>317</span> </span><span class="NAME">Prototype.Browser.IE7</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Prototype.Browser.IE</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent.substring</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent.indexOf</span><span class="PUNC">(</span><span class="STRN">"MSIE"</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NUMB">5</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">==</span><span class="NUMB">7</span><span class="PUNC">;</span><span class="WHIT">
|
325
|
+
<span class='line'>318</span> </span><span class="NAME">Prototype.Browser.IE8</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Prototype.Browser.IE</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent.substring</span><span class="PUNC">(</span><span class="NAME">navigator.userAgent.indexOf</span><span class="PUNC">(</span><span class="STRN">"MSIE"</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="NUMB">5</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">)</span><span class="PUNC">==</span><span class="NUMB">8</span><span class="PUNC">;</span><span class="WHIT">
|
326
|
+
<span class='line'>319</span>
|
327
|
+
<span class='line'>320</span>
|
328
|
+
<span class='line'>321</span>
|
329
|
+
<span class='line'>322</span> </span></pre></body></html>
|
@@ -309,6 +309,10 @@ Object.isArray = function(testObject) {
|
|
309
309
|
return testObject && !(testObject.propertyIsEnumerable != undefined && testObject.propertyIsEnumerable('length')) && typeof testObject === 'object' && typeof testObject.length === 'number' && !(testObject.tagName == "SELECT");
|
310
310
|
};
|
311
311
|
|
312
|
+
Object.isDate = function(testObject) {
|
313
|
+
return testObject != undefined && testObject.getTimezoneOffset != undefined;
|
314
|
+
};
|
315
|
+
|
312
316
|
Prototype.Browser.IE6 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5), 10)==6;
|
313
317
|
Prototype.Browser.IE7 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5), 10)==7;
|
314
318
|
Prototype.Browser.IE8 = Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5), 10)==8;
|
@@ -473,6 +473,10 @@ Object.extend(Date.prototype, {
|
|
473
473
|
|
474
474
|
shouldBeBetween: function(val, val2) {
|
475
475
|
this.should(this > val && this < val2, "expected " + this + " to be between " + val + " and " + val2);
|
476
|
+
},
|
477
|
+
|
478
|
+
shouldBeWithinOneSecondOfNow: function(val, val2) {
|
479
|
+
this.shouldBeBetween(new Date(new Date().getTime() - 1000), new Date(new Date().getTime() + 1000))
|
476
480
|
}
|
477
481
|
});
|
478
482
|
|
@@ -245,6 +245,20 @@ describe(rio.Spec, {
|
|
245
245
|
failed = true;
|
246
246
|
}
|
247
247
|
failed.shouldBeTrue();
|
248
|
+
},
|
249
|
+
|
250
|
+
"shouldBeWithinOneSecondOfNow to Date": function() {
|
251
|
+
new Date(new Date().getTime() - 500).shouldBeWithinOneSecondOfNow();
|
252
|
+
new Date(new Date().getTime() + 500).shouldBeWithinOneSecondOfNow();
|
253
|
+
|
254
|
+
var failed;
|
255
|
+
try {
|
256
|
+
new Date(new Date().getTime() - 1500).shouldBeWithinOneSecondOfNow();
|
257
|
+
new Date(new Date().getTime() + 1500).shouldBeWithinOneSecondOfNow();
|
258
|
+
} catch(e) {
|
259
|
+
failed = true;
|
260
|
+
}
|
261
|
+
failed.shouldBeTrue();
|
248
262
|
}
|
249
263
|
},
|
250
264
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riojs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Tillery
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-
|
13
|
+
date: 2010-05-18 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|