(function(app) {
  'use strict';

  var jCore = require('jcore');
  var helper = app.helper || require('../helper.js');

  var ModulePort = helper.inherits(function(props) {
    ModulePort.super_.call(this);

    this.label = this.prop(props.label);
    this.name = this.prop(props.name);
    this.type = this.prop(props.type);
    this.socketDisabled = this.prop(props.socketDisabled);
    this.plugDisabled = this.prop(props.plugDisabled);
    this.visible = this.prop(false);
    this.element = this.prop(null);
  }, jCore.Component);

  if (typeof module !== 'undefined' && module.exports)
    module.exports = ModulePort;
  else
    app.ModulePort = ModulePort;
})(this.app || (this.app = {}));

(function(app) {
  'use strict';

  var jCore = require('jcore');
  var helper = app.helper || require('../helper.js');
  var dom = app.dom || require('../dom.js');

  var ModulePort = helper.inherits(function(props) {
    ModulePort.super_.call(this);

    this.label = this.prop(props.label);
    this.name = this.prop(props.name);
    this.type = this.prop(props.type);
    this.socketDisabled = this.prop(props.socketDisabled);
    this.plugDisabled = this.prop(props.plugDisabled);
    this.visible = this.prop(false);
    this.element = this.prop(null);
  }, jCore.Component);

  ModulePort.prototype.renderListItem = function() {
    var element = dom.el('<div>');

    dom.addClass(element, 'module-port');
    dom.addClass(element, 'module-port-' + this.type());

    var texts = [];

    if (!this.socketDisabled())
      texts.push('<div class="module-port-socket"></div>');

    if (!this.plugDisabled())
      texts.push('<div class="module-port-plug"></div>');

    texts.push('<div class="module-port-label">' + this.label() + '</div>');
    texts.push('<img class="module-port-hide-button" src="images/minus-square-o.svg">');

    dom.html(element, texts.join(''));

    return element;
  };

  if (typeof module !== 'undefined' && module.exports)
    module.exports = ModulePort;
  else
    app.ModulePort = ModulePort;
})(this.app || (this.app = {}));

Add method to construct a list element of module port
Add method to construct a list element of module port
