promotion.js 579 B

123456789101112131415161718192021
  1. define( [ 'models/promotionModel' ], function( PromotionModel ) {
  2. var view = Marionette.View.extend( {
  3. model: null,
  4. template: '#tmpl-nf-promotion',
  5. className: 'nf-promotion',
  6. /*
  7. * Display a single promotion - chosen at random.
  8. */
  9. initialize: function() {
  10. var promotion = nfPromotions[Math.floor(Math.random()*nfPromotions.length)];
  11. this.model = new PromotionModel( promotion );
  12. // this.listenTo( nfRadio.channel( 'dashboard' ), 'did:something', this.something );
  13. }
  14. } );
  15. return view;
  16. } );