Skip to content

Commit

Permalink
CHE-4614 Move plugin-dashboard to ide core (#4790)
Browse files Browse the repository at this point in the history
* CHE-4614 Move plugin-dashboard to ide core
  • Loading branch information
Vitaliy Guliy committed Apr 21, 2017
1 parent 2e07fd6 commit 9b54743
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 105 deletions.
6 changes: 0 additions & 6 deletions src/app/ide/ide-config.ts
Expand Up @@ -19,9 +19,6 @@ import IdeIFrameCtrl from './ide-iframe/ide-iframe.controller';
import IdeIFrame from './ide-iframe/ide-iframe.directive';
import IdeIFrameSvc from './ide-iframe/ide-iframe.service';

import IdeIFrameButtonLinkCtrl from './ide-iframe-button-link/ide-iframe-button-link.controller';
import IdeIFrameButtonLink from './ide-iframe-button-link/ide-iframe-button-link.directive';

export class IdeConfig {

constructor(register) {
Expand All @@ -32,9 +29,6 @@ export class IdeConfig {
register.controller('IdeIFrameCtrl', IdeIFrameCtrl);
register.directive('ideIframe', IdeIFrame);

register.controller('IdeIFrameButtonLinkCtrl', IdeIFrameButtonLinkCtrl);
register.directive('ideIframeButtonLink', IdeIFrameButtonLink);

let ideProvider = {
title: (params) => {return params.workspaceName},
templateUrl: 'app/ide/ide.html',
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions src/app/ide/ide-iframe-button-link/ide-iframe-button-link.styl

This file was deleted.

15 changes: 13 additions & 2 deletions src/app/ide/ide-iframe/ide-iframe.service.ts
Expand Up @@ -22,11 +22,12 @@ class IdeIFrameSvc {
* Default constructor that is using resource
* @ngInject for Dependency injection
*/
constructor ($timeout, $compile, $rootScope, $location, $window, cheUIElementsInjectorService) {
constructor ($timeout, $compile, $rootScope, $location, $window, $mdSidenav, cheUIElementsInjectorService) {
this.cheUIElementsInjectorService = cheUIElementsInjectorService;
this.$timeout = $timeout;
this.$compile = $compile;
this.$location = $location;
this.$mdSidenav = $mdSidenav;

$window.addEventListener("message", (event) => {
if ("show-ide" === event.data) {
Expand All @@ -37,11 +38,21 @@ class IdeIFrameSvc {
$rootScope.hideLoader = true;
});
}
} else if ("show-workspaces" === event.data){

} else if ("show-workspaces" === event.data) {
$rootScope.$apply(() => {
$location.path('/workspaces');
});

} else if ("show-navbar" === event.data) {
$rootScope.hideNavbar = false;
$mdSidenav('left').toggle();

} else if ("hide-navbar" === event.data) {
$rootScope.hideNavbar = true;
$mdSidenav('left').close();
}

}, false);
}

Expand Down

0 comments on commit 9b54743

Please sign in to comment.