Sha256: ff78f3a0376b6f14e7007bd13f8f51be5b44688e1fc2d2498da5aac19ba6fda9
Contents?: true
Size: 632 Bytes
Versions: 19
Compression:
Stored size: 632 Bytes
Contents
Luca.components.Template = Luca.View.extend initialize: (@options={})-> Luca.View::initialize.apply @, arguments throw "Templates must specify which template / markup to use" unless @template or @markup if _.isString(@templateContainer) @templateContainer = eval("(window || global).#{ @templateContainer }") templateContainer: "Luca.templates" beforeRender: ()-> @templateContainer = JST if _.isUndefined( @templateContainer) @$el.html(@markup || @templateContainer[ @template ](@options) ) render: ()-> $(@container).append( @$el ) Luca.register "template", "Luca.components.Template"
Version data entries
19 entries across 19 versions & 1 rubygems