src/js/widgets.js
author hamidouk
Fri, 21 Oct 2011 14:06:29 +0200
branchpopcorn-port
changeset 114 eda061f1aa75
parent 98 ed4ac18baf07
child 122 04bd1e2f9674
permissions -rw-r--r--
added a .selector object to all the widgets.

/* the widget classes and definitions */

IriSP.Widget = function(Popcorn, config, Serializer) {

  if (config === undefined || config === null) {
    config = {}
  }
  
  this._Popcorn = Popcorn;
  this._config = config;  
  this._serializer = Serializer;
  
  if (config.hasOwnProperty("divId")) {
     this._id = config.divId;
     this.selector = IriSP.jQuery("#" + this._id);
  }  
};

IriSP.Widget.prototype.draw = function() {
  /* implemented by "sub-classes" */  
};

IriSP.Widget.prototype.redraw = function() {
  /* implemented by "sub-classes" */  
};