src/js/widgets.js
branchpopcorn-port
changeset 114 eda061f1aa75
parent 98 ed4ac18baf07
child 122 04bd1e2f9674
equal deleted inserted replaced
113:ebfd0d17e427 114:eda061f1aa75
     1 /* the widget classes and definitions */
     1 /* the widget classes and definitions */
     2 
     2 
     3 IriSP.Widget = function(Popcorn, config, Serializer) {
     3 IriSP.Widget = function(Popcorn, config, Serializer) {
       
     4 
       
     5   if (config === undefined || config === null) {
       
     6     config = {}
       
     7   }
       
     8   
     4   this._Popcorn = Popcorn;
     9   this._Popcorn = Popcorn;
     5   this._config = config;  
    10   this._config = config;  
     6   this._serializer = Serializer;
    11   this._serializer = Serializer;
       
    12   
       
    13   if (config.hasOwnProperty("divId")) {
       
    14      this._id = config.divId;
       
    15      this.selector = IriSP.jQuery("#" + this._id);
       
    16   }  
     7 };
    17 };
     8 
    18 
     9 IriSP.Widget.prototype.draw = function() {
    19 IriSP.Widget.prototype.draw = function() {
    10   /* implemented by "sub-classes" */  
    20   /* implemented by "sub-classes" */  
    11 };
    21 };
    12 
    22 
    13 IriSP.Widget.prototype.redraw = function() {
    23 IriSP.Widget.prototype.redraw = function() {
    14   /* implemented by "sub-classes" */  
    24   /* implemented by "sub-classes" */  
    15 };
    25 };
    16 
       
    17 IriSP.PlayerWidget = function(Popcorn, config, Serializer) {
       
    18   IriSP.Widget.call(this, Popcorn, config, Serializer);
       
    19   
       
    20 };