100 Commits

Author SHA1 Message Date
Emily Stark
357d35d19a Add tests for issue #770 2013-03-22 15:09:35 -07:00
David Glasser
5a5204e3a4 Remove closures around package files. (hint: git blame -w)
The bundler now adds closures around client files and the server adds closures
around server files.
2013-03-19 15:13:53 -07:00
Avital Oliver
5a0a4f5ab0 npm dependencies at bundle time
- package.js now has a top-level 'Npm.depends' directive
- both bundle-time and server run-time code can get access
  to any dependent npm module with 'Npm.require'
2013-03-19 15:11:04 -07:00
Avital Oliver
5352db933a Implement a useNpm directive for packages 2013-03-19 15:11:03 -07:00
Avital Oliver
58c6f55676 Apply changes made on engine repo 2013-03-19 15:11:01 -07:00
Chris Mather
e0a90fa24f Merge branch 'devel-#801-fixed' of git://github.com/raix/meteor into raix-815 2013-03-14 17:20:53 -07:00
Morten Henriksen
0ead1fbf41 Fixed reactive each
Mentioned by Chris Mather on google talk
2013-03-14 14:32:06 +01:00
Morten Henriksen
30643c5008 Added som tests for fix #801 2013-03-14 14:03:39 +01:00
Nick Martin
abe3ee9cbe Merge remote-tracking branch 'origin/deps-radical' into devel 2013-03-12 10:39:03 -07:00
James Gill
bf0b8f961f Now accept multiple event handlers.
Also including tests.
With this, you can define two events off of, say,
'click #myButton', and both will be triggered by a
click event.
2013-03-11 17:38:13 -07:00
James Gill
5eaf672c15 Adding (failing) tests for multiple event handlers. 2013-03-11 15:27:34 -07:00
David Greenspan
f6aabffab3 port all packages to new Deps (tests pass) 2013-02-25 17:52:51 -08:00
David Greenspan
8a5db13f90 regression test for #724 2013-02-22 14:04:33 -08:00
David Glasser
62bcab56d1 Merge branch 'devel' into ddp-pre1 2013-02-07 10:47:06 -08:00
Nick Martin
38c5795c71 Review from Geoff 2013-02-06 19:39:31 -08:00
Nick Martin
68049c276d Move tests from handlebars to templating, as they depend on templates. Also, extend to test a few more types. 2013-02-06 19:39:31 -08:00
Naomi Seyfer
d92628020f Refactor Spark to use observeChanges instead of observe
It uses an orderedDict instead of an array, and also this new version happens to
not do a ton of splices, which might help with performance in cases for really
large numbers of items.  Anyway, introduced a dependency on LocalCollection;
will break that soon.
2013-02-04 14:42:45 -08:00
Tom Wijsman
8f83b2c32e Made sure all file system related statements use proper path.join and path.sep to support other platforms. 2012-10-30 15:53:49 -07:00
David Greenspan
4e15995e4f Fix for Handlebars helper functions returning null
Now you can do {{foo.bar}} if foo() returns null,
and get nothing (silent failure) just like you do
if foo is a non-existent property or function.
2012-09-27 14:31:21 -07:00
David Greenspan
10fdc9b261 Unit test for fix to #323 2012-09-16 01:09:36 -07:00
David Greenspan
43a356a0be Fall back to UNIQUE_LABEL on {{#each cursor}} (#281) 2012-09-10 11:59:18 -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
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
7eb81ebffb fix template_tests for IE 7 2012-08-21 02:42:00 -04:00
David Greenspan
4301dffc5f template.data clarification 2012-08-14 11:28:42 -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
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
David Greenspan
effc8cb42a event callback gets "template" obj 2012-08-09 19:21:58 -07:00
David Greenspan
cad497de08 matching in list test (fails) 2012-08-09 15:46:56 -07:00
David Greenspan
f35c6c1405 finish branch labels test 2012-08-09 14:49:56 -07:00
David Greenspan
a44b9205a0 fix Handlebars branch labels 2012-08-08 17:12:34 -07:00
Geoff Schmidt
f766cf29fc First pass of template-level API extensions
Untested, but a demo is in the works
2012-08-08 17:05:56 -07:00
David Greenspan
14b8f526fb createLandmark calls htmlFunc (fixing tests wip) 2012-08-07 22:30:58 -07:00
Geoff Schmidt
8273c2727b fix 'templating' tests
(hadn't been running due to a typo)
2012-08-05 02:34:01 -07:00
Geoff Schmidt
4e43f59c74 make labelBranch take a function, not a string 2012-08-04 23:21:40 -07:00
Geoff Schmidt
1483cc3b51 completely remove liveui. all tests pass. 2012-08-03 23:30:15 -07:00
Geoff Schmidt
c6ec5b1673 leaderboard and todos run on spark!! rough cut. 2012-08-03 12:53:03 -07:00
David Greenspan
328a2af833 create DomUtils package 2012-07-27 14:27:34 -07:00
David Greenspan
7ad1f5eff3 tests exploring branch keys; ReactiveVar helper; start of 'constant' helper 2012-07-18 10:16:09 -07:00
David Greenspan
41bfedafe2 comments 2012-07-17 15:14:54 -07:00
David Greenspan
9a5bde6e0e branch labeling on partial invocation and #each (completely untested) 2012-07-17 13:46:29 -07:00
David Greenspan
cd3ca61ec3 ignore extra block helper args as intended 2012-07-11 20:50:36 -07:00