blob: 5e4e842d7a471901a1ab7a1d37db43fe4a359632 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../requirejs/require.js"></script>
<script>
/*global require*/
require({
baseUrl: '..',
// set the paths to our library packages
packages: [],
paths: {
text: 'requirejs/text',
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady'
}
});
/*global define orion window*/
var VERSION = "2.0";
require(['require', 'orion/plugin'], function(require, PluginProvider) {
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 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#projectfor={Location}"
});
provider.registerService("orion.page.link", serviceImpl, {
nameKey: "Get Plugins",
id: "orion.plugins.get",
nls: "orion/nls/messages",
uriTemplate: "http://mamacdon.github.io/#?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"
});
provider.registerService("orion.page.link.user", null, {
id: "orion.help",
nameKey: "Help",
nls: "orion/widgets/nls/messages",
uriTemplate: 'http://wiki.eclipse.org/Orion/Getting_Started_with_Orion_node',
category: 0
});
provider.registerService("orion.page.link.user", null, {
id: "orion.settings",
nameKey: "Settings",
nls: "orion/widgets/nls/messages",
uriTemplate: "{OrionHome}/settings/settings.html",
category: 1
});
var htmlHelloWorld = document.createElement('a');
htmlHelloWorld.href = "./contentTemplates/helloWorld.zip";
var pluginHelloWorld = document.createElement('a');
pluginHelloWorld.href = "./contentTemplates/pluginHelloWorld.zip";
provider.registerService("orion.core.content", null, {
id: "orion.content.html5",
name: "Sample HTML5 Site",
description: 'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
contentURITemplate: htmlHelloWorld.href
});
provider.registerService("orion.core.content", null, {
id: "orion.content.plugin",
name: "Sample Orion Plugin",
description: "Generate a sample plugin for integrating with Orion.",
contentURITemplate: pluginHelloWorld.href
});
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>