diff --git a/awx/ui/static/fonts/merriweather-bold-webfont.woff b/awx/ui/static/fonts/merriweather-bold-webfont.woff new file mode 100644 index 0000000000..a1b95b5c1f Binary files /dev/null and b/awx/ui/static/fonts/merriweather-bold-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather-bold-webfont.woff2 b/awx/ui/static/fonts/merriweather-bold-webfont.woff2 new file mode 100644 index 0000000000..d9bf97ef75 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-bold-webfont.woff2 differ diff --git a/awx/ui/static/fonts/merriweather-bolditalic-webfont.woff b/awx/ui/static/fonts/merriweather-bolditalic-webfont.woff new file mode 100644 index 0000000000..1696f92a04 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-bolditalic-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather-bolditalic-webfont.woff2 b/awx/ui/static/fonts/merriweather-bolditalic-webfont.woff2 new file mode 100644 index 0000000000..1f7a7ae204 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-bolditalic-webfont.woff2 differ diff --git a/awx/ui/static/fonts/merriweather-heavyitalic-webfont.woff b/awx/ui/static/fonts/merriweather-heavyitalic-webfont.woff new file mode 100644 index 0000000000..6b3baeb97b Binary files /dev/null and b/awx/ui/static/fonts/merriweather-heavyitalic-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather-heavyitalic-webfont.woff2 b/awx/ui/static/fonts/merriweather-heavyitalic-webfont.woff2 new file mode 100644 index 0000000000..cbce14b28a Binary files /dev/null and b/awx/ui/static/fonts/merriweather-heavyitalic-webfont.woff2 differ diff --git a/awx/ui/static/fonts/merriweather-italic-webfont.woff b/awx/ui/static/fonts/merriweather-italic-webfont.woff new file mode 100644 index 0000000000..987146da8b Binary files /dev/null and b/awx/ui/static/fonts/merriweather-italic-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather-italic-webfont.woff2 b/awx/ui/static/fonts/merriweather-italic-webfont.woff2 new file mode 100644 index 0000000000..6a17eaa263 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-italic-webfont.woff2 differ diff --git a/awx/ui/static/fonts/merriweather-lightitalic-webfont.woff b/awx/ui/static/fonts/merriweather-lightitalic-webfont.woff new file mode 100644 index 0000000000..75146e6523 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-lightitalic-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather-lightitalic-webfont.woff2 b/awx/ui/static/fonts/merriweather-lightitalic-webfont.woff2 new file mode 100644 index 0000000000..5f42282de1 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-lightitalic-webfont.woff2 differ diff --git a/awx/ui/static/fonts/merriweather-regular-webfont.woff b/awx/ui/static/fonts/merriweather-regular-webfont.woff new file mode 100644 index 0000000000..4ca3dc6672 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-regular-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather-regular-webfont.woff2 b/awx/ui/static/fonts/merriweather-regular-webfont.woff2 new file mode 100644 index 0000000000..92a537d069 Binary files /dev/null and b/awx/ui/static/fonts/merriweather-regular-webfont.woff2 differ diff --git a/awx/ui/static/fonts/merriweather_light-webfont.woff b/awx/ui/static/fonts/merriweather_light-webfont.woff new file mode 100644 index 0000000000..c171be2053 Binary files /dev/null and b/awx/ui/static/fonts/merriweather_light-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather_light-webfont.woff2 b/awx/ui/static/fonts/merriweather_light-webfont.woff2 new file mode 100644 index 0000000000..1a200b5582 Binary files /dev/null and b/awx/ui/static/fonts/merriweather_light-webfont.woff2 differ diff --git a/awx/ui/static/fonts/merriweather_ultrabold-webfont.woff b/awx/ui/static/fonts/merriweather_ultrabold-webfont.woff new file mode 100644 index 0000000000..7a2b768928 Binary files /dev/null and b/awx/ui/static/fonts/merriweather_ultrabold-webfont.woff differ diff --git a/awx/ui/static/fonts/merriweather_ultrabold-webfont.woff2 b/awx/ui/static/fonts/merriweather_ultrabold-webfont.woff2 new file mode 100644 index 0000000000..c2008e7b7f Binary files /dev/null and b/awx/ui/static/fonts/merriweather_ultrabold-webfont.woff2 differ diff --git a/awx/ui/static/fonts/ubuntu-r-webfont.woff b/awx/ui/static/fonts/ubuntu-r-webfont.woff new file mode 100644 index 0000000000..96cc74f9b2 Binary files /dev/null and b/awx/ui/static/fonts/ubuntu-r-webfont.woff differ diff --git a/awx/ui/static/fonts/ubuntu.woff2 b/awx/ui/static/fonts/ubuntu.woff2 new file mode 100644 index 0000000000..2701e3f6cc Binary files /dev/null and b/awx/ui/static/fonts/ubuntu.woff2 differ diff --git a/awx/ui/static/img/CloudSync.svg b/awx/ui/static/img/CloudSync.svg new file mode 100644 index 0000000000..557e12e4a5 --- /dev/null +++ b/awx/ui/static/img/CloudSync.svg @@ -0,0 +1,18 @@ + + + + CloudSync + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/awx/ui/static/img/Credentials.svg b/awx/ui/static/img/Credentials.svg new file mode 100644 index 0000000000..cede062a4f --- /dev/null +++ b/awx/ui/static/img/Credentials.svg @@ -0,0 +1,10 @@ + + + + Credentials + Created with Sketch. + + + + + diff --git a/awx/ui/static/img/InventoryScripts.svg b/awx/ui/static/img/InventoryScripts.svg new file mode 100644 index 0000000000..050da79a90 --- /dev/null +++ b/awx/ui/static/img/InventoryScripts.svg @@ -0,0 +1,15 @@ + + + + InventoryScripts + Created with Sketch. + + + + + + + + + + diff --git a/awx/ui/static/img/JobTemplates.svg b/awx/ui/static/img/JobTemplates.svg new file mode 100644 index 0000000000..b82a6b7099 --- /dev/null +++ b/awx/ui/static/img/JobTemplates.svg @@ -0,0 +1,16 @@ + + + + JobTemplates + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git a/awx/ui/static/img/Jobs.svg b/awx/ui/static/img/Jobs.svg new file mode 100644 index 0000000000..4b497b79db --- /dev/null +++ b/awx/ui/static/img/Jobs.svg @@ -0,0 +1,13 @@ + + + + Jobs + Created with Sketch. + + + + + + + + \ No newline at end of file diff --git a/awx/ui/static/img/ManagementJobs.svg b/awx/ui/static/img/ManagementJobs.svg new file mode 100644 index 0000000000..ee638334f7 --- /dev/null +++ b/awx/ui/static/img/ManagementJobs.svg @@ -0,0 +1,14 @@ + + + + MaintenanceJobs + Created with Sketch. + + + + + + + + + diff --git a/awx/ui/static/img/Organizations.svg b/awx/ui/static/img/Organizations.svg new file mode 100644 index 0000000000..db36409b13 --- /dev/null +++ b/awx/ui/static/img/Organizations.svg @@ -0,0 +1,17 @@ + + + + Organizations + Created with Sketch. + + + + + + + + + + + + diff --git a/awx/ui/static/img/PortalMode--exit.svg b/awx/ui/static/img/PortalMode--exit.svg new file mode 100644 index 0000000000..af0ae04212 --- /dev/null +++ b/awx/ui/static/img/PortalMode--exit.svg @@ -0,0 +1,16 @@ + + + + PortalMode + Created with Sketch. + + + + + + + + + + + diff --git a/awx/ui/static/img/PortalMode.svg b/awx/ui/static/img/PortalMode.svg new file mode 100644 index 0000000000..0e7656d146 --- /dev/null +++ b/awx/ui/static/img/PortalMode.svg @@ -0,0 +1,12 @@ + + + + PortalMode + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/awx/ui/static/img/Projects.svg b/awx/ui/static/img/Projects.svg new file mode 100644 index 0000000000..3e7149867b --- /dev/null +++ b/awx/ui/static/img/Projects.svg @@ -0,0 +1,13 @@ + + + + Projects + Created with Sketch. + + + + + + + + diff --git a/awx/ui/static/img/Setup.svg b/awx/ui/static/img/Setup.svg new file mode 100644 index 0000000000..5b4d23a410 --- /dev/null +++ b/awx/ui/static/img/Setup.svg @@ -0,0 +1,12 @@ + + + + Setup + Created with Sketch. + + + + + + + diff --git a/awx/ui/static/img/Signout.svg b/awx/ui/static/img/Signout.svg new file mode 100644 index 0000000000..6c0f489a7d --- /dev/null +++ b/awx/ui/static/img/Signout.svg @@ -0,0 +1,18 @@ + + + + Signout + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/awx/ui/static/img/Teams.svg b/awx/ui/static/img/Teams.svg new file mode 100644 index 0000000000..d5d0b4562b --- /dev/null +++ b/awx/ui/static/img/Teams.svg @@ -0,0 +1,15 @@ + + + + Teams + Created with Sketch. + + + + + + + + + + diff --git a/awx/ui/static/img/TowerLogo.svg b/awx/ui/static/img/TowerLogo.svg new file mode 100644 index 0000000000..1fc73730a5 --- /dev/null +++ b/awx/ui/static/img/TowerLogo.svg @@ -0,0 +1,22 @@ + + + + TowerLogo + Created with Sketch. + + + + + + + diff --git a/awx/ui/static/img/User.svg b/awx/ui/static/img/User.svg new file mode 100644 index 0000000000..d83d41fc09 --- /dev/null +++ b/awx/ui/static/img/User.svg @@ -0,0 +1,15 @@ + + + + Teams + Created with Sketch. + + + + + + + + + + diff --git a/awx/ui/static/img/Users.svg b/awx/ui/static/img/Users.svg new file mode 100644 index 0000000000..c7e4feac21 --- /dev/null +++ b/awx/ui/static/img/Users.svg @@ -0,0 +1,13 @@ + + + + Users + Created with Sketch. + + + + + + + + diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 33d171e8e0..b7848c93cc 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -38,6 +38,8 @@ import routeExtensions from 'tower/shared/route-extensions/main'; import breadcrumbs from 'tower/shared/breadcrumbs/main'; // modules +import setupMenu from 'tower/setup-menu/main'; +import mainMenu from 'tower/main-menu/main'; import browserData from 'tower/browser-data/main'; import {JobDetailController} from 'tower/controllers/JobDetail'; @@ -83,6 +85,8 @@ var tower = angular.module('Tower', [ browserData.name, breadcrumbs.name, systemTracking.name, + setupMenu.name, + mainMenu.name, 'AuthService', 'Utilities', 'LicenseHelper', @@ -933,7 +937,7 @@ var tower = angular.module('Tower', [ LoadConfig, Store, ShowSocketHelp, AboutAnsibleHelp, ConfigureTower, CreateCustomInventory) { - var e, html, sock; + var sock; function activateTab() { // Make the correct tab active @@ -981,16 +985,6 @@ var tower = angular.module('Tower', [ $rootScope.removeOpenSocket(); } $rootScope.removeOpenSocket = $rootScope.$on('OpenSocket', function() { - html = ""; - e = angular.element(document.getElementById('socket-beacon-div')); - e.empty().append(html); - $compile(e)($rootScope); - - e = angular.element(document.getElementById('socket-beacon-li')); - e.empty().append(html); - $compile(e)($rootScope); - // Listen for job changes and issue callbacks to initiate // DOM updates function openSocket() { diff --git a/awx/ui/static/js/main-menu/default-menu.directive.js b/awx/ui/static/js/main-menu/default-menu.directive.js new file mode 100644 index 0000000000..4e279e515a --- /dev/null +++ b/awx/ui/static/js/main-menu/default-menu.directive.js @@ -0,0 +1,14 @@ +export default function() { + return { + restrict: 'E', + templateUrl: '/static/js/main-menu/menu-default.partial.html', + link: function(scope, element) { + var contents = element.contents(); + contents.unwrap(); + + scope.$on('$destroy', function() { + contents.remove(); + }); + } + }; +} diff --git a/awx/ui/static/js/main-menu/main-menu.block.less b/awx/ui/static/js/main-menu/main-menu.block.less new file mode 100644 index 0000000000..57d9b91fb3 --- /dev/null +++ b/awx/ui/static/js/main-menu/main-menu.block.less @@ -0,0 +1,56 @@ +/** @define MainMenu */ + +.MainMenu { + @menu-breakpoint: 871px; + + display: flex; + + background-color: white; + margin: 0; + + @media screen and (max-width: @menu-breakpoint) { + position: relative; + transition: height 0.5s ease-out; + justify-content: flex-start; + flex-direction: column; + height: 58px; + overflow: hidden; + + &.Menu--open { + height: 523px !important; + // border-bottom: solid thin black; + } + + &--portal.Menu--open { + height: 290px !important; + } + + } + + @media screen and (min-width: (@menu-breakpoint + 1px)) { + padding: 0 1rem; + } + + &-menuContainer { + display: flex; + } + + &-toggle { + display: flex; + @media screen and (min-width: (@menu-breakpoint + 1px)) { + display: none; + } + margin-left: auto; + } + + &--fixedTop { + width: 100%; + z-index: 1040; + position: fixed; + right: 0; + left: 0; + top: 0; + } + +} + diff --git a/awx/ui/static/js/main-menu/main-menu.directive.js b/awx/ui/static/js/main-menu/main-menu.directive.js new file mode 100644 index 0000000000..4e2eafee22 --- /dev/null +++ b/awx/ui/static/js/main-menu/main-menu.directive.js @@ -0,0 +1,45 @@ +/* jshint unused: vars */ + +export default function() { + return { + restrict: 'E', + controllerAs: 'mainMenu', + templateUrl: '/static/js/main-menu/main-menu.partial.html', + controller: ['$scope', function($scope) { + this.open = function() { + $scope.isOpen = true; + }; + + this.close = function() { + $scope.isOpen = false; + }; + + this.toggle = function() { + $scope.isOpen = !$scope.isOpen; + }; + + $scope.isOpen = false; + }], + scope: { + menuStyle: '&menuStyle', + currentUser: '=' + }, + link: function(scope, element, attrs) { + scope.menuStyleClassName = 'blah'; + scope.$watch(function() { + return scope.$eval(scope.menuStyle); + }, function(newValue) { + scope.menuStyleClassName = 'MainMenu--' + newValue; + }); + scope.$watch('isOpen', function(isOpen) { + if (isOpen) { + element.find('.MainMenu').addClass("Menu--open"); + element.find('menu-toggle-button').addClass("MenuToggle--open"); + } else { + element.find('.MainMenu').removeClass("Menu--open"); + element.find('menu-toggle-button').removeClass("MenuToggle--open"); + } + }); + } + }; +} diff --git a/awx/ui/static/js/main-menu/main-menu.partial.html b/awx/ui/static/js/main-menu/main-menu.partial.html new file mode 100644 index 0000000000..4fc142f685 --- /dev/null +++ b/awx/ui/static/js/main-menu/main-menu.partial.html @@ -0,0 +1,8 @@ + diff --git a/awx/ui/static/js/main-menu/main.js b/awx/ui/static/js/main-menu/main.js new file mode 100644 index 0000000000..a1fc92ce1c --- /dev/null +++ b/awx/ui/static/js/main-menu/main.js @@ -0,0 +1,19 @@ +import mainMenu from './main-menu.directive'; +import menuItem from './menu-item.directive'; +import menuToggle from './menu-toggle.directive'; +import webSocketStatus from './web-socket-status.directive'; +import defaultMenu from './default-menu.directive'; +import portalMenu from './portal-menu.directive'; + +import shared from 'tower/shared/main'; + +export default + angular.module('mainMenu', + [ shared.name + ]) + .directive('menuItem', menuItem) + .directive('defaultMenu', defaultMenu) + .directive('portalMenu', portalMenu) + .directive('menuToggleButton', menuToggle) + .directive('webSocketStatus', webSocketStatus) + .directive('mainMenu', mainMenu); diff --git a/awx/ui/static/js/main-menu/menu-default.partial.html b/awx/ui/static/js/main-menu/menu-default.partial.html new file mode 100644 index 0000000000..eb0666662f --- /dev/null +++ b/awx/ui/static/js/main-menu/menu-default.partial.html @@ -0,0 +1,40 @@ + + Projects + + + Inventories + + + Job Templates + + + Jobs + + + + + + + {{currentUser.username}} + + + + + + + Setup + + + + + + + Portal Mode + + + + + + + Sign Out + diff --git a/awx/ui/static/js/main-menu/menu-item.block.less b/awx/ui/static/js/main-menu/menu-item.block.less new file mode 100644 index 0000000000..ac1bb25fba --- /dev/null +++ b/awx/ui/static/js/main-menu/menu-item.block.less @@ -0,0 +1,131 @@ +/** @define MenuItem */ + +@import (reference) "shared/utilities/icons.less"; +@import "shared/branding/colors.less"; + +.MenuItem { + @menu-breakpoint: 870px; + + display: flex; + flex: none; + + transition: color 60ms; + + padding: 0 1rem; + min-height: 5.8rem; + min-width: 9.2rem; + margin-right: 2rem; + align-items: center; + + &, &:active, &:focus { + color: black; + } + + &:hover { + color: @blue; + } + + &:last-child { + margin-right: 0; + } + + @media screen and (max-width: @menu-breakpoint) { + flex: 1 1 0; + padding: 0 1rem; + margin-right: 0; + border-bottom: solid thin rgb(202, 202, 202); + + .tooltip, &+.tooltip { + display: none !important; + } + + &--logo { + border: none; + display: flex; + align-items: stretch; + } + } + + &--fixed { + flex: none; + min-width: 0; + margin-right: 0; + @media screen and (min-width: (@menu-breakpoint + 1px)) { + padding: 0 0.75rem; + } + } + + &-helpTitle { + @media screen and (min-width: (@menu-breakpoint + 1px)) { + display: none; + } + } + + &-hoverIcon { + width: 28px; + } + + &--active { + font-weight: bold; + } + + &--right { + // Push this and all following elements to the right + margin-left: auto; + @media screen and (max-width: @menu-breakpoint) { + margin-left: 0; + } + } + + &--setup { + &:before { + .icon(@fa-var-cogs); + padding-right: 0.25rem; + } + } + + &--popup { + // Make pseudo button + background: transparent; + border: 0; + padding: 8px 0; + + outline: none; + + &:after { + .icon(@fa-var-angle-down); + } + } + + &-logo { + height: 34px; + width: auto; + align-self: center; + } + + &-icon { + height: 17px; + width: auto; + max-width: 18px; + flex: none; + box-sizing: initial; + &--labelled { + margin-right: 0.25rem; + } + @media screen and (max-width: @menu-breakpoint) { + display: none; + margin-right: 1.4rem; + } + } + + &-username { + padding-right: 0.25rem; + @media screen and (max-width: @menu-breakpoint) { + order: 1; // moves this to the bottom + } + @media screen and (min-width: (@menu-breakpoint + 1px)) { + max-width: 110px; + } + } + +} diff --git a/awx/ui/static/js/main-menu/menu-item.directive.js b/awx/ui/static/js/main-menu/menu-item.directive.js new file mode 100644 index 0000000000..950abf3cba --- /dev/null +++ b/awx/ui/static/js/main-menu/menu-item.directive.js @@ -0,0 +1,35 @@ +/* jshint unused: vars */ + +export default ['$route', '$rootScope', function($route, $rootScope) { + return { + require: '^^mainMenu', + link: function(scope, element, attrs, mainMenuController) { + var routeName = attrs.linkTo; + + scope.$on('$routeChangeStart', function() { + // any time we start a route change, + // assume it was from the menu, and + // close it in case it's open + mainMenuController.close(); + }); + + scope.$on('$routeChangeSuccess', function(e, nextRoute) { + if (nextRoute.$$route.name === routeName) { + element.addClass('MenuItem--active'); + } else { + element.removeClass('MenuItem--active'); + } + return nextRoute.$$route.name; + }); + + scope.$on('$destroy', function() { + element.off('click.menu-item'); + }); + + element.on('click', function(e) { + mainMenuController.close(); + }, true); + + } + }; +}]; diff --git a/awx/ui/static/js/main-menu/menu-portal.partial.html b/awx/ui/static/js/main-menu/menu-portal.partial.html new file mode 100644 index 0000000000..0269647dfb --- /dev/null +++ b/awx/ui/static/js/main-menu/menu-portal.partial.html @@ -0,0 +1,24 @@ + + Portal + + + + + + + {{currentUser.username}} + + + + + + + Exit Portal Mode + + + + + + + Sign Out + diff --git a/awx/ui/static/js/main-menu/menu-toggle.block.less b/awx/ui/static/js/main-menu/menu-toggle.block.less new file mode 100644 index 0000000000..4c8691b97e --- /dev/null +++ b/awx/ui/static/js/main-menu/menu-toggle.block.less @@ -0,0 +1,34 @@ +/** @define MenuToggle */ + +.MenuToggle { + + align-self: center; + &-icon { + // Override settings (on svg tag) from nv.d3.css that really + // shouldn't be there, but are, so meh. + display: inherit; + width: inherit; + height: inherit; + // border: solid thin white; + } + + &-bar { + fill: #000; + transition: transform 0.25s cubic-bezier(.96,-0.6,.27,1.68), opacity 0.25s; + transform: rotate(0deg); + transform-origin: center center; + } + + + &--open { + .MenuToggle-crossBar1 { + transform: rotate(45deg); + } + .MenuToggle-topBar, .MenuToggle-bottomBar { + opacity: 0; + } + .MenuToggle-crossBar2 { + transform: rotate(-45deg); + } + } +} diff --git a/awx/ui/static/js/main-menu/menu-toggle.directive.js b/awx/ui/static/js/main-menu/menu-toggle.directive.js new file mode 100644 index 0000000000..df399bbce9 --- /dev/null +++ b/awx/ui/static/js/main-menu/menu-toggle.directive.js @@ -0,0 +1,27 @@ +/* jshint unused: vars */ + +export default function() { + return { + templateUrl: '/static/js/main-menu/menu-toggle.partial.html', + restrict: 'E', + require: '^^mainMenu', + scope: { + width: '@', + height: '@', + barHeight: '@' + }, + link: function(scope, element, attrs, mainMenuController) { + scope.$on('$destroy', function() { + element.off('click'); + }); + + element.on("click", function(e) { + e.preventDefault(); + e.stopPropagation(); + scope.$apply(function() { + mainMenuController.toggle(); + }); + }); + } + }; +} diff --git a/awx/ui/static/js/main-menu/menu-toggle.partial.html b/awx/ui/static/js/main-menu/menu-toggle.partial.html new file mode 100644 index 0000000000..962cc4c7c9 --- /dev/null +++ b/awx/ui/static/js/main-menu/menu-toggle.partial.html @@ -0,0 +1,9 @@ + + diff --git a/awx/ui/static/js/main-menu/portal-menu.directive.js b/awx/ui/static/js/main-menu/portal-menu.directive.js new file mode 100644 index 0000000000..0b407b3e20 --- /dev/null +++ b/awx/ui/static/js/main-menu/portal-menu.directive.js @@ -0,0 +1,15 @@ +export default function() { + return { + restrict: 'E', + templateUrl: '/static/js/main-menu/menu-portal.partial.html', + link: function(scope, element) { + var contents = element.contents(); + contents.unwrap(); + + scope.$on('$destroy', function() { + contents.remove(); + }); + } + }; +} + diff --git a/awx/ui/static/js/main-menu/web-socket-status.directive.js b/awx/ui/static/js/main-menu/web-socket-status.directive.js new file mode 100644 index 0000000000..4f847e72f7 --- /dev/null +++ b/awx/ui/static/js/main-menu/web-socket-status.directive.js @@ -0,0 +1,18 @@ +/* jshint unused: vars */ + +export default ['$rootScope', function($rootScope) { + return { + restrict: 'E', + templateUrl: '/static/js/main-menu/web-socket-status.partial.html', + link: function(scope, element, attrs) { + scope.socketHelp = $rootScope.socketHelp; + scope.socketTip = $rootScope.socketTip; + $rootScope.$watch('socketStatus', function(newStatus) { + scope.socketStatus = newStatus; + }); + $rootScope.$watch('socketTip', function(newTip) { + scope.socketTip = newTip; + }); + } + }; +}]; diff --git a/awx/ui/static/js/main-menu/web-socket-status.partial.html b/awx/ui/static/js/main-menu/web-socket-status.partial.html new file mode 100644 index 0000000000..3d3ee3f15d --- /dev/null +++ b/awx/ui/static/js/main-menu/web-socket-status.partial.html @@ -0,0 +1,13 @@ + + diff --git a/awx/ui/static/js/setup-menu/hover-icon.block.less b/awx/ui/static/js/setup-menu/hover-icon.block.less new file mode 100644 index 0000000000..022e29ac5f --- /dev/null +++ b/awx/ui/static/js/setup-menu/hover-icon.block.less @@ -0,0 +1,47 @@ +/** @define HoverIcon */ + +@import 'shared/branding/colors.less'; + +.HoverIcon { + @media screen and (max-width: 571px) { + &--onlyLarge { + .HoverIcon-icon--opacity { + opacity: 1; + } + .HoverIcon-icon--height { + height: 22px; + } + } + } + &-icon { + width: auto; + &--color { + g, path { + transition: fill 0.15s ease-out; + } + } + &--opacity { + transition: opacity 0.3s ease-out; + opacity: 0; + } + &--height { + transition: height 0.2s ease-out; + height: 0; + } + } + &:hover { + .HoverIcon-icon { + &--opacity { + opacity: 1; + } + &--height { + height: 22px; + } + &--color { + path, g { + fill: @blue; + } + } + } + } +} diff --git a/awx/ui/static/js/setup-menu/main.js b/awx/ui/static/js/setup-menu/main.js new file mode 100644 index 0000000000..4fe296a944 --- /dev/null +++ b/awx/ui/static/js/setup-menu/main.js @@ -0,0 +1,16 @@ +import route from './setup.route'; +import icon from 'tower/shared/icon/main'; + +export default + angular.module('setupMenu', + [ 'AboutAnsibleHelpModal', + 'ConfigureTowerHelper', + 'CreateCustomInventoryHelper', + icon.name + ]) + .config(['$routeProvider', function($routeProvider) { + var url = route.route; + delete route.route; + $routeProvider.when(url, route); + }]); + diff --git a/awx/ui/static/js/setup-menu/setup-extra.block.less b/awx/ui/static/js/setup-menu/setup-extra.block.less new file mode 100644 index 0000000000..c61a5e5c5d --- /dev/null +++ b/awx/ui/static/js/setup-menu/setup-extra.block.less @@ -0,0 +1,14 @@ +/** @define SetupExtra */ + +.SetupExtra { + &-itemTitle { + font-size: 1.4rem; + font-weight: bold; + } + &-itemDescription { + font-family: merriweather; + font-size: 1rem; + font-weight: lighter; + font-style: italic; + } +} diff --git a/awx/ui/static/js/setup-menu/setup-item.block.less b/awx/ui/static/js/setup-menu/setup-item.block.less new file mode 100644 index 0000000000..c62fc60d25 --- /dev/null +++ b/awx/ui/static/js/setup-menu/setup-item.block.less @@ -0,0 +1,88 @@ +/** @define SetupItem */ + +@import 'shared/branding/colors.less'; + +.SetupItem { + + @icon-small-size: 2.4rem; + @icon-large-size: 3.4rem; + + &--aside { + padding-bottom: @vertical-basis / 2; + } + + @vertical-basis: 1.4rem; + + padding: @vertical-basis 0; + + color: black; + flex: 1 0 100%; + transition: background-color 0.15s ease-in-out; + background-color: white; + + &:hover, &:focus, &:active { + color: black; + } + + &--hoverable { + &:hover { + background-color: lighten(@ansible-red, 28%); + } + } + + &-icon { + // height: 28px; + &--aside { + align-self: flex-start; + } + + // For some reason, credentials + // icon is taking up more space + // than it should; need to adjust + // it manually to line it up with + // others + &--credentials { + width: 4.3rem; + margin-left: -0.8rem; + } + + flex: none; // do not let the flex container adjust this width! + width: @icon-large-size; + align-self: center; + } + + &--noIcon { + margin-left: @icon-large-size + 1.4rem; // 1.4rem comes from Media-figure margin + } + + &--button { + border: 0; + text-align: left; + outline: none; + .SetupItem-icon { + // width: 100%; + } + } + + &-title { + &--aside { + font-size: 1.4rem; + font-weight: bold; + } + font-size: 2.8rem; + padding-bottom: 0.4rem; + margin: 0; + } + + &-description { + &--aside { + font-size: 1rem; + font-style: italic; + } + font-family: merriweather; + font-weight: lighter; + color: black; + font-size: 1.4rem; + margin: 0; + } +} diff --git a/awx/ui/static/js/setup-menu/setup-menu.block.less b/awx/ui/static/js/setup-menu/setup-menu.block.less new file mode 100644 index 0000000000..080f54963e --- /dev/null +++ b/awx/ui/static/js/setup-menu/setup-menu.block.less @@ -0,0 +1,12 @@ +/** @define SetupMenu */ + +@import "shared/branding/colors.less"; + +.SetupMenu { + display: flex; + width: 100%; + flex-direction: row; + justify-content: flex-start; + flex-wrap: wrap; + margin-left: -1rem; +} diff --git a/awx/ui/static/js/setup-menu/setup-menu.partial.html b/awx/ui/static/js/setup-menu/setup-menu.partial.html new file mode 100644 index 0000000000..06696b2e8d --- /dev/null +++ b/awx/ui/static/js/setup-menu/setup-menu.partial.html @@ -0,0 +1,80 @@ +
+ + +
diff --git a/awx/ui/static/js/setup-menu/setup.controller.js b/awx/ui/static/js/setup-menu/setup.controller.js new file mode 100644 index 0000000000..f55c4ddc91 --- /dev/null +++ b/awx/ui/static/js/setup-menu/setup.controller.js @@ -0,0 +1,27 @@ +export default + [ '$scope', + '$rootScope', + 'AboutAnsibleHelp', + 'ConfigureTower', + 'CreateCustomInventory', + function( + $scope, + $rootScope, + showAboutModal, + configureTower, + showInventoryScriptsModal + ) { + $scope.showAboutModal = showAboutModal; + + $scope.showManagementJobsModal = + configureTower.bind(null, + { scope: $rootScope, + parent_scope: $rootScope + }); + + $scope.showInventoryScriptsModal = showInventoryScriptsModal.bind(null, + { parent_scope: $rootScope + }); + + } + ]; diff --git a/awx/ui/static/js/setup-menu/setup.route.js b/awx/ui/static/js/setup-menu/setup.route.js new file mode 100644 index 0000000000..5483126085 --- /dev/null +++ b/awx/ui/static/js/setup-menu/setup.route.js @@ -0,0 +1,8 @@ +import controller from './setup.controller'; + +export default { + name: 'setup', + route: '/setup', + controller: controller, + templateUrl: '/static/js/setup-menu/setup-menu.partial.html' +}; diff --git a/awx/ui/static/js/shared/branding/colors.less b/awx/ui/static/js/shared/branding/colors.less index 2bdc87d4eb..39c25cdd58 100644 --- a/awx/ui/static/js/shared/branding/colors.less +++ b/awx/ui/static/js/shared/branding/colors.less @@ -22,3 +22,4 @@ @red: #ff5850; @red-hover: #FA8C87; @red-focus: #FF1105; +@ansible-red: #FF5850; diff --git a/awx/ui/static/js/shared/button.block.less b/awx/ui/static/js/shared/button.block.less new file mode 100644 index 0000000000..dceb1d51d2 --- /dev/null +++ b/awx/ui/static/js/shared/button.block.less @@ -0,0 +1,16 @@ +/** @define Button */ + +@import 'shared/branding/colors.less'; + +.Button { + &--pseudo { + // Make pseudo button + background: transparent; + border: 0; + padding: 0; + color: @blue-link; + text-align: left; + + outline: none; + } +} diff --git a/awx/ui/static/js/shared/container/container.block.less b/awx/ui/static/js/shared/container/container.block.less new file mode 100644 index 0000000000..6b710a4ec4 --- /dev/null +++ b/awx/ui/static/js/shared/container/container.block.less @@ -0,0 +1,19 @@ +/** @define Container */ + +.Container { + display: flex; + flex-wrap: wrap; + &-main { + flex: 6; + margin-right: 2.28rem; + } + &-aside { + flex: 3; + } +} + +@media screen and (max-width: 710px) { + .Container { + flex-direction: column; + } +} diff --git a/awx/ui/static/js/shared/detail-nav/detail-nav.block.less b/awx/ui/static/js/shared/detail-nav/detail-nav.block.less new file mode 100644 index 0000000000..0209752707 --- /dev/null +++ b/awx/ui/static/js/shared/detail-nav/detail-nav.block.less @@ -0,0 +1,12 @@ +/** @define DetailNav */ + +.DetailNav { + + &-title { + font-size: 1.4rem; + margin-bottom: 0.4rem; + &:first-child { + margin-top: 0; + } + } +} diff --git a/awx/ui/static/js/shared/icon/icon.block.less b/awx/ui/static/js/shared/icon/icon.block.less new file mode 100644 index 0000000000..5cff28b209 --- /dev/null +++ b/awx/ui/static/js/shared/icon/icon.block.less @@ -0,0 +1,7 @@ +/** @define Icon */ + +.Icon { + path, g { + fill: #242424; + } +} diff --git a/awx/ui/static/js/shared/icon/icon.directive.js b/awx/ui/static/js/shared/icon/icon.directive.js new file mode 100644 index 0000000000..b0735704fb --- /dev/null +++ b/awx/ui/static/js/shared/icon/icon.directive.js @@ -0,0 +1,29 @@ +export default function() { + return { + restrict: 'E', + templateUrl: '/static/js/shared/icon/icon.partial.html', + scope: { + }, + link: function(scope, element, attrs) { + var svg = $('svg', element); + var iconPath = '#' + attrs.name; + + // Make a copy of the tag to insert its contents into this + // element's svg tag + var content = $(iconPath).clone(); + + // Copy classes & viewBox off the so that we preserve any styling + // when we copy the item inline + var classes = $(iconPath).attr('class'); + + // viewBox needs to be access via native + // javascript's setAttribute function + var viewBox = $(iconPath)[0].getAttribute('viewBox'); + + svg[0].setAttribute('viewBox', viewBox); + svg.attr('class', classes) + .html(content.contents()); + + } + }; +} diff --git a/awx/ui/static/js/shared/icon/icon.partial.html b/awx/ui/static/js/shared/icon/icon.partial.html new file mode 100644 index 0000000000..7640e25707 --- /dev/null +++ b/awx/ui/static/js/shared/icon/icon.partial.html @@ -0,0 +1,2 @@ + + diff --git a/awx/ui/static/js/shared/icon/include-svg.directive.js b/awx/ui/static/js/shared/icon/include-svg.directive.js new file mode 100644 index 0000000000..13556de1f3 --- /dev/null +++ b/awx/ui/static/js/shared/icon/include-svg.directive.js @@ -0,0 +1,12 @@ +export default ['$http', function($http) { + return { + restrict: 'E', + link: function(scope, element, attrs) { + var path = attrs.href; + + $http.get(path).then(function(response) { + element.append(response.data); + }); + } + }; +}]; diff --git a/awx/ui/static/js/shared/icon/main.js b/awx/ui/static/js/shared/icon/main.js new file mode 100644 index 0000000000..e880aa9d54 --- /dev/null +++ b/awx/ui/static/js/shared/icon/main.js @@ -0,0 +1,7 @@ +import icon from './icon.directive'; +import includeSvg from './include-svg.directive'; + +export default + angular.module('awIcon', []) + .directive('awIcon', icon) + .directive('includeSvg', includeSvg); diff --git a/awx/ui/static/js/shared/media-object.block.less b/awx/ui/static/js/shared/media-object.block.less new file mode 100644 index 0000000000..085999154f --- /dev/null +++ b/awx/ui/static/js/shared/media-object.block.less @@ -0,0 +1,14 @@ +/** @define Media */ + +.Media { + display: flex; + align-items: flex-start; + + &-figure { + margin-right: 1.4rem; + } + + &-body { + flex: 1; + } +} diff --git a/awx/ui/static/js/shared/route-extensions/link-to.directive.js b/awx/ui/static/js/shared/route-extensions/link-to.directive.js index 5528717abd..42d83ede9f 100644 --- a/awx/ui/static/js/shared/route-extensions/link-to.directive.js +++ b/awx/ui/static/js/shared/route-extensions/link-to.directive.js @@ -53,6 +53,11 @@ export default 'transitionTo', function($routeProvider, $location, transitionTo) { + function transitionListener(routeName, model, e) { + e.stopPropagation(); + e.preventDefault(); + transitionTo(routeName, model); + } return { restrict: 'A', scope: { @@ -60,16 +65,25 @@ export default model: '&' }, link: function (scope, element, attrs) { - var model = scope.$eval(scope.model); - scope.url = lookupRouteUrl(scope.routeName, $routeProvider.routes, model, $location.$$html5); - element.find('[data-transition-to]').on('click', function(e) { - e.stopPropagation(); - e.preventDefault(); - transitionTo(scope.routeName, model); - }); + var listener; + + scope.$watch(function() { + var model = scope.$eval(scope.model); + return model; + }, function(newValue) { + + var model = scope.$eval(scope.model); + scope.url = lookupRouteUrl(scope.routeName, $routeProvider.routes, model, $location.$$html5); + element.off('click', listener); + + listener = _.partial(transitionListener, scope.routeName, model); + + element.on('click', listener); + + element.attr('href', scope.url); + }, true); - element.attr('href', scope.url); } }; } diff --git a/awx/ui/static/js/shared/title.directive.js b/awx/ui/static/js/shared/title.directive.js index e8394d5824..e0f1d0c13b 100644 --- a/awx/ui/static/js/shared/title.directive.js +++ b/awx/ui/static/js/shared/title.directive.js @@ -2,6 +2,10 @@ export default function() { return function(scope, element, attrs) { + if (attrs.awToolTip) { + return; + } + element.tooltip(); }; } diff --git a/awx/ui/static/js/shared/utilities/icons.less b/awx/ui/static/js/shared/utilities/icons.less new file mode 100644 index 0000000000..805c2ec335 --- /dev/null +++ b/awx/ui/static/js/shared/utilities/icons.less @@ -0,0 +1,16 @@ +@import "components-font-awesome/less/variables.less"; + +/* not bem */ + +.icon(@icon-var) { + display: flex; + align-self: center; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + content: @icon-var; +} diff --git a/awx/ui/static/js/shared/utilities/layer.less b/awx/ui/static/js/shared/utilities/layer.less new file mode 100644 index 0000000000..e5af025d5b --- /dev/null +++ b/awx/ui/static/js/shared/utilities/layer.less @@ -0,0 +1,4 @@ +.u-layer { + position: relative; + z-index: 10000; +} diff --git a/awx/ui/static/js/shared/utilities/truncated-text.less b/awx/ui/static/js/shared/utilities/truncated-text.less new file mode 100644 index 0000000000..938ed45bcc --- /dev/null +++ b/awx/ui/static/js/shared/utilities/truncated-text.less @@ -0,0 +1,4 @@ +.u-truncatedText { + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/awx/ui/static/js/tmp.less b/awx/ui/static/js/tmp.less deleted file mode 100644 index 621cf94742..0000000000 --- a/awx/ui/static/js/tmp.less +++ /dev/null @@ -1,11 +0,0 @@ -/** @define Component */ - -.Component { - &-title { - diddy: doo; - } - .diddy { - dah: doody; - } - doo: dah; -} diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index b9147c85b4..f0dae5bc79 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -22,6 +22,7 @@ } @import "../js/shared/branding/colors.less"; +@import "fonts.less"; @import "main-layout.less"; @import "animations.less"; @import "jquery-ui-overrides.less"; @@ -1901,8 +1902,6 @@ tr td button i { } - - /* Landscape phone to portrait tablet */ @media (max-width: 767px) { diff --git a/awx/ui/static/less/breadcrumbs.less b/awx/ui/static/less/breadcrumbs.less index 01be1cc388..523fda2e6c 100644 --- a/awx/ui/static/less/breadcrumbs.less +++ b/awx/ui/static/less/breadcrumbs.less @@ -25,7 +25,7 @@ color: @black; font-weight: normal; text-decoration: none; - padding: 3px 8px 3px 20px; + padding: 3px 8px 3px 16px; background: @white; /* fallback color */ position: relative; left: 0; @@ -39,6 +39,7 @@ .ansible-breadcrumb li:first-child a{ border-top-left-radius: 4px; border-bottom-left-radius: 4px; + padding-left: 11px; } .ansible-breadcrumb li.active a { diff --git a/awx/ui/static/less/fonts.less b/awx/ui/static/less/fonts.less new file mode 100644 index 0000000000..9dcf8cab5b --- /dev/null +++ b/awx/ui/static/less/fonts.less @@ -0,0 +1,19 @@ +.include-font(@family-name; @filename; @weight: normal; @style: normal) { + @font-face { + font-family: @family-name; + src: url("/static/fonts/@{filename}.woff2") format('woff2'), + url("/static/fonts/@{filename}.woff") format('woff'); + font-weight: @weight; + font-style: @style; + } +} + +.include-font('merriweather'; 'merriweather_light-webfont'; 200); +.include-font('merriweather'; 'merriweather-regular-webfont'); +.include-font('merriweather'; 'merriweather-bold-webfont'; bold); +.include-font('merriweather'; 'merriweather_ultrabold-webfont'; 800); +.include-font('merriweather'; 'merriweather-lightitalic-webfont'; 200; italic); +.include-font('merriweather'; 'merriweather-bolditalic-webfont'; bold; italic); +.include-font('merriweather'; 'merriweather-heavyitalic-webfont'; 800; italic); +.include-font('merriweather'; 'merriweather-italic-webfont'; normal; italic); + diff --git a/awx/ui/static/less/main-layout.less b/awx/ui/static/less/main-layout.less index d6b932d35b..e0fc9de3bc 100644 --- a/awx/ui/static/less/main-layout.less +++ b/awx/ui/static/less/main-layout.less @@ -9,15 +9,11 @@ html, body { height: 100%; } -html { - background-color: @white; -} - body { font-family: 'Open Sans', sans-serif; font-weight: 400; - padding-top: 75px; color: @black; + padding-top: 75px; } #main-menu-container { diff --git a/awx/ui/static/lib/angular/index.js b/awx/ui/static/lib/angular/index.js new file mode 100644 index 0000000000..5c1aafcca2 --- /dev/null +++ b/awx/ui/static/lib/angular/index.js @@ -0,0 +1,2 @@ +require('./angular'); +module.exports = angular; diff --git a/awx/ui/static/lib/angular/package.json b/awx/ui/static/lib/angular/package.json new file mode 100644 index 0000000000..abfd51463e --- /dev/null +++ b/awx/ui/static/lib/angular/package.json @@ -0,0 +1,25 @@ +{ + "name": "angular", + "version": "1.3.15", + "description": "HTML enhanced for web apps", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/angular/angular.js.git" + }, + "keywords": [ + "angular", + "framework", + "browser", + "client-side" + ], + "author": "Angular Core Team ", + "license": "MIT", + "bugs": { + "url": "https://github.com/angular/angular.js/issues" + }, + "homepage": "http://angularjs.org" +} diff --git a/awx/ui/static/lib/jPushMenu/jPushMenu.css b/awx/ui/static/lib/jPushMenu/jPushMenu.css deleted file mode 100644 index 2dfc6327e8..0000000000 --- a/awx/ui/static/lib/jPushMenu/jPushMenu.css +++ /dev/null @@ -1,167 +0,0 @@ -/* General styles for all menus */ - -.cbp-spmenu { - background: #47a3da; - position: fixed; -} - -.cbp-spmenu h3 { - color: #afdefa; - font-size: 1.9em; - padding: 20px; - margin: 0; - font-weight: 300; - background: #0d77b6; -} - -.cbp-spmenu a { - display: block; - color: #fff; - font-size: 1.1em; - font-weight: 300; -} - -.cbp-spmenu a:hover { - background: #258ecd; -} - -.cbp-spmenu a:active { - background: #afdefa; - color: #47a3da; -} - -/* Orientation-dependent styles for the content of the menu */ - -.cbp-spmenu-vertical { - width: 240px; - height: 100%; - top: 0; - z-index: 1100; -} - -.cbp-spmenu-vertical a { - border-bottom: 1px solid #258ecd; - padding: 1em; -} - -.cbp-spmenu-horizontal { - width: 100%; - height: 150px; - left: 0; - z-index: 1000; - overflow: hidden; -} - -.cbp-spmenu-horizontal h3 { - height: 100%; - width: 20%; - float: left; -} - -.cbp-spmenu-horizontal a { - float: left; - width: 20%; - padding: 0.8em; - border-left: 1px solid #258ecd; -} - -/* Vertical menu that slides from the left or right */ - -.cbp-spmenu-left { - left: -240px; -} - -.cbp-spmenu-right { - right: -240px; -} - -.cbp-spmenu-left.cbp-spmenu-open { - left: 0px; -} - -.cbp-spmenu-right.cbp-spmenu-open { - right: 0px; -} - -/* Horizontal menu that slides from the top or bottom */ - -.cbp-spmenu-top { - top: -150px; -} - -.cbp-spmenu-bottom { - bottom: -150px; -} - -.cbp-spmenu-top.cbp-spmenu-open { - top: 0px; -} - -.cbp-spmenu-bottom.cbp-spmenu-open { - bottom: 0px; -} - -/* Push classes applied to the body */ - -.cbp-spmenu-push { - overflow-x: hidden; - position: relative; - left: 0; -} - -.cbp-spmenu-push-toright { - left: 240px; -} - -.cbp-spmenu-push-toleft { - left: -240px; -} - -/* Transitions */ - -.cbp-spmenu, -.cbp-spmenu-push { - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; - transition: all 0.3s ease; -} - -/* Example media queries */ - -@media screen and (max-width: 55.1875em){ - - .cbp-spmenu-horizontal { - font-size: 75%; - height: 110px; - } - - .cbp-spmenu-top { - top: -110px; - } - - .cbp-spmenu-bottom { - bottom: -110px; - } - -} - -@media screen and (max-height: 26.375em){ - - .cbp-spmenu-vertical { - font-size: 90%; - width: 190px; - } - - .cbp-spmenu-left, - .cbp-spmenu-push-toleft { - left: -190px; - } - - .cbp-spmenu-right { - right: -190px; - } - - .cbp-spmenu-push-toright { - left: 190px; - } -} \ No newline at end of file diff --git a/awx/ui/static/lib/jPushMenu/jPushMenu.js b/awx/ui/static/lib/jPushMenu/jPushMenu.js deleted file mode 100644 index c21bb21f6b..0000000000 --- a/awx/ui/static/lib/jPushMenu/jPushMenu.js +++ /dev/null @@ -1,99 +0,0 @@ -/*! - * jPushMenu.js - * 1.1.1 - * @author: takien - * http://takien.com - * Original version (pure JS) is created by Mary Lou http://tympanus.net/ - */ - -(function($) { - $.fn.jPushMenu = function(customOptions) { - var jPushMenu, - o = $.extend({}, $.fn.jPushMenu.defaultOptions, customOptions); - - /* add class to the body.*/ - - $('body').addClass(o.bodyClass); - $(this).addClass('jPushMenuBtn'); - $(this).click(function() { - var target = '', - push_direction = ''; - - if($(this).is('.'+o.showLeftClass)) { - target = '.cbp-spmenu-left'; - push_direction = 'toright'; - } - else if($(this).is('.'+o.showRightClass)) { - target = '.cbp-spmenu-right'; - push_direction = 'toleft'; - } - else if($(this).is('.'+o.showTopClass)) { - target = '.cbp-spmenu-top'; - } - else if($(this).is('.'+o.showBottomClass)) { - target = '.cbp-spmenu-bottom'; - } - - - $(this).toggleClass(o.activeClass); - $(target).toggleClass(o.menuOpenClass); - - if ($(this).is('.'+o.pushBodyClass)) { - $('body').toggleClass( 'cbp-spmenu-push-'+push_direction ); - } - - /* disable all other button*/ - $('.jPushMenuBtn').not($(this)).toggleClass('disabled'); - - return false; - }); - jPushMenu = { - close: function () { - $('.jPushMenuBtn,body,.cbp-spmenu').removeClass('disabled active cbp-spmenu-open cbp-spmenu-push-toleft cbp-spmenu-push-toright'); - } - }; - - if (o.closeOnClickInside) { - $(document).click(function() { - jPushMenu.close(); - }); - - $('.cbp-spmenu,.toggle-menu').click(function(e){ - e.stopPropagation(); - }); - } - - if (o.closeOnClickOutside) { - $(document).click(function() { - jPushMenu.close(); - }); - - $('.cbp-spmenu,.toggle-menu').click(function(e){ - e.stopPropagation(); - }); - } - - // On Click Link - if (o.closeOnClickLink) { - $('.cbp-spmenu a').on('click',function(){ - jPushMenu.close(); - }); - } - }; - /* in case you want to customize class name, - * do not directly edit here, use function parameter when call jPushMenu. - */ - $.fn.jPushMenu.defaultOptions = { - bodyClass : 'cbp-spmenu-push', - activeClass : 'menu-active', - showLeftClass : 'menu-left', - showRightClass : 'menu-right', - showTopClass : 'menu-top', - showBottomClass : 'menu-bottom', - menuOpenClass : 'cbp-spmenu-open', - pushBodyClass : 'push-body', - closeOnClickOutside: true, - closeOnClickInside: true, - closeOnClickLink: true - }; -})(jQuery); \ No newline at end of file diff --git a/awx/ui/static/lib/nvd3/build/nv.d3.css b/awx/ui/static/lib/nvd3/build/nv.d3.css index 26453e88f4..e60a4deacc 100644 --- a/awx/ui/static/lib/nvd3/build/nv.d3.css +++ b/awx/ui/static/lib/nvd3/build/nv.d3.css @@ -3,19 +3,6 @@ */ -svg { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - /* Trying to get SVG to act like a greedy block in all browsers */ - display: block; - width:100%; - height:100%; -} - /******************** Default CSS for an svg element nvd3 used */ @@ -642,4 +629,4 @@ Interactive Layer } .nvd3 line.nv-guideline { stroke: #ccc; -} \ No newline at end of file +} diff --git a/awx/ui/static/partials/credentials.html b/awx/ui/static/partials/credentials.html index 83e8dedf50..089d6cf399 100644 --- a/awx/ui/static/partials/credentials.html +++ b/awx/ui/static/partials/credentials.html @@ -1,4 +1,5 @@ + + + + - + - + + -