Hi Ki,
Hi,
I have this new js function, new.js, and I put it in the infolog app.
Everytime I run this js so i can call values of span in the infolog index
(1796), it will return empty because the js is running before the whole
infolog nextmatch is fully loaded. I try to add the js code inside the
et2_ready function in the app.js and it went well. I don’t want to override
the existing app.js file so I created a new js file.
How will I know if the et2 is ready before executing my code for getting the
span value, the header count. Any thoughts?
There’s no way without patching EGroupware code currently.
I could imagine a static etemplate2 method registering an additional
et2_ready callback, which get called for every template ready in that
window context. So you would do something like the following in your
javascript file:
etemplate2.register_ready_callback(function(_et2, _name){
}, null);
Until we have such a method, you need to call your et2_ready callback
from app.infolog.et2_ready().
Feel free to send me or Nathan a patch implementing such a callback in
etemplate/js/etemplate2.js.
Ralf
Ralf Becker
Director Software Development
Stylite AG
Morschheimer Strasse 15 | Tel. +49 6352 70629 0
D-67292 Kirchheimbolanden | Fax. +49 6352 70629 30
Email: rb@stylite.de
www.stylite.de | www.egroupware.org
Managing Directors: Andre Keller | Ralf Becker | Gudrun Mueller
Chairman of the supervisory board: Prof. Dr. Birger Leon Kropshofer
VAT DE214280951 | Registered HRB 31158 Kaiserslautern Germany