Skip to content

Commit

Permalink
Update pageLinksPlugin (fixes #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamacdon committed Dec 7, 2012
1 parent 9879cd4 commit 5438e39
Showing 1 changed file with 41 additions and 6 deletions.
47 changes: 41 additions & 6 deletions lib/orionode.client/plugins/pageLinksPlugin.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,12 +2,32 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../orion/plugin.js"></script> <script src="../requirejs/require.js"></script>
<script> <script>
/*global orion window*/ /*global require*/
require({
baseUrl: '..',

// set the paths to our library packages
packages: [
{
name: 'dojo',
location: 'org.dojotoolkit/dojo',
main: 'lib/main-browser',
lib: '.'
}
],
paths: {
text: 'requirejs/text',
i18n: 'requirejs/i18n',
domReady: 'requirejs/domReady'
}
});

/*global define orion window*/
var VERSION = "1.0"; var VERSION = "1.0";

window.onload = function() { require(['require', 'orion/plugin'], function(require, PluginProvider) {
var serviceImpl = { /* All data is in properties */ }; var serviceImpl = { /* All data is in properties */ };


var headers = { var headers = {
Expand All @@ -16,7 +36,7 @@
description: "This plugin provides the top-level page links for Orion." description: "This plugin provides the top-level page links for Orion."
}; };


var provider = new orion.PluginProvider(headers); var provider = new PluginProvider(headers);


// Primary navigation links // Primary navigation links
provider.registerService("orion.page.link", serviceImpl, { provider.registerService("orion.page.link", serviceImpl, {
Expand Down Expand Up @@ -63,6 +83,21 @@
uriTemplate: "{OrionHome}/navigate/table.html#{NavigatorLocation}?depth=1" 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: 'https://github.com/mamacdon/orionode/blob/master/README.md#readme',
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'); var htmlHelloWorld = document.createElement('a');
htmlHelloWorld.href = "./contentTemplates/helloWorld.zip"; htmlHelloWorld.href = "./contentTemplates/helloWorld.zip";
var pluginHelloWorld = document.createElement('a'); var pluginHelloWorld = document.createElement('a');
Expand Down Expand Up @@ -125,7 +160,7 @@
}); });


provider.connect(); provider.connect();
}; });
</script> </script>
</head> </head>
<body> <body>
Expand Down

0 comments on commit 5438e39

Please sign in to comment.