Sha256: 7242a74a0fb7bab3bfda4436105aac10984717bc6b53891e3f3d310170b4d887
Contents?: true
Size: 1.19 KB
Versions: 10
Compression:
Stored size: 1.19 KB
Contents
pageflow.externalLinks.SiteSelectionView = Backbone.Marionette.ItemView.extend({ className: 'external_site_selection dialog', template: 'pageflow/external_links/editor/templates/site_selection', mixins: [pageflow.dialogView], ui: { items: 'ul' }, onRender: function() { var view = this; pageflow.externalLinks.sites.ensureFetched(); this.subview(new pageflow.CollectionView({ el: this.ui.items, collection: pageflow.externalLinks.sites, itemViewConstructor: pageflow.externalLinks.SiteItemView, itemViewOptions: { selectionHandler: function() { view.options.onSelect(this); view.close(); } }, blankSlateViewConstructor: Backbone.Marionette.ItemView.extend({ template: 'pageflow/external_links/editor/templates/sites_blank_slate' }) })); } }); pageflow.externalLinks.SiteSelectionView.selectSite = function() { return $.Deferred(function(deferred) { var view = new pageflow.externalLinks.SiteSelectionView({ onSelect: deferred.resolve }); view.on('close', function() { deferred.reject(); }); pageflow.app.dialogRegion.show(view.render()); }).promise(); };
Version data entries
10 entries across 10 versions & 1 rubygems