Sha256: a4b8d2ed39858e8dc33e10b5ded020c703cc1d5007ccdd178cb83fd4e3130e70

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

function MusicList(element) {
  this.element = element;
}

MusicList.prototype.render = function(rawq) {
  var media_list = rawq.storage.get("media_list");
  for (var i = 0; i < media_list.length; i++) {
    var media = rawq.storage.get("media_" + media_list[i]);
    var item_element = $(rawq.view.render("music_list_item.ejs", {media_id: media_list[i], media: media}));
    item_element.click(function() {
      rawq.handle_media_click.call(rawq, $(this).attr("id"));
    });
    this.element.append(item_element);
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rawq-0.1.0 lib/rawq/templates/public/javascript/music_list.js