Commit 30ffbe916d66f42ec31f64688a037bce37c04b95
- Diff rendering mode:
- inline
- side by side
mouchak/static/js/models.js
(19 / 12)
  | |||
11 | 11 | }); | |
12 | 12 | ||
13 | 13 | var Text = BaseType.extend({ | |
14 | defaults: { | ||
14 | defaults: _.extend(BaseType.prototype.defaults, { | ||
15 | 15 | data: "", | |
16 | }, | ||
16 | }), | ||
17 | 17 | initialize: function() { | |
18 | BaseType.prototype.initialize.call(this, arguments); | ||
18 | 19 | } | |
19 | 20 | }); | |
20 | 21 | ||
21 | 22 | var Table = BaseType.extend({ | |
22 | defaults: { | ||
23 | defaults: _.extend(BaseType.prototype.defaults, { | ||
23 | 24 | data : { | |
24 | 25 | th: [], | |
25 | 26 | tr:[] | |
26 | 27 | } | |
27 | }, | ||
28 | }), | ||
28 | 29 | initialize: function() { | |
30 | BaseType.prototype.initialize.call(this, arguments); | ||
29 | 31 | } | |
30 | 32 | }); | |
31 | 33 | ||
32 | 34 | var Image = BaseType.extend({ | |
33 | defaults: { | ||
35 | defaults: _.extend(BaseType.prototype.defaults, { | ||
34 | 36 | src: "" | |
35 | }, | ||
37 | }), | ||
36 | 38 | initialize:function() { | |
39 | BaseType.prototype.initialize.call(this, arguments); | ||
37 | 40 | } | |
38 | 41 | }); | |
39 | 42 | ||
40 | 43 | var Video = BaseType.extend({ | |
41 | defaults: { | ||
44 | defaults: _.extend(BaseType.prototype.defaults, { | ||
42 | 45 | src: "" | |
43 | }, | ||
46 | }), | ||
44 | 47 | initialize:function() { | |
48 | BaseType.prototype.initialize.call(this, arguments); | ||
45 | 49 | } | |
46 | 50 | }); | |
47 | 51 | ||
48 | 52 | var RSS = BaseType.extend({ | |
49 | defaults: { | ||
53 | defaults: _.extend(BaseType.prototype.defaults, { | ||
50 | 54 | src: "" | |
51 | }, | ||
55 | }), | ||
52 | 56 | initialize:function() { | |
57 | BaseType.prototype.initialize.call(this, arguments); | ||
53 | 58 | } | |
54 | 59 | }); | |
55 | 60 | ||
… | … | ||
63 | 63 | // Also the website can be styled by using external CSS files, | |
64 | 64 | // which can also be loaded via this plugin model. | |
65 | 65 | var Plugin = BaseType.extend({ | |
66 | defaults: { | ||
66 | defaults: _.extend(BaseType.prototype.defaults, { | ||
67 | 67 | src: "", | |
68 | 68 | data: {}, | |
69 | 69 | callback: "" | |
70 | }, | ||
70 | }), | ||
71 | 71 | initialize: function() { | |
72 | BaseType.prototype.initialize.call(this, arguments); | ||
73 | |||
72 | 74 | if(this.get('src').match(/\.js/)) { | |
73 | 75 | var script = document.createElement('script'); | |
74 | 76 | var callback = this.get('callback'); |