blob: 079b45afc262da434e1382a59421557e28dd3024 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../orion/plugin.js"></script>
<script>
/*global orion window*/
var VERSION = "1.0";
window.onload = function() {
var serviceImpl = { /* All data is in properties */ };
var headers = {
name: "Orion Page Links",
version: "1.0",
description: "This plugin provides the top-level page links for Orion."
};
var provider = new orion.PluginProvider(headers);
// Primary navigation links
provider.registerService("orion.page.link", serviceImpl, {
nameKey: "Navigator",
id: "orion.navigator",
nls: "orion/nls/messages",
uriTemplate: "{OrionHome}/navigate/table.html#"
});
provider.registerService("orion.page.link", serviceImpl, {
nameKey: "Sites",
id: "orion.sites",
nls: "orion/nls/messages",
uriTemplate: "{OrionHome}/sites/sites.html"
});
provider.registerService("orion.page.link", serviceImpl, {
nameKey: "Repositories",
id: "orion.repositories",
nls: "orion/nls/messages",
uriTemplate: "{OrionHome}/git/git-repository.html#"
});
provider.registerService("orion.page.link", serviceImpl, {
nameKey: "Shell",
id: "orion.shell",
nls: "orion/nls/messages",
uriTemplate: "{OrionHome}/shell/shellPage.html"
});
provider.registerService("orion.page.link", serviceImpl, {
nameKey: "Get Plugins",
id: "orion.plugins.get",
nls: "orion/nls/messages",
uriTemplate: "http://mamacdon.github.com/#?target={OrionHome}/settings/settings.html&version=" + VERSION + "&OrionHome={OrionHome}"
});
provider.registerService("orion.page.link.related", null, {
id: "orion.navigateFromMetadata",
nameKey: "Navigator",
nls: "orion/nls/messages",
tooltip: "Go to the navigator",
validationProperties: [{
source: "ChildrenLocation|ContentLocation",
variableName: "NavigatorLocation",
replacements: [{pattern: "\\?depth=1$", replacement: ""}] /* strip off depth=1 if it is there because we always add it back */
}],
uriTemplate: "{OrionHome}/navigate/table.html#{NavigatorLocation}?depth=1"
});
var htmlHelloWorld = document.createElement('a');
htmlHelloWorld.href = "./contentTemplates/helloWorld.zip";
var pluginHelloWorld = document.createElement('a');
pluginHelloWorld.href = "./contentTemplates/pluginHelloWorld.zip";
provider.registerService("orion.navigate.content", null, {
id: "orion.content.fromURL",
name: "Sample HTML5 Site",
description: 'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
folder: "Hello World",
command: "orion.importZipURL",
parameters: [{name: "url", type: "url", label: "Extracted from:", defaultValue: htmlHelloWorld.href},
{name: "unzip", type: "boolean", label: "Unzip:", defaultValue: true}]
});
provider.registerService("orion.navigate.content", null, {
id: "orion.content.plugin",
name: "Sample Orion Plugin",
description: "Generate a sample plugin for integrating with Orion.",
folder: "Hello World Plugin",
command: "orion.importZipURL",
parameters: [{name: "url", type: "url", label: "Extracted from:", defaultValue: pluginHelloWorld.href},
{name: "unzip", type: "boolean", label: "Unzip:", defaultValue: true}]
});
provider.registerService("orion.navigate.content", null, {
id: "orion.content.fromSFTP",
name: "SFTP Import",
description: "Import content from an SFTP location into an Orion folder. You will be prompted for the SFTP location and credentials.",
folder: "Imported Content",
command: "orion.importSFTP"
});
provider.registerService("orion.navigate.content", null, {
id: "orion.content.fromZip",
name: "Upload a File",
description: "Upload content from a local file into an Orion folder. You will be prompted for the local file.",
folder: "Uploaded Content",
command: "orion.import"
});
provider.registerService("orion.core.setting", null, {
settings: [
{ pid: "nav.config",
name: "Navigation",
category: 'general',
properties: [
{ id: "links.newtab",
name: "Links",
type: "boolean",
defaultValue: false,
options: [
{value: true, label: "Open in new tab"},
{value: false, label: "Open in same tab"}
]
}
]
}
]
});
provider.connect();
};
</script>
</head>
<body>
</body>
</html>