Sha256: f8cca25bab9edbd769f010fe677a5f94d7273ff2d632c035cce4096e5cecd8f1
Contents?: true
Size: 1.21 KB
Versions: 14
Compression:
Stored size: 1.21 KB
Contents
pageflow.externalLinks.SitesView = Backbone.Marionette.ItemView.extend({ className: 'manage_external_sites', template: 'pageflow/external_links/editor/templates/sites', events: { 'click .add': function() { var site = pageflow.externalLinks.sites.create({title: ''}); var options = this.options; site.once('sync', function() { var query = options.page ? '/?page=' + options.page.id + '&return_to=sites' : ''; pageflow.editor.navigate('external_links/sites/' + site.id + query, {trigger: true}); }); } }, onRender: function() { pageflow.externalLinks.sites.ensureFetched(); this.$el.append(this.subview(new pageflow.CollectionView({ tagName: 'ul', className: 'external_sites', collection: pageflow.externalLinks.sites, itemViewConstructor: pageflow.externalLinks.SiteItemView, itemViewOptions: { navigatable: true, selectionHandler: this.options.selectionHandler, referer: this.options.referer, page: this.options.page }, blankSlateViewConstructor: Backbone.Marionette.ItemView.extend({ template: 'pageflow/external_links/editor/templates/sites_blank_slate' }) })).el); } });
Version data entries
14 entries across 14 versions & 1 rubygems