/
webdavFilePlugin.html
66 lines (66 loc) · 2.33 KB
/
webdavFilePlugin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2011, 2017." >
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../orion/Deferred.js"></script>
<script src="../orion/plugin.js"></script>
<script src="filePlugin/webdavImpl.js"></script>
<script>
/*eslint-env browser,amd*/
/*global orion eclipse*/
window.onload = function() {
function trace(implementation) {
var method;
var traced = {};
for (method in implementation) {
if (typeof implementation[method] === 'function') {
traced[method] = function(methodName) {
return function() {
console.log("*" + methodName);
var arg;
for (arg in arguments) {
console.log(" [" + arg + "] " + arguments[arg]);
}
var result = implementation[methodName].apply(implementation, Array.prototype.slice.call(arguments));
orion.Deferred.when(result, function(json) {
console.log(json);
});
return result;
};
}(method);
}
}
return traced;
}
var temp = document.createElement('a');
temp.href = ".";
var base = temp.href;
var service = new eclipse.DAVFileServiceImpl(base);
var provider = new orion.PluginProvider();
provider.registerService("orion.core.file", service, {Name:"WebDAV (".concat(base).concat(")"), top:base, pattern:base});
provider.connect();
};
</script>
</head>
<body>
<h1>WebDAV Orion FileSystem plugin</h1>
<p>This plugin provides support for a WebDAV file system plugin. The plugin and associated files must be placed in the WebDAV server directory
and installed as a plugin within Orion.</p>
<p>Certain files are needed for the plugin to be successfully loaded and these files can be placed in the same directory as the webdavFilePlugin.html.
Once the files are added, this file must be modified as follows</p>
<h3> Change from:</h3>
<code>
<script src="../orion/Deferred.js"></script>
<script src="../orion/plugin.js"></script>
<script src="filePlugin/webdavImpl.js"></script>
</code>
<h3> Change to:</h3>
<code>
<script src="orion/Deferred.js"></script>
<script src="orion/plugin.js"></script>
<script src="webdavImpl.js"></script>
</code>
</body>
</html>