1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 10:42:41 +01:00
phorge-phorge/webroot/rsrc/js/javelin/ext/view/ViewRenderer.js
Jakub Vrana 1ee7bbe305 Move Javelin to webroot
Summary:
This is a major pain on Windows and the main reason why Phabricator doesn't work there and is hard to fix.
The sad part is that Windows support symlinks (via `MKLINK`) but Git on Windows doesn't use them.

Test Plan: Loaded Phabricator on Windows without JS errors.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5458
2013-03-28 05:18:57 +00:00

19 lines
362 B
JavaScript

/**
* @provides javelin-view-renderer
* @requires javelin-install
*/
JX.install('ViewRenderer', {
members: {
visit: function(view, children) {
return view.render(children);
}
},
statics: {
render: function(view) {
var renderer = new JX.ViewRenderer();
return view.accept(JX.bind(renderer, renderer.visit));
}
}
});