PDA

View Full Version : message box width



wp.joju
11 Nov 2009, 11:37 PM
has anyone experienced the message box width being too small after some time? its width does not seem to be correct sometimes

axelaxel
11 Nov 2009, 11:43 PM
can you be clearer?
or post some code?
to understand exactly the problem
what do you mean after some time?

axelaxel
11 Nov 2009, 11:44 PM
ah ok the photos, i didn't have before in the post..

wp.joju
11 Nov 2009, 11:46 PM
the most common time it happens is after we hit the data save button, the data save button just saves data changes on a grid using ajax request...

wp.joju
11 Nov 2009, 11:49 PM
this is the listener event for the button click (the button which when after clicked, and successfully does the ajax request will make the message box show in a weird manner




listeners: { 'click': { fn: function() {
var btn = Ext.getCmp('fw-btn-' + data.id);
var qAns = GetQuestionAnswer(btn);
if (qAns == null) {
Ext.Msg.alert('Cannot Save', 'Question must be answered first.');
return false;
}
showWindowMask('', 'Loading...');
form.getForm().submit({
url: 'Questions.aspx',
success: function(form, action) {

var store = Ext.getCmp('pnl-fw-' + thisId).store;
var record = store.getAt(rowIndex);
var field1 = false;
var field2 = 2;
field1 = form.findField('fw-ans-na-' + data.id).getValue();
if (!field1)
field1 = form.findField('fw-ans-t-' + data.id).getValue();
if (!field1)
field1 = form.findField('fw-ans-f-' + data.id).getValue();
if (!field1)
field1 = form.findField('fw-ans-fi-' + data.id).getValue();

field2 = form.findField('fw-pri-' + data.id).getValue().toString();

store.suspendEvents();
record.set('a', field1);
record.set('p', field2);
var ctr1;
for (ctr1 = 0; ctr1 < store.getCount(); ctr1++) {
if (ctr1 == rowIndex)
continue;
if (store.getAt(ctr1).get("id") == record.data["id"]) {
expander.collapseRow(ctr1);
store.getAt(ctr1).set("a", field1);
store.getAt(ctr1).set("p", field2);
}
}
store.resumeEvents();
store.commitChanges();
expander.expandRow(rowIndex);
hideWindowMask('');
Ext.Msg.alert('Success!', 'Data Saved!');
},
failure: function(form, action) {
hideWindowMask('');
HRCA_ShowError('Save failed!', action.response.status);
}
});
}, scope: this, stopEvent: true

michael.piecko
12 Nov 2009, 12:55 AM
This happens to me when i use the Ext.Msg.progress() function in between Ext.Msg.alert() or Ext.Msg.show(). I think since Ext.Msg is a singleton the width get messed up ...

Could this be the cause?

Michael

wp.joju
24 Nov 2009, 2:36 AM
this happens for me when i use the message box inside a form submit callback function

wp.joju
24 Nov 2009, 3:02 AM
i have this dummy message box message on the form submit success function



Ext.Msg.alert('Success!', 'Data asfasjaskdja asdfiasdai sa sidjais asidjais as iasjdias a sidja s Saved!');

Mad_Clog
24 Nov 2009, 5:15 AM
I have noticed simular behaviour.
We also use the Ext.msg.alert inside a form submit success/failure method

wp.joju
24 Nov 2009, 5:29 AM
fixed on v3.0.3, at least on firefox and for my part... haven't tested on IE yet