| author | hamidouk |
| Wed, 26 Oct 2011 11:32:01 +0200 | |
| branch | popcorn-port |
| changeset 146 | b99527037c89 |
| parent 124 | 2758dfb208b2 |
| child 170 | 5150ae56e0a6 |
| permissions | -rw-r--r-- |
|
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 | 3 |
IriSP.Widget = function(Popcorn, config, Serializer) { |
| 114 | 4 |
|
5 |
if (config === undefined || config === null) { |
|
6 |
config = {} |
|
7 |
} |
|
8 |
|
|
| 74 | 9 |
this._Popcorn = Popcorn; |
10 |
this._config = config; |
|
11 |
this._serializer = Serializer; |
|
| 114 | 12 |
|
|
124
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
13 |
if (config.hasOwnProperty("container")) { |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
14 |
this._id = config.container; |
| 114 | 15 |
this.selector = IriSP.jQuery("#" + this._id); |
|
124
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
16 |
} |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
17 |
|
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
18 |
if (config.hasOwnProperty("width")) { |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
19 |
// this.width and not this._width because we consider it public. |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
20 |
this.width = config.width; |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
21 |
} |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
22 |
|
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
23 |
if (config.hasOwnProperty("height")) { |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
24 |
// this.width and not this._width because we consider it public. |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
25 |
this.height = config.height; |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
26 |
} |
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
27 |
|
|
2758dfb208b2
changed widget.js to add some properties to the widget. Widgets now only get the
hamidouk
parents:
122
diff
changeset
|
28 |
|
|
66
13013b9452af
Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff
changeset
|
29 |
}; |
|
13013b9452af
Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff
changeset
|
30 |
|
|
13013b9452af
Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff
changeset
|
31 |
IriSP.Widget.prototype.draw = function() { |
|
13013b9452af
Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff
changeset
|
32 |
/* implemented by "sub-classes" */ |
|
13013b9452af
Added a new file to the build, widgets.js, to contain widget classes.
hamidouk
parents:
diff
changeset
|
33 |
}; |
| 74 | 34 |
|
35 |
IriSP.Widget.prototype.redraw = function() { |
|
36 |
/* implemented by "sub-classes" */ |
|
37 |
}; |