src/js/widgets.js
author hamidouk
Fri, 21 Oct 2011 17:26:44 +0200
branchpopcorn-port
changeset 122 04bd1e2f9674
parent 114 eda061f1aa75
child 124 2758dfb208b2
permissions -rw-r--r--
change to an internal structure.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
66
13013b9452af Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff changeset
     1
/* the widget classes and definitions */
13013b9452af Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff changeset
     2
74
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
     3
IriSP.Widget = function(Popcorn, config, Serializer) {
114
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
     4
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
     5
  if (config === undefined || config === null) {
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
     6
    config = {}
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
     7
  }
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
     8
  
74
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
     9
  this._Popcorn = Popcorn;
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
    10
  this._config = config;  
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
    11
  this._serializer = Serializer;
114
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
    12
  
122
04bd1e2f9674 change to an internal structure.
hamidouk
parents: 114
diff changeset
    13
  if (config.hasOwnProperty("gui") && config.gui.hasOwnProperty("container")) {
04bd1e2f9674 change to an internal structure.
hamidouk
parents: 114
diff changeset
    14
     this._id = config.gui.container;
114
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
    15
     this.selector = IriSP.jQuery("#" + this._id);
eda061f1aa75 added a .selector object to all the widgets.
hamidouk
parents: 98
diff changeset
    16
  }  
66
13013b9452af Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff changeset
    17
};
13013b9452af Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff changeset
    18
13013b9452af Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff changeset
    19
IriSP.Widget.prototype.draw = function() {
13013b9452af Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff changeset
    20
  /* implemented by "sub-classes" */  
13013b9452af Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff changeset
    21
};
74
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
    22
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
    23
IriSP.Widget.prototype.redraw = function() {
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
    24
  /* implemented by "sub-classes" */  
d7a7d7216371 lots of changes to the player widget...
hamidouk
parents: 66
diff changeset
    25
};