blob: b2853909bde5d95ac58e49ef1ed17773c2d12f08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* Material Experience - Special Case Layout Engine
*
* EYEMG - Interactive Media Group
* Created by Mike Crute (mcrute@eyemg.com)
* Updated by Mike Crute (mcrute@eyemg.com) on 9/26/07
*/
Card.Layout.Special = Class.create();
Object.extend(Object.extend(Card.Layout.Special.prototype, Card.Layout.prototype),
{
/*
* Initialize the layout class
*/
initialize: function(cframe, data, card)
{
this.cframe = cframe;
this.data = data;
this.card = card;
this.color = this.card.options.color;
this.hasResources = false;
// Check if the url is provided otherwise pull it out of the
// wide content field.
if (!this.data.url)
{
this.data.url = this.data.contentWide[0].url;
}
},
/*
* Main function to layout the card.
*/
layout: function()
{
this.cframe.innerHTML = '<iframe ' +
'src = "' + this.data.url + '" ' +
'frameborder = "0" ' +
'width = "' + (SME.sizes.card.width - 11) + '" ' +
'height = "' + (SME.sizes.card.height - 40) + '"' +
'></iframe>';
}
});
|