Commit Graph

7911 Commits

Author SHA1 Message Date
David Greenspan
1dbe352aa3 Start commenting Blaze.View 2014-07-08 14:01:32 -07:00
David Greenspan
379dcab8f2 Move Blaze._addEventMap to end of view.js 2014-07-08 13:16:02 -07:00
David Greenspan
fe1cd72a8e Document UI.remove
Also tweak the warning about non-jQuery removals
2014-07-08 13:13:05 -07:00
David Greenspan
8afc41f0ef Remove mentions of “Component” from docs
“instantiated component” -> “rendered template”
2014-07-08 12:18:13 -07:00
David Greenspan
5f5623a05d Fix showdown package (and docs) release/blaze-refactor-rc2 2014-07-07 16:23:14 -07:00
David Greenspan
db36619408 Fix line endings in showdown.js
The DOS line endings were messing up Chrome dev tools
2014-07-07 15:57:01 -07:00
David Greenspan
d8c36e4605 Moar tests (and focus/blur shenanigans) 2014-07-07 12:24:06 -07:00
David Greenspan
072ef0a23d Test focus and blur event cleanup 2014-07-07 11:56:11 -07:00
David Greenspan
1a20166053 test UI.remove 2014-07-07 11:30:26 -07:00
David Greenspan
d52b5813ee Remove unused “jsclass” package 2014-07-04 10:04:03 -07:00
David Greenspan
4c8223c6f4 Reduce helper re-running when #with changes case
Yay.  Some interesting Deps thinking here too.
2014-07-03 16:53:13 -07:00
David Greenspan
1a8136e4ef Test autorun cleanup and jQuery removal 2014-07-03 14:46:06 -07:00
David Greenspan
beed9644f9 Re-enable test of UI.dynamic error messages
Add Blaze._throwNextException
2014-07-03 13:19:32 -07:00
David Greenspan
babc38ced0 Add DOMRange#destroy and UI.remove 2014-07-02 21:13:26 -07:00
David Greenspan
9237396478 Comment out failing test 2014-07-02 21:12:29 -07:00
David Greenspan
34d30f52ce Catch exceptions thrown from template helpers 2014-07-02 21:12:29 -07:00
David Greenspan
ff0a819ace Indentation 2014-07-02 21:12:29 -07:00
David Greenspan
d023201742 Move event map code to View
Clean up events when view is destroyed, not just on DOMRange detach (which seems like it wouldn’t necessarily be called when tearing down nested elements and ranges because it isn’t called recursively).
2014-07-02 21:12:23 -07:00
David Greenspan
b475572638 Correctly unbind focus and blur events
With jQuery, you can’t do `$elem.on(‘focus’, ‘.selector’, handler)` and then `$elem.off(‘focus’, handler)`.  The correct code is `$elem.off(‘focus’, ‘**’, handler)`, in order to remove the handler without having to specify the selector.

The reason is that `on` with a selector actually listens to focusin/focusout, not focus/blur, and then `off` tries to remove focus/blur.
2014-07-02 20:39:49 -07:00
David Greenspan
e92d718eff Restore UI.body release/blaze-refactor-rc1 2014-07-02 19:26:12 -07:00
David Greenspan
e27e398e63 Fix a memory leak
All the teardown callbacks would stack up on the parent element.  No longer.
release/blaze-refactor-rc0
2014-07-01 16:19:53 -07:00
David Greenspan
88447c91af Shave 10 seconds off test runs with DevTools open
Chrome’s “async stack traces” feature makes addEventListener a little slower.  DOMBackend’s teardown listeners were causing unnecessary calls to addEventListener in jQuery.  Tell jQuery not to do that.
2014-07-01 13:59:41 -07:00
David Greenspan
dfbbde4aa7 Merge branch 'devel' into blaze-refactor
Conflicts:
	packages/webapp/webapp_server.js
2014-07-01 13:29:04 -07:00
David Greenspan
e31127251b Create builtins.js (again)
Remove dead _mayContainViews
2014-07-01 12:42:33 -07:00
David Greenspan
4a6f8ed936 Remove TODO comment 2014-07-01 12:39:47 -07:00
David Greenspan
43c4ec922c Fire destroyed callbacks sooner
You ought to be able to access the DOM from the destroyed callback now (even without this change), but I haven’t really tried it or looked into it.
2014-07-01 12:39:31 -07:00
David Greenspan
f2c925d8c1 Kill DOMAugmenter in favor of onAttachedDetached 2014-07-01 12:36:30 -07:00
David Greenspan
2cc3db0fe0 Remove blank lines 2014-07-01 12:32:00 -07:00
David Greenspan
aa3f67a62d Remove dead code 2014-07-01 12:03:45 -07:00
David Greenspan
28281f98b5 Merge branch 'blaze-views' into blaze-refactor 2014-07-01 11:11:28 -07:00
David Greenspan
511e5ed64a Fix remaining tests (less and stylus) 2014-07-01 11:01:55 -07:00
David Greenspan
734816c7d7 Cleaner codegen of attribute values 2014-07-01 10:57:46 -07:00
David Greenspan
f93a570d27 Fix compile_tests 2014-07-01 10:34:26 -07:00
David Greenspan
026216c389 Fix scanner_tests 2014-07-01 10:29:07 -07:00
David Greenspan
284529992e Fix UI.contentBlock data context 2014-07-01 10:25:48 -07:00
David Greenspan
8c8887da7c Fix rest of the render tests 2014-07-01 10:20:06 -07:00
David Greenspan
e4ca96af57 Fix “stop” reactivity
Destroy members of a DOMRange immediately on invalidation of the last render, not waiting for re-run.  Provide DOMRange#destroyMembers.

Don’t call view.autorun from view.render() in builtins, and enforce it.

Remove dead code “onstop” from DOMRange.
2014-07-01 10:18:56 -07:00
David Greenspan
3d12c6dbfa Fix a bunch of tests 2014-06-30 20:28:02 -07:00
Avital Oliver
217313f04a Fix UI.getElementData 2014-06-30 20:27:42 -07:00
Avital Oliver
bae3b16ebc Fix UI.render/UI.renderWithData/UI.insert 2014-06-30 20:22:24 -07:00
Avital Oliver
1ba01a4b19 Remove dead code 2014-06-30 20:16:26 -07:00
Avital Oliver
b21d87d142 Merge branch 'blaze-refactor' into blaze-views
Conflicts:
	packages/spacebars-tests/template_tests.html
	packages/spacebars-tests/template_tests.js
	packages/ui/package.js
	packages/ui/ui.js
2014-06-30 20:14:58 -07:00
Avital Oliver
31a6cec54b Port UI._parentData 2014-06-30 20:01:25 -07:00
Avital Oliver
ab21aa2e7c re-implement UI._templateInstance() 2014-06-30 19:50:32 -07:00
David Greenspan
ecefa13e85 Assign view.domrange later 2014-06-30 19:50:23 -07:00
David Greenspan
7d7f1cafcb Implement template lifecycle callbacks 2014-06-30 19:38:59 -07:00
Avital Oliver
2d361b219f also mv global_template_object.js templating.js in package.js 2014-06-30 19:35:07 -07:00
Avital Oliver
8f8957ce85 mv global_template_object.js templating.js 2014-06-30 19:22:14 -07:00
David Greenspan
925d8b3c77 Fix more tests (Blaze.toHTML) 2014-06-30 19:19:45 -07:00
Avital Oliver
7aeb7b5cd4 fix template instances in event handler arguments 2014-06-30 19:16:52 -07:00