David Greenspan
9005cf34a0
more events decl changes
2012-08-23 12:23:07 -07:00
David Greenspan
2255c61383
more events({... changes
2012-08-23 12:17:53 -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
1ca5357b28
new event map syntax
2012-08-22 19:41:06 -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
David Greenspan
8d2971a373
fix some IE 7 spark test failures
2012-08-20 17:23:27 -04:00
Geoff Schmidt
fc85b3a243
scale d3 canvas correctly
2012-08-15 21:43:33 -07:00
Geoff Schmidt
7c89eb8eca
make d3 demo wider
2012-08-15 20:55:13 -07:00
Geoff Schmidt
0241f84b56
clean up the demo
2012-08-15 20:42:50 -07:00
Geoff Schmidt
5d8038cae1
kill excessive comments (moved into asana)
2012-08-15 19:06:13 -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
0a198d839d
fix landmark demo for new api
2012-08-12 11:44:03 -07:00
Geoff Schmidt
efaa885a7b
use click events rather than hit testing
2012-08-10 20:17:37 -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
bc8aadff7c
demo: disable remove button when no selection
2012-08-10 03:38:06 -07:00
Geoff Schmidt
eff18190b0
Add a d3 demo :)
2012-08-10 03:28:09 -07:00
Geoff Schmidt
be3790ca5e
todo comments
2012-08-09 21:09:01 -07:00
Geoff Schmidt
b7a29d5f8f
slight cleanup in landmark-demo
2012-08-09 20:58:25 -07:00
David Greenspan
effc8cb42a
event callback gets "template" obj
2012-08-09 19:21:58 -07:00
Geoff Schmidt
fe1e65cd9d
implement landmark-demo reset button
...
(doesn't work yet, no API behind it)
2012-08-09 18:59:34 -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