fileManager.js 682 B

123456789101112131415161718192021222324252627
  1. function parseResponseXML(){
  2. //print(config.config,'Status:' +this.status);
  3. print('Status:'+this.status);
  4. if (this.status!=200) return;
  5. config.loadFileConfig.json=JSON.parse(this.responseText);
  6. config.loadFileConfig.cb();
  7. }
  8. function loadFile(){
  9. print('YY: '+config.loadFileConfig.url);
  10. let connRequest=new XMLHttpRequest();
  11. connRequest.addEventListener("loadend",parseResponseXML);
  12. //function(e){parseResponseXML(e,config);});
  13. connRequest.open("GET", config.loadFileConfig.url);
  14. connRequest.send();
  15. }
  16. function getBasePath(){
  17. let server=LABKEY.ActionURL.getBaseURL();
  18. let basePath=server+"_webdav";
  19. basePath+=LABKEY.ActionURL.getContainer();
  20. return basePath;
  21. }