define(['jquery', 'backbone', 'underscore', 'views/fileView', 'views/modal/modalView'], function($, Backbone, _, fileView, modalView) { // Renders a single package item return Backbone.View.extend({ tagName: 'li', events: { 'click .load': 'load', 'click .delete': 'delete', 'click .show': 'show' }, modal: null, initialize: function() { this.model.on('change', this.render, this); this.model.on('remove', this.unrender, this); }, render: function() { this.$el.html('Package ' + this.model.get('pid') + ': ' + this.model.get('name')); this.$el.append($(' Load')); this.$el.append($(' Delete')); this.$el.append($(' Show')); if (this.model.isLoaded()) { var ul = $('