Skip to content
This repository was archived by the owner on Mar 30, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/javascript/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ SYMPHONY.remote.hello().then(function(data) {
);



// LEFT NAV: Add an entry to the left navigation for our application
navService.add("hello-nav", "Hello World App", "hello:controller");
var navId = "hello-nav";
navService.add(navId, "Hello World App", "hello:controller");

// LEFT NAV: Add an extra left navigation item that can be removed by clicking on the "Remove Left Nav Item Button"
navService.add("hello-nav-remove", "Removable Left Nav Item", "hello:controller");
Expand All @@ -75,17 +75,12 @@ SYMPHONY.remote.hello().then(function(data) {

// LEFT NAV & MODULE: When the left navigation item is clicked on, invoke Symphony's module service to show our application in the grid
select: function(id) {
if (id == "hello-nav") {
// Focus the left navigation item when clicked
navService.focus("hello-nav");
}

modulesService.show("hello", {title: "Hello World App"}, "hello:controller", "https://localhost:4000/app.html", {
// You must specify canFloat in the module options so that the module can be pinned
"canFloat": true,
// Pass the nav item id for handling focus of the left navigation
"navId": navId
});
// Focus the module after it is shown
modulesService.focus("hello");
},

// UI: Execute the following when UI extensions are clicked.
Expand Down