PDA

View Full Version : Help - Portals - Add a google widget



Moreno
8 Apr 2008, 2:04 AM
Hello,

I have a little problem, i want to use the sample "Portals" to do an interface like igoogle. I insert the script code for the widget in the panels and it doesn't do anything :(
To do that in the file "examples.js" i replaced :

Ext.example.shortBogusMarkup = '<p>text';

by

Ext.example.shortBogusMarkup = '<script src="http://gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/datetime.xml&up_color=blue&up_firstDay=1&synd=open&w=320&h=136&title=heure&lang=fr&country=ALL&border=http%3A%2F%2Fgmodules.com%2Fig%2Fimages%2F&output=js"></script>'

It seems "<script>" doesn't work but if i use others html tags it's fine... If anyone have an idea I will be pleased.

Have a good day,

Moreno

ps : the sampls.js code is :

Ext.onReady(function(){

Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

// create some portlet tools using built in Ext tool ids
var tools = [{
id:'gear',
handler: function(){
Ext.Msg.alert('Message', 'The Settings tool was clicked.');
}
},{
id:'close',
handler: function(e, target, panel){
panel.ownerCt.remove(panel, true);
}
}];

var viewport = new Ext.Viewport({
layout:'border',
items:[{
region:'west',
id:'west-panel',
title:'West',
split:true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'35 0 5 5',
cmargins:'35 5 5 5',
layout:'accordion',
layoutConfig:{
animate:true
},
items: [{
html: Ext.example.shortBogusMarkup,
title:'Navigation',
autoScroll:true,
border:false,
iconCls:'nav'
},{
title:'Settings',
html: Ext.example.shortBogusMarkup,
border:false,
autoScroll:true,
iconCls:'settings'
}]
},{
xtype:'portal',
region:'center',
margins:'35 5 5 0',
items:[{
columnWidth:.25,
style:'padding:10px 0 10px 10px',
items:[{
title: 'Grid in a Portlet',
layout:'fit',
tools: tools,
items: new SampleGrid([0, 2, 4])
},{
title: 'Another Panel 1',
tools: tools,
html: Ext.example.shortBogusMarkup
}]
},{
columnWidth:.25,
style:'padding:10px 0 10px 10px',
items:[{
title: 'Panel 2',
tools: tools,
html: Ext.example.shortBogusMarkup
},{
title: 'Another Panel 2',
tools: tools,
html: Ext.example.shortBogusMarkup
}]
},{
columnWidth:.25,
style:'padding:10px',
items:[{
title: 'Panel 3',
tools: tools,
html: Ext.example.shortBogusMarkup
},{
title: 'Test',
tools: tools,
html: Ext.example.shortBogusMarkup
}]
},{
columnWidth:.25,
style:'padding:10px',
items:[{
title: 'Panel 3',
tools: tools,
html: Ext.example.shortBogusMarkup
},{
title: 'Another Panel 3',
tools: tools,
html: Ext.example.shortBogusMarkup
}]

},{
columnWidth:.25,
style:'padding:10px',
items:[{
title: 'Test1',
tools: tools,
html: Ext.example.shortBogusMarkup
},{
title: 'Test2',
tools: tools,
html: Ext.example.shortBogusMarkup
},{
title: 'Test3',
tools: tools,
html: Ext.example.shortBogusMarkup
}]

}]
}]
});
});

igocancun
29 Dec 2008, 2:32 AM
Hi, I ran into this problem today and I found this post. I wouldn't want to create a new Thread if the question is already in the forum. The thing is the same but I'll structure it correctly :)


{
title: 'Google Graph',
tools: tools,
html: '<script>WidgetURL</script>'
}

How do I achieve that? Script tags are ignored and I need to call the widget that way if. Any ideas or pointers?

Thanks in advance,
igo

jaguarg
4 Apr 2009, 8:14 AM
any joy with this? I am trying to do the same thing...