[CLOSED] Visual error with default AjaxEvent Request Failure window

  1. #1

    [CLOSED] Visual error with default AjaxEvent Request Failure window


    A couple of bugs/issues with the default AjaxEvent Request Failure window
    1. The Error (X) image icon in the top left corner does not show up anymore.
    2. Horizontal and vertical scrollbar show up even if content of HtmlEditor fits in current window. Ideally, scrollbar should be for the HtmlEditor and not the entire window.
    3. If there's a window with an iframe and the window is smaller than 500 x 350, the Request Failure window is too big.

    I was able to resolve issue 1 and 3 but not 2. Here's what I have so far. Maybe you guys can put some of the changes into the toolkit:

     Coolite.Ext.AjaxEvent.override({
                showFailure: function(response) {
                    var bodySize = Ext.getBody().getViewSize();
                    var width = (bodySize.width < 500) ? bodySize.width - 50 : 500;
                    var height = (bodySize.height < 350) ? bodySize.height - 50 : 350;
    
                    var win = new Ext.Window({
                        modal: true,
                        width: width,
                        height: height,
                        title: 'Request Failure',
                        layout: "fit",
                        maximizable: true,
                        listeners: {
                            "maximize": {
                                fn: function(el) {
                                    var v = Ext.getBody().getViewSize();
                                    el.setSize(v.width, v.height);
                                },
                                scope: this
                            }
                        },
                        items: new Ext.form.FormPanel({
                            baseCls: "x-plain",
                            layout: "absolute",
                            autoScroll: true,
                            defaultType: "label",
                            items: [
                    {
                        x: 5,
                        y: 5,
                        html: '<div class="x-window-dlg"><div class="ext-mb-error" style="width:32px;height:32px">
    
    '
                    }, {
                        x: 42,
                        y: 6,
                        html: "Status code: "
                    }, {
                        x: 115,
                        y: 6,
                        text: response.status
                    }, {
                        x: 42,
                        y: 25,
                        html: "Status text: "
                    }, {
                        x: 115,
                        y: 25,
                        text: response.statusText
                    }, {
                        x: 0,
                        y: 42,
                        xtype: "htmleditor",
                        anchor: "100% 100%",
                        enableAlignments: false,
                        enableColors: false,
                        enableFont: false,
                        enableFontSize: false,
                        enableFormat: false,
                        enableLinks: false,
                        enableLists: false,
                        enableSourceEdit: false,
                        value: response.responseText
    }]
                        })
                    });
                    win.show();
                }
            });
  2. #2

    RE: [CLOSED] Visual error with default AjaxEvent Request Failure window

    Hi Jacky,

    Ya, revisions to the default error Window has been on my TODO list for a while. I'll go through your proposed revisions and we'll try to tighten things up a bit.

    Thanks for posting the code sample!

    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Visual error with default AjaxEvent Request Failure window

    Hi jchau,

    We made some changes in showFailure function. Now much better. There is only one issue. In Firefox vertical scrollbar shows always initially. But we are working on it.

    And we made changes related with your topic - http://forums.ext.net/showthread.php...4374-16-1.aspx
    Now responseText is not changed. The ErrorMessage and response object passed to showFailure without changes.


Similar Threads

  1. Request failure error
    By Vaishali in forum 1.x Help
    Replies: 0
    Last Post: May 09, 2012, 5:23 AM
  2. Hide Request Failure default popup window
    By brittongr in forum 1.x Help
    Replies: 2
    Last Post: Jan 06, 2012, 11:37 AM
  3. Replies: 16
    Last Post: Oct 04, 2011, 5:17 PM
  4. Ajaxevent Request failure
    By lisaloomh in forum 1.x Help
    Replies: 2
    Last Post: Feb 05, 2010, 5:13 AM
  5. [CLOSED] Configure default AjaxEvent failure window
    By jchau in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 15, 2009, 10:55 AM

Posting Permissions