$ -> _.templateSettings = { interpolate: /\<\&\=(.+?)\&\>/g, evaluate: /\<\&(.+?)\&\>/g } loaded_manifest = null loaded_local_manifest = null $.ajaxSetup({async: false}) $.getJSON('/manifest.json', null, (data) => loaded_manifest = new Manifest(data) ) $.getJSON('/local_manifest.json', null, (data) => loaded_local_manifest = new LocalManifest(data) ) $.ajaxSetup({async: true}) Manifest.set_manifest(loaded_manifest) LocalManifest.set_manifest(loaded_local_manifest) loaded_manifest.init() loaded_local_manifest.init() class FilerButton extends Backbone.View events: { "click .btn":"on_open" } initialize: -> on_open: () -> @render() render: () -> class ArtistCollection extends Backbone.Collection model: Pettanr.Artist url: '/artists' cc = new ArtistCollection({}) cc.fetch({}) list_result = null author = new Pettanr.Author({id: author_id}) author.fetch({}) artist = new Pettanr.Artist({id: artist_id}) artist.fetch({}) operators = new Pettanr.Operator([author, artist]) v = new Locmare.Filer({ item_name: 'artist', collection: cc, list_result: list_result, pager_type: 'default', operators: operators }) a=v.render() b=a.el c=v.header.render() d=c.el $("#pettanr").html(v.render().el)