diff --git a/packages/ui/components.js b/packages/ui/components.js index 6b72c2b704..9025f631f6 100644 --- a/packages/ui/components.js +++ b/packages/ui/components.js @@ -62,3 +62,10 @@ UI.Unless = Component.extend({ buf.write(condition ? self.elseContent : self.content); } }); + +UI.With = Component.extend({ + kind: 'With', + render: function (buf) { + buf.write(this.content); + } +}); \ No newline at end of file diff --git a/packages/ui/fields.js b/packages/ui/fields.js index 4090378dd7..dbeaef8ee4 100644 --- a/packages/ui/fields.js +++ b/packages/ui/fields.js @@ -1,6 +1,8 @@ var global = (function () { return this; })(); +// XXXXXXXX take out the "look up the tree" logic for Stage I + _extend(UI.Component, { // _dontCall is for internal use only. // @@ -26,7 +28,7 @@ _extend(UI.Component, { } else if (id === 'unless') { result = UI.Unless; } else if (id === 'with') { - result = Component; + result = UI.With; } else if (/^[A-Z]/.test(id) && (id in global)) { // Only look for a global identifier if `id` is // capitalized. This avoids have `{{name}}` mean