diff --git a/application-settings.js b/application-settings.js index ed60553041..2df07644ed 100644 --- a/application-settings.js +++ b/application-settings.js @@ -11,7 +11,6 @@ module.exports = { common: '/common', dialogEditor: '/dialog-editor', gtl: '/gtl', - siteSwitcher: '/site-switcher', fonticonPicker: '/fonticon-picker', dialogs: '/dialog-user', quadicon: '/quadicon', diff --git a/demo/controllers/index.ts b/demo/controllers/index.ts index 1669c0b350..66a4d7da4a 100644 --- a/demo/controllers/index.ts +++ b/demo/controllers/index.ts @@ -1,7 +1,6 @@ import AvailableComponentsController from './availableComponentsController'; import ToolbarMenuController from './toolbarMenuController'; import DataTableController from './dataTableController'; -import SiteSwitcherController from './siteSwitcherController'; import FonticonPickerController from './fonticonPickerController'; import DialogUserController from './dialogUserController'; import DialogEditorController from './dialogEditorController'; @@ -14,7 +13,6 @@ export default (module: ng.IModule) => { module.controller('demoAvailableComponents', AvailableComponentsController); module.controller('demoToolbarMenu', ToolbarMenuController); module.controller('demoDataTable', DataTableController); - module.controller('demoSiteSwitcher', SiteSwitcherController); module.controller('demoFonticonPicker', FonticonPickerController); module.controller('demoDialogUser', DialogUserController); module.controller('demoDialogEditor', DialogEditorController); diff --git a/demo/controllers/siteSwitcherController.ts b/demo/controllers/siteSwitcherController.ts deleted file mode 100644 index 256db0f133..0000000000 --- a/demo/controllers/siteSwitcherController.ts +++ /dev/null @@ -1,29 +0,0 @@ -import {ComponentDemo} from '../services/availableComponentBuilder'; -@ComponentDemo({ - name: 'basic', - title: 'Site switcher', - template: require('./../views/site-switcher/basic.html'), - group: 'site-switcher', - controller: 'demoSiteSwitcher as vm' -}) -export default class SiteSwitcherController { - public sites: any; - constructor() { - this.sites = [{ - title: 'Operations UI', - tooltip: 'Launch Operations UI', - iconClass: 'fa-cogs', - url: 'http://www.google.com' - }, { - title: 'Service UI', - tooltip: 'Launch Service UI', - iconClass: 'fa-cog', - url: 'http://www.cnn.com' - }, { - title: 'Home', - tooltip: 'Home', - iconClass: 'fa-home', - url: 'http://www.redhat.com' - }]; - } -} diff --git a/demo/services/availableComponentsService.ts b/demo/services/availableComponentsService.ts index 4337a611b8..883f0ae978 100644 --- a/demo/services/availableComponentsService.ts +++ b/demo/services/availableComponentsService.ts @@ -45,7 +45,6 @@ export default class AvailableComponentsService { new AvailableGroup('toolbar-menu', 'Toolbar Menu Components', '/toolbar-menu', []), new AvailableGroup('tile-menu', 'Tile Components', '/tile-view', []), new AvailableGroup('data-table', 'Data table Components', '/data-table', []), - new AvailableGroup('site-switcher', 'Site Switcher Components', '/site-switcher', []), new AvailableGroup('fonticon-picker', 'Fonticon Picker Components', '/fonticon-picker', []), new AvailableGroup('dialog', 'Dialog Components', '/dialog', []), new AvailableGroup('tree-view', 'Tree Components', '/tree', []), diff --git a/demo/styles/demo-app.scss b/demo/styles/demo-app.scss index 39b1c35025..31e46cde02 100644 --- a/demo/styles/demo-app.scss +++ b/demo/styles/demo-app.scss @@ -36,14 +36,6 @@ table .narrow { white-space: nowrap; } -.switcher-banner { - color: white; - background-color: #2b2b2b; - width: 100%; - height: 30px; - padding-left: 15px; - padding-right: 15px; -} .demo-dialog-container { height: 550px; } diff --git a/demo/views/site-switcher/basic.html b/demo/views/site-switcher/basic.html deleted file mode 100644 index 8ef0a1a159..0000000000 --- a/demo/views/site-switcher/basic.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/src/index.ts b/src/index.ts index d18890ddff..f6850b7b2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,6 @@ module miqStaticAssets { 'miqStaticAssets.dialogEditor', 'miqStaticAssets.dialogUser', 'miqStaticAssets.gtl', - 'miqStaticAssets.siteSwitcher', 'miqStaticAssets.fonticonPicker', 'miqStaticAssets.quadicon', 'miqStaticAssets.treeView', diff --git a/src/site-switcher/index.ts b/src/site-switcher/index.ts deleted file mode 100644 index 950c2a877c..0000000000 --- a/src/site-switcher/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -import SiteSwitcher from './siteSwitcherComponent'; -import * as angular from 'angular'; -module siteSwitcher { - export const app = angular.module('miqStaticAssets.siteSwitcher', []); - app.component('miqSiteSwitcher', new SiteSwitcher); -} diff --git a/src/site-switcher/site-switcher.html b/src/site-switcher/site-switcher.html deleted file mode 100644 index b2ec3a8dfd..0000000000 --- a/src/site-switcher/site-switcher.html +++ /dev/null @@ -1,13 +0,0 @@ -
- -
-
- - -
{{site.title}}
-
-
-
-
diff --git a/src/site-switcher/siteSwitcherComponent.spec.ts b/src/site-switcher/siteSwitcherComponent.spec.ts deleted file mode 100644 index 84961e7ffd..0000000000 --- a/src/site-switcher/siteSwitcherComponent.spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -import SiteSwitcher from './siteSwitcherComponent'; -import * as angular from 'angular'; - -describe('SiteSwitcher test', () => { - let bindings; - - let sites = [{ - title: 'Launch Operations UI', - tooltip: 'Launch Operations UI', - iconClass: 'fa-cogs', - url: 'http://www.google.com' - }, { - title: 'Launch Service UI', - tooltip: 'Launch Service UI', - iconClass: 'fa-cog', - url: 'http://www.cnn.com' - }, { - title: 'Home', - tooltip: 'Home', - iconClass: 'fa-home', - url: 'http://www.redhat.com' - }]; - - describe('component', () => { - let scope, compile, compiledElement; - beforeEach(() => { - angular.mock.module('miqStaticAssets.siteSwitcher'); - angular.mock.inject(($rootScope, $compile: ng.ICompileService) => { - scope = $rootScope.$new(); - compile = $compile; - }); - - scope.sites = sites; - compiledElement = compile( - angular.element( - ` - ` - ))(scope); - scope.$digest(); - }); - - it('creates site switcher with embedded hrefs', () => { - let header = compiledElement[0].querySelector('.miq-siteswitcher'); - expect(header).toBeDefined(); - expect(header.querySelectorAll('.miq-siteswitcher-icon').length).toBe(1); - }); - }); -}); diff --git a/src/site-switcher/siteSwitcherComponent.ts b/src/site-switcher/siteSwitcherComponent.ts deleted file mode 100644 index 90e27284a4..0000000000 --- a/src/site-switcher/siteSwitcherComponent.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @interface - */ -export interface ISite { - url: string; - title: string; - tooltip?: string; - iconClass: any; -} - -/** - * Controller for site switcher component - * @memberof miqStaticAssets - * @ngdoc controller - * @name SiteSwitcherController - */ -export class SiteSwitcherController { -} - -/** - * @description - * Component for showing a site switcher drop down for moving between different UI's. - * Settings object example: - * ```javascript - * { - * sites: [{ - * title: 'Launch Operations UI', - * tooltip: 'Launch Operations UI', - * iconClass: 'fa-cogs', - * url: 'http://www.manageiq.com' - * }, { - * title: 'Launch Service UI', - * tooltip: 'Launch Service UI', - * iconClass: 'fa-cog', - * url: 'http://www.manageiq.com' - * }, { - * title: 'Home', - * tooltip: 'Home', - * iconClass: 'fa-home', - * url: 'http://www.manageiq.com' - * }] - * } - * ``` - * @memberof miqStaticAssets - * @ngdoc component - * @name miqSiteSwitcher - * @attr {Array} sites - * An array of sites to display in the switcher (includes url, iconClass, tooltip and title). - * Since we use typescript this attribute has specific type of: `Array` - * - * @example - * - * - */ -export default class SiteSwitcher implements ng.IComponentOptions { - public controller = SiteSwitcherController; - public template = require('./site-switcher.html'); - public controllerAs = 'ctrl'; - public bindings: any = { - sites: '<' - }; -} diff --git a/src/styles/ui-components.scss b/src/styles/ui-components.scss index f7568c84d2..39587c6e50 100644 --- a/src/styles/ui-components.scss +++ b/src/styles/ui-components.scss @@ -147,92 +147,6 @@ table.miq-table-with-footer { /* End Grid View (Quad Icon) & Tile View Styling */ -/* Site switcher styling */ - -.miq-siteswitcher-icon { - color: white; -} - -.miq-siteswitcher-link { - color: black; -} - -.miq-siteswitcher-entry { - display: inline-block; - padding: 10px; - text-align: center; - min-width: 90px; -} - -.miq-siteswitcher-entry { - border-color: #fff; - border-style: solid; - border-width: 1px; -} - -.miq-siteswitcher-entry:hover { - border-color: #bbb; - border-style: solid; - border-width: 1px; - a { - color: #0088CE; - } -} - -.miq-siteswitcher { - .uib-dropdown-menu { - padding: 9px; - left: 8px; - margin-top: 11px; - min-width: 220px; - &.uib-dropdown-menu-right { - left: auto; - right: -2px; - &:after, - &:before { - left: auto; - right: 6px; - } - } - &:after, - &:before { - border-bottom-color: #bbb; - border-bottom-style: solid; - border-bottom-width: 10px; - border-left: 10px solid transparent; - border-right: 10px solid transparent; - content: ""; - display: inline-block; - left: 6px; - position: absolute; - top: -11px; - } - &:after { - border-bottom-color: #fff; - top: -10px; - } - } - &.dropup .uib-dropdown-menu { - margin-bottom: 11px; - margin-top: 0; - &:after, - &:before { - border-bottom: none; - border-top-color: #bbb; - border-top-style: solid; - border-top-width: 10px; - bottom: -11px; - top: auto; - } - &:after { - border-top-color: #fff; - bottom: -10px; - } - } -} - -/* end switcher styling */ - /* begin fonticon picker styling */ miq-fonticon-picker {