PDA

View Full Version : Problems rendering in google chorme and safari



alexmd
24 Aug 2010, 1:07 AM
Hi,

I have an application with a viewport, with a tabpanel and help area... well the problem is that in google chrome and safari seems that it doesn't make ajax requests or sth like that. I've atached two screens where you can see when it renders in FF and IE , and screen 2 when it renders in chrome or safari ... the code is it... seems like tries to render the information before it's available ... but i have no idea where the problem is... i repeat that in firefox and IE it renders perfectly (no bugs with firebug)




Ext.ns('com.safelayer.sabar');

com.safelayer.sabar.admin = {

init: function(){

var mainpanel = new MainPanel();

mainpanel.setActiveTab(mainpanel.items.itemAt(0))

Ext.Ajax.request({
url: app_link+'/user/userhasadditionalinfo',
success:function(resp){
var obj = Ext.decode(resp.responseText);
if (!obj.success){
Ext.Msg.show({
title:'Alert!',
msg: toLocal('g.title.message.warning'),
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.WARNING
});
}
},
failure:function(){
alert('fallo del servidor');
}
});

var viewport = new Ext.Viewport({
layout: 'border',
items: [
{
region: 'north',
html: '<span class="safelayer"></span><h1 class="header">SAABR Manager<div class="logout" id="boto-logout"></div></h1>',
autoHeight: true,
border: false,
margins: '0 0 3 0'}
,
mainpanel,
{
id:'info',
region: 'east',
title: toLocal('g.title.help'),
collapsible: true,
split: true,
width:270,
autoScroll: true
}]
});

viewport.show();



var split = new Ext.Button(
{
id:'bototext',
cls: 'x-btn-text-icon',
icon: app_link+'/images/user_red.png',
allowDepress:false
});

var boto = new Ext.Button(
{
text: toLocal('g.admin.user.exit'),
cls: 'x-btn-text-icon',
icon: app_link+'/images/logout.png',
/*x:0,
y:0,
width: 100,
height:100,*/
listeners: {
click: function(e){

Ext.Msg.show({
title:toLocal('g.title.message.alert'),
minWidth : 200,
maxWidth : 200,
msg: toLocal('g.title.message.salir'),
buttons: Ext.Msg.OKCANCEL,
fn: function(btn, text){
if (btn == 'ok'){
var redirect = app_link+'/logout';
window.location = redirect;
}
},
animEl: 'elId',
icon: Ext.MessageBox.QUESTION
});
}
}
});

var boto2 = new Ext.Button({

text: toLocal('g.title.split.credits'),
iconCls: 'information',
listeners: {
click: function(e){

var creditsWin = new Ext.Window({
title:toLocal('g.title.split.credits'),
iconCls: 'information',
layout:'fit',
modal:true,
closeAction: 'hide',
width:500,
height:180,
plain: true,
html: '<iframe style="overflow:auto;width:100%;height:100%;" frameborder="0" src="'+app_link+'/about.html"></iframe>'
});
creditsWin.show();
}
}
});

var boto3 = new Ext.Button({

iconCls:'question',
text: toLocal('g.title.split.help'),
listeners: {
click: function(e){

var helpWin = new Ext.Window({
iconCls:'question',
title:toLocal('g.title.split.help'),
layout:'fit',
modal:true,
closeAction: 'hide',
width:500,
height:210,
plain: true,
html: '<iframe style="overflow:auto;width:100%;height:100%;" frameborder="0" src="'+app_link+'/help.html"></iframe>'
});
helpWin.show();

}
}
});

var panellogin = new Ext.Panel({

renderTo: 'boto-logout',
unstyled:true,

layout:'table',
layoutConfig:{columns:4},

//layout:'absolute',
items:[
split,
boto2,
boto3,
boto
]
});

Ext.Ajax.request({
url: app_link+'/user/info',
success: function(resp) {
var user = Ext.decode(resp.responseText).results[0].username;

panellogin.findById('bototext').setText( toLocal('g.admin.user.greeting')+' '+user);
},
failure: function(){
alert ('failure');
}
});

Ext.getCmp('info').load(app_link+'/admin/help'+'?nombre=preguntas');

mainpanel.on('tabchange',function( tabpanel,tab ){

Ext.getCmp('info').load(app_link+'/admin/help'+'?nombre='+ tab.id);

});

Ext.QuickTips.init();
}
}
Ext.onReady(com.safelayer.sabar.admin.init,com.safelayer.sabar.admin);


Any help is appreciated...
thx