rave-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erin Noe-Payne <erin.noe.pa...@gmail.com>
Subject Re: Handlebars templates
Date Sat, 02 Mar 2013 05:13:57 GMT
Hey Chris,

We can definitely do something better. Are your templates using Handlebars?
If so any markup on the page at load with the
attribute data-template-for="X" will be handlebars compiled and loaded onto
rave.ui.templates[x]. We could also add a register method on the namespace
although I'm not sure that would save you any code really.


On Fri, Mar 1, 2013 at 8:24 PM, Chris Geer <chris@cxtsoftware.com> wrote:

> Erin,
>
> I upgraded our system to 0.21-SNAPSHOT and ran into a small problem with
> the handlebar templates. We provide our own open-view popup definitions be
> including them as part of the custom_js.tag file. The challenge we ran into
> was that the code to generate the element for that popup now requires a
> handlebar template definition to be loaded into the rave.ui.templates
> array. The current code only loads templates from the
> client_side_templates.tag file. I was able to put similar methods in my
> custom files to then modify that array but I think there is probably a
> better way to do it. What do you think about adding some public methods to
> the rave.ui namespace to register handlebar templates?
>
> Chris
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message