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
David Greenspan
9d3161f3fb
Handlebars: allow getters/helpers in args, fix hashes
2012-07-11 14:41:12 -07:00
David Greenspan
2e2ea18522
handlebars: set this appropriately when calling methods
2012-06-18 18:34:01 -07:00
David Greenspan
ce6c48144b
handlebars: don't consider helpers in {{this.foo}}
2012-06-18 14:30:11 -07:00
David Greenspan
210d7e5b4b
LiveRange fix; _rangeToHtml; more tests
2012-06-18 13:30:45 -07:00
David Greenspan
021cca9ca3
Handlebars: allow dots on helpers, methods, and undefineds
2012-06-16 14:46:45 -07:00
David Greenspan
0dec81f85b
support Handlebars.SafeString ( #160 )
2012-06-04 21:22:04 -07:00
David Greenspan
59cb217a56
address Nick's code review
2012-05-25 16:08:52 -07:00
David Greenspan
06b1be4052
add test for whitespace around '='
2012-05-25 16:08:48 -07:00
David Greenspan
9ce0a6d572
scanner unit tests
2012-05-25 16:08:41 -07:00
David Greenspan
a3b86b1c5e
semicolon
2012-05-25 16:07:14 -07:00
David Greenspan
7aacb4e5e8
better error messages
2012-05-25 16:07:14 -07:00
David Greenspan
561496ba64
first cut of new HTML scanner
2012-05-25 16:07:14 -07:00
David Greenspan
0172f9870a
use chunks for block-helper event_data; unit tests; fix event-less chunks
2012-05-16 12:37:53 -07:00
David Greenspan
234827ba44
fix intermittent bad handlebars context
2012-04-26 15:22:12 -07:00
David Greenspan
ee3d306adc
templates changes with Geoff (a couple fixes, a couple reverts, comments)
2012-04-03 22:30:54 -07:00
David Greenspan
89ce396ae5
Overhaul liveui & templating to support "smart patch" and rendering HTML (rebase-2)
2012-04-03 22:10:20 -07:00
Nick Martin
0187ee6db4
Temporary hack to allow templates as HTML.
2012-03-16 15:00:34 -07:00