diff --git a/content/fasoverlay.js.php b/content/fasoverlay.js.php index 065e8ad7b..36e3cbcda 100644 --- a/content/fasoverlay.js.php +++ b/content/fasoverlay.js.php @@ -40,20 +40,23 @@ function initLektorTree() url = 'rdf/mitarbeiter.rdf.php?user=true&lektor=true&'+gettimestamp(); var LektorTree=document.getElementById('tree-lektor'); - //Alte DS entfernen - var oldDatasources = LektorTree.database.GetDataSources(); - while(oldDatasources.hasMoreElements()) + if(LektorTree) { - LektorTree.database.RemoveDataSource(oldDatasources.getNext()); + //Alte DS entfernen + var oldDatasources = LektorTree.database.GetDataSources(); + while(oldDatasources.hasMoreElements()) + { + LektorTree.database.RemoveDataSource(oldDatasources.getNext()); + } + + var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); + LektorTreeDatasource = rdfService.GetDataSource(url); + LektorTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); + LektorTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink); + LektorTree.database.AddDataSource(LektorTreeDatasource); + //LektorTreeDatasource.addXMLSinkObserver(LektorTreeSinkObserver); + LektorTree.builder.addListener(LektorTreeListener); } - - var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); - LektorTreeDatasource = rdfService.GetDataSource(url); - LektorTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource); - LektorTreeDatasource.QueryInterface(Components.interfaces.nsIRDFXMLSink); - LektorTree.database.AddDataSource(LektorTreeDatasource); - //LektorTreeDatasource.addXMLSinkObserver(LektorTreeSinkObserver); - LektorTree.builder.addListener(LektorTreeListener); } catch(e) { diff --git a/content/kontakt.xul.php b/content/kontakt.xul.php index 54483d92c..ad1e319d8 100644 --- a/content/kontakt.xul.php +++ b/content/kontakt.xul.php @@ -110,6 +110,10 @@ else class="sortDirectionIndicator" sort="rdf:http://www.technikum-wien.at/adresse/rdf#name" onclick="KontaktAdresseTreeSort()"/> +