[GeoNode-devel] Waiting.. gif for load processs
David Alda Fernandez de Lezea
dalda at hazi.eus
Fri Apr 1 00:19:49 PDT 2016
Hi,
I'll respond myself as I found where to put the code I needed. I went to the GeoExplorer-debug.js file and I added in the "gxp.Viewer" class in the "load" function, after the call to "this.initTools();" the code to show up a processing div (line 50407). Then in line 50622 aprox. in the "activate" method I added at the end of this function the code to hide the processing div.
Hope this could help someone else.
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.
-----Mensaje original-----
De: geonode-devel [mailto:geonode-devel-bounces at lists.osgeo.org] En nombre de David Alda Fernandez de Lezea
Enviado el: miércoles, 30 de marzo de 2016 10:02
Para: geonode-devel at lists.osgeo.org
Asunto: [GeoNode-devel] Waiting.. gif for load processs
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.
_______________________________________________
geonode-devel mailing list
geonode-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geonode-devel
More information about the geonode-devel
mailing list