[GeoNode-devel] Waiting.. gif for load processs

David Alda Fernandez de Lezea dalda at hazi.eus
Wed Mar 30 01:02:13 PDT 2016


Hi all,

I wanted to add a div element with a processing gif to the the maps/new interface in which the geoexplorer view takes a bit of time while getting the Capabilities documents from several WMS's I've added to the available sources, but I can't find the right place to add my code in.

So far I've tracked down the requests to this part of the code in which an OpenLayers.Request object is launched per WMS source

/**
 * @requires OpenLayers/Request.js
 */

/** api: override = Ext.Ajax */
(function() {

    /** private: function[createComplete]
     *  ``Function``
     */
    var createComplete = function(fn, cb) {
        return function(request) {
            if(cb && cb[fn]) {
                cb[fn].call(cb.scope || window, Ext.applyIf({
                    argument: cb.argument
                }, request));
            }
        };
    };

    Ext.apply(Ext.lib.Ajax, {
        /** private: method[request]
         */
        request: function(method, uri, cb, data, options) {
            options = options || {};
            method = method || options.method;
            var hs = options.headers;
            if(options.xmlData) {
                if(!hs || !hs["Content-Type"]) {
                    hs = hs || {};
                    hs["Content-Type"] = "text/xml";
                }
                method = method || "POST";
                data = options.xmlData;
            } else if(options.jsonData) {
                if(!hs || !hs["Content-Type"]) {
                    hs = hs || {};
                    hs["Content-Type"] = "application/json";
                }
                method = method || "POST";
                data = typeof options.jsonData == "object" ?
                       Ext.encode(options.jsonData) : options.jsonData;
            }
            // if POST method, options.form or options.params means
            // form-encoded data, so change content-type
            if ((method && method.toLowerCase() == "post") &&
               (options.form || options.params) &&
               (!hs || !hs["Content-Type"])) {
                hs = hs || {};
                hs["Content-Type"] = "application/x-www-form-urlencoded";
            }
            return OpenLayers.Request.issue({
                success: createComplete("success", cb),
                failure: createComplete("failure", cb),
                method: method,
                headers: hs,
                data: data,
                url: uri
            });
        },

        /** private: method[isCallInProgress]
         *  :params request: ``Object`` The XHR object.
         */
        isCallInProgress: function(request) {
            // do not prevent our caller from calling abort()
            return true;
        },

        /** private: method[abort]
         *  :params request: ``Object`` The XHR object.
         */
        abort: function(request) {
            request.abort();
        }
    });
})();

But my problem is that I can't find from where point is this function called ..

Any ideas where to look into?

Thanks in advance.

Regards,
Agur bero bat,


David Alda Fernández de Lezea
Área de Sistemas de Información Geográfica, Planificación Territorial y Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren Arloa.
dalda at hazi.eus | www.hazi.eus
T 945 003 240 - M 627 923 170 - F 945 003 290 
Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute - Araba
 
*********************  LEGE OHARRA   *******************   AVISOLEGAL   *******************   DISCLAIMER   *****************************
Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta kontserbatu gabe.
Este mensaje es personal y confidencial y su uso no autorizado está prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo, sin reenviarlo ni conservarlo.
This message is personal and confidential, unauthorised use is legally prohibited. If you are not the intended recipient, delete it without resending or backing it.




More information about the geonode-devel mailing list