715 Commits

Author SHA1 Message Date
David Greenspan
43e2562967 depend on Sizzle, not jQuery 2012-08-30 13:26:04 -07:00
David Greenspan
4664e0f506 Don't leak deps from template callbacks (fix #306) 2012-08-30 11:42:46 -07:00
Tom Coleman
2b7557472d Fixed problem with LocalCollection._deepcopy destroying dates.
In the browser, `deepcopy` seemed to be successfully cloning dates, but server-side this was not the case. Commit b21da0f274 introduced a `deepcopy` to the process of pulling data out of mongo, so this is needed. Fixes #295
2012-08-29 21:26:39 -07:00
Nick Martin
6f8f08714b Merge branch 'devel' into spark 2012-08-27 13:48:45 -07:00
David Greenspan
9005cf34a0 more events decl changes 2012-08-23 12:23:07 -07:00
David Greenspan
99c0bfc548 Wrap all templates in labelBranch with name
This allows multiple helpers with different names to be called from a Template helper with no landmark ambiguity.
2012-08-23 11:58:14 -07:00
David Greenspan
0ddc169a9c fix race condition on list cleanup 2012-08-22 18:40:47 -07:00
David Greenspan
379f608043 begin updating examples for new API 2012-08-22 18:14:15 -07:00
David Greenspan
9fe768989f past-tense created/rendered/destroyed
Consensus is that "render" is too confusing a name for what's obviously a callback (after the template is rendered).  We prefer past tense rather than oncreate, onrender, ondestroy.
2012-08-22 16:58:48 -07:00
David Greenspan
c149a10735 Spark.UNIQUE_LABEL, no matching in bare each 2012-08-22 16:21:52 -07:00
David Greenspan
b379b03f70 all Handlebars helpers drop branch labels 2012-08-22 15:44:51 -07:00
David Greenspan
0efe0e26d3 Spark.labelBranch safe on non-element-balanced HTML 2012-08-22 15:15:41 -07:00
David Greenspan
a995e364bf Fix preserve bug causing landmark not to match
Landmarks nested inside a DOM node in a re-rendered range weren't
being preserved, because the selector was being run on the old
DOM and new DOM with the context node from the old DOM.  Fix is to
only use the preservation root 'context' option for the case where
the landmark is above the re-rendered region.
2012-08-22 15:02:31 -07:00
David Greenspan
4794ebc447 minor test changes 2012-08-22 14:30:09 -07:00
David Greenspan
2283e3e76f fix removeEventListener args (FF test failure) 2012-08-22 12:11:55 -07:00
David Greenspan
e3c3fc6674 minor comment tweak 2012-08-22 11:19:27 -07:00
David Greenspan
32239218c9 fix IE7 spurious 'change' in copyAttributes not spark 2012-08-21 03:11:39 -04:00
David Greenspan
7eb81ebffb fix template_tests for IE 7 2012-08-21 02:42:00 -04:00
David Greenspan
a326aa367f minor comment tweaks 2012-08-21 02:22:53 -04:00
David Greenspan
f70aa390bb spark_tests pass in IE 7 2012-08-21 02:22:30 -04:00
Avital Oliver
005413b3dc Fix #212: Wrap code that calls subscription onStop in Meteor environment, including a fiber 2012-08-20 16:06:32 -07:00
Avital Oliver
c499f7c9da Fixes #126 -- minimingo fails on dotted queries if undefined is seen 2012-08-20 15:37:16 -07:00
David Greenspan
8d2971a373 fix some IE 7 spark test failures 2012-08-20 17:23:27 -04:00
Nick Martin
f7afc0b5f3 Test hash fragments also. 2012-08-16 21:52:14 -07:00
Nick Martin
1df6b74ada Feedback from review. 2012-08-16 21:16:31 -07:00
Nick Martin
b3ada2cf4f Document absolute-url package. 2012-08-15 23:28:51 -07:00
Nick Martin
e9956ee8e8 Integrate force-ssl and absolute-url. Now when you add force-ssl, secure defaults to true in absolute-url. 2012-08-15 23:28:51 -07:00
Nick Martin
f18b58763b Initial absolute-url package. 2012-08-15 23:28:51 -07:00
Tom Coleman
b21da0f274 deep-copy Mongo docs in server-side observer() (closes #276)
On the client, users are free to scribble on docs they get from Mongo,
since the docs are guaranteed to be copies.  Scribbling on docs on the
server won't affect the database, but it can cause problems like
crashing LiveResultSet.  So always deep-copy on the server.
2012-08-14 19:41:24 -07:00
David Greenspan
4301dffc5f template.data clarification 2012-08-14 11:28:42 -07:00
David Greenspan
01c7afea5f Merge branch 'master' into spark
Include 0.3.9 changes in spark branch (which my have public followers)
2012-08-13 14:55:31 -07:00
David Greenspan
81912496f6 test landmark.hasDom() 2012-08-13 14:22:11 -07:00
David Greenspan
7f8bda2737 Don't past-tense create/render/destroy
I'd prefer "rendered" but create/destroy are too nice as is
2012-08-13 14:18:09 -07:00
David Greenspan
c9a80490fc Spark.list: moved,removed call rendered() 2012-08-13 14:08:33 -07:00
David Greenspan
a17b2e4bf2 test that all list mods trigger render() (fails) 2012-08-13 12:41:20 -07:00
David Greenspan
bfa08c964e test that lists are cleaned up if not materialized 2012-08-13 12:40:54 -07:00
David Greenspan
2ddf2b1f83 preserve/events/helpers tests (and fixes) 2012-08-13 10:45:04 -07:00
David Greenspan
ded6c4901b implement Template.foo.{preserve,events,helpers}() (needs tests) 2012-08-13 10:02:43 -07:00
David Greenspan
fec60a5ea9 Unify template obj and template callback this.
The `template` arg in `eventHandler(event, template)` and the `this`
in all three of {create,render,destroy} are now an object with
methods `find`,`findAll` assigned at creation time (closures) and
properties `firstNode`, `lastNode`, and `data` (the handlebars data)
set upon each callback.  No other props are set and the app is free
to scribble on this object.

Only subtlety is that we can't support find/findAll/firstNode/lastNode
in create/destroy callback.  In this case, find/findAll throw an error
and firstNode/lastNode are reliably null.

Added landmark.hasDom().
2012-08-10 16:37:47 -07:00
David Greenspan
1ceca3eaef template render takes template obj; tests 2012-08-10 12:53:14 -07:00
David Greenspan
00e2788edb test #isolate 2012-08-10 12:05:37 -07:00
Geoff Schmidt
be3790ca5e todo comments 2012-08-09 21:09:01 -07:00
David Greenspan
effc8cb42a event callback gets "template" obj 2012-08-09 19:21:58 -07:00
Geoff Schmidt
3e75ed625a comment changes 2012-08-09 18:59:34 -07:00
David Greenspan
2242419ff6 bubbling landmark test 2012-08-09 18:32:11 -07:00
Geoff Schmidt
d696b9a611 New Spark.list implementation, all tests pass 2012-08-09 17:48:50 -07:00
David Greenspan
cad497de08 matching in list test (fails) 2012-08-09 15:46:56 -07:00
David Greenspan
900695b68c move rangeToHtml into DomUtils 2012-08-09 15:37:00 -07:00
David Greenspan
f35c6c1405 finish branch labels test 2012-08-09 14:49:56 -07:00
David Greenspan
aebbd14c40 fix "labeled landmarks" test 2012-08-09 13:40:49 -07:00