Commit Graph

690 Commits

Author SHA1 Message Date
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
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
David Greenspan
b7e122ef40 remove leftover console.logs 2012-08-09 13:27:17 -07:00
David Greenspan
64bc13ef5b fix package.js for spark tests 2012-08-09 12:43:15 -07:00
Geoff Schmidt
1cd8e1bef6 add temporary debugging code 2012-08-08 19:20:41 -07:00
Geoff Schmidt
05444bbce5 landmark render callbacks bubble up 2012-08-08 18:55:43 -07:00
David Greenspan
42356f7171 patcher_tests -> patch_tests 2012-08-08 17:36:07 -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
7ba39d96cb destroy unmaterialized landmarks
move materialize() into Renderer and have it include clean-up.

creating a duplicate landmark in the same branch is considered an
immediate error, without waiting to see if the annotation is
materialized.
2012-08-08 16:08:12 -07:00
David Greenspan
7411ae058f remove leftover console.logs 2012-08-08 15:20:55 -07:00
Geoff Schmidt
212b4b940e finish test for find/findAll on landmarks 2012-08-08 15:04:48 -07:00
David Greenspan
88d13f1862 constant landmark only gets render() if not preserved 2012-08-08 14:39:14 -07:00
David Greenspan
f3a66b59f2 fix region patching 2012-08-08 14:37:25 -07:00
David Greenspan
4ab40534fe fix tests (whew) 2012-08-08 10:55:28 -07:00
David Greenspan
14b8f526fb createLandmark calls htmlFunc (fixing tests wip) 2012-08-07 22:30:58 -07:00
David Greenspan
de53ca9205 more XXX TODOs 2012-08-07 19:40:48 -07:00
David Greenspan
14704f8468 naming: state->landmark, landmark->landmarkRange 2012-08-07 16:59:23 -07:00
David Greenspan
a9dac1f0aa refactor to make LabelStack 2012-08-07 16:36:57 -07:00
Geoff Schmidt
6b8a775f83 Spark.Landmark w/find. tests are WIP 2012-08-07 06:27:53 -07:00
David Greenspan
5e8b033f61 camel-case Liverange 2012-08-06 18:38:43 -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
4760a5fbfa asymptotically better way to deliver rendered
callback to landmarks. tests pass (updated for new event order)
2012-08-05 02:25:53 -07:00
Geoff Schmidt
a2e9358eec implement getCurrentLandmark (at render time!)
also getEnclosingLandmark
with tests, which pass
2012-08-05 01:47:12 -07:00
Geoff Schmidt
9c389453b6 create/match landmarks before materialize!
tests pass (after reordering expected output)
2012-08-05 00:24:55 -07:00
Geoff Schmidt
92a2391b6c move more state onto Spark._Renderer 2012-08-04 23:27:32 -07:00
Geoff Schmidt
4e43f59c74 make labelBranch take a function, not a string 2012-08-04 23:21:40 -07:00