Permalink
Switch branches/tags
v20141016-1200 v20140317-1720 v20140317-1530 v20140317-1408 v20140317-0910 v20140314-2255 v20140314-2012 v20140314-1532 v20140314-1316 v20140314-1231 v20140314-0310 v20140314-0221 v20140313-2303 v20140313-1939 v20140313-1758 v20140313-0025 v20140312-1913 v20140312-1713 v20140311-2250 v20140311-1824 v20140311-1801 v20140311-1522 v20140310-2212 v20140310-2107 v20140310-1552 v20140307-2356 v20140307-2245 v20140307-2059 v20140307-2019 v20140306-2205 v20140306-2043 v20140306-1910 v20140306-1631 v20140306-0300 v20140306-0133 v20140305-1943 v20140305-1746 v20140305-1735 v20140305-1657 v20140305-1609 v20140305-1435 v20140305-0034 v20140304-2213 v20140304-1729 v20140304-1656 v20140304-1057 v20140304-0855 v20140303-2214 v20140303-2147 v20140303-1629 v20140303-1617 v20140227-0406 v20140226-2047 v20140226-1939 v20140225-2245 v20140225-1959 v20140224-2300 v20140224-1908 v20140223-2323 v20140222-1606 v20140221-1934 v20140221-1733 v20140220-2312 v20140220-1758 v20140220-1740 v20140220-1733 v20140219-2206 v20140219-2014 v20140219-1943 v20140219-1809 v20140218-2242 v20140218-1556 v20140217-1925 v20140217-1241 v20140214-1721 v20140213-2353 v20140213-2005 v20140213-1804 v20140213-1640 v20140212-2112 v20140212-2024 v20140212-1057 v20140212-0903 v20140212-0145 v20140211-2327 v20140211-2256 v20140211-2254 v20140211-2244 v20140211-2134 v20140211-2054 v20140211-1848 v20140211-1803 v20140211-1622 v20140211-1316 v20140211-0049 v20140210-2226 v20140210-2154 v20140210-2019 v20140210-1757 v20140210-1728
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (80 sloc) 2.46 KB
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2011, 2017." >
<meta http-equiv="Content-Language" content="en-us">
<script type="text/javascript" src="../orion/plugin.js"></script>
<script>
/*eslint-env browser, amd*/
/*global orion*/
window.onload = function() {
var provider = new orion.PluginProvider({postInstallUrl:"../plugin/list.html"});
provider.registerService("orion.navigate.command", {
run : function(item) {
window.alert("Running code on: " + item.Location);
}
}, {
image: "../images/gear.gif",
name: "Run Code on Single Item",
id: "sample.commands.sample1",
forceSingleItem: true,
tooltip: "Run plugin code only on single file/dir"
});
provider.registerService("orion.navigate.command", {
run : function(item) {
return item.Location;
}
}, {
image: "../images/gear.gif",
name: "Open HTML Raw",
id: "sample.commands.sample2",
forceSingleItem: true,
href: true,
contentType: ["text/html"],
tooltip: "Link to raw html on server"
});
provider.registerService("orion.navigate.command", {
run : function(items) {
var locations = [];
for (var i = 0; i<items.length; i++) {
locations.push(items[i].Location);
}
window.alert("Bulk operation on: " + locations);
}
}, {
image: "../images/gear.gif",
name: "Bulk Item Command",
id: "sample.commands.sample3",
tooltip: "Bulk command operates on selections"
});
provider.registerService("orion.navigate.command", {
run : function(item) {
window.alert("Running command for " + item.Location + ". I can even run on a non-navigator page like editor.");
}
}, {
image: "../images/gear.gif",
name: "Generic File Command",
forceSingleItem: true,
validationProperties: [
{source: "Directory", match: false}
],
id: "sample.commands.sample4",
tooltip: "Navigator command that can appear on other pages",
showGlobally: true
});
provider.registerService("orion.navigate.command", {}, {
image: "http://www.google.com/favicon.ico",
name: "Google Search",
id: "sample.commands.sample5",
forceSingleItem: true,
uriTemplate: "http://www.google.com/#q={,Name}",
tooltip: "Link to google search for this file name"
});
provider.connect();
};
</script>
</head>
<body>
</body>
</html>