29 Jan
2010
29 Jan
'10
3:58 p.m.
On 01/29/2010 03:48 PM, Jerome Velociter wrote:
Marius Dumitru Florea wrote:
FYI, I get a JavaScript exception ("XWiki is not defined") if I edit Main.AllDocs when javascript.vm template is not imported in WYSIWYG editing mode. Should the live table macro check if the XWiki JavaScript object is present?
Yes It should. Thanks for catching this.
Errr, no? If the XWiki object is not defined, then how will it work? I think the XWiki object is defined in the parent frame, so this would be better: if (typeof(XWiki) == 'undefined') { if (typeof(window.parent.XWiki) != 'undefined') { XWiki = window.parent.XWiki; } else { // Critical, what now? } } -- Sergiu Dumitriu http://purl.org/net/sergiu/