From fd0c67be0c6c78f49e460a0defb77fcd91e842c0 Mon Sep 17 00:00:00 2001 From: gconsidine Date: Mon, 26 Jun 2017 16:23:05 -0400 Subject: [PATCH] Remove unused components --- awx/ui/client/lib/components/_index.less | 2 - .../lib/components/action/link.directive.js | 0 .../lib/components/action/link.partial.html | 0 awx/ui/client/lib/components/index.js | 10 ---- .../lib/components/input/number.directive.js | 54 ------------------- .../lib/components/input/number.partial.html | 19 ------- .../client/lib/components/search/_index.less | 37 ------------- .../lib/components/search/key.directive.js | 38 ------------- .../lib/components/search/key.partial.html | 23 -------- .../lib/components/search/search.directive.js | 50 ----------------- .../lib/components/search/search.partial.html | 27 ---------- .../client/lib/components/table/_index.less | 3 -- .../lib/components/table/table.directive.js | 36 ------------- .../lib/components/table/table.partial.html | 27 ---------- 14 files changed, 326 deletions(-) delete mode 100644 awx/ui/client/lib/components/action/link.directive.js delete mode 100644 awx/ui/client/lib/components/action/link.partial.html delete mode 100644 awx/ui/client/lib/components/input/number.directive.js delete mode 100644 awx/ui/client/lib/components/input/number.partial.html delete mode 100644 awx/ui/client/lib/components/search/_index.less delete mode 100644 awx/ui/client/lib/components/search/key.directive.js delete mode 100644 awx/ui/client/lib/components/search/key.partial.html delete mode 100644 awx/ui/client/lib/components/search/search.directive.js delete mode 100644 awx/ui/client/lib/components/search/search.partial.html delete mode 100644 awx/ui/client/lib/components/table/_index.less delete mode 100644 awx/ui/client/lib/components/table/table.directive.js delete mode 100644 awx/ui/client/lib/components/table/table.partial.html diff --git a/awx/ui/client/lib/components/_index.less b/awx/ui/client/lib/components/_index.less index f7b6d078a3..729d577b54 100644 --- a/awx/ui/client/lib/components/_index.less +++ b/awx/ui/client/lib/components/_index.less @@ -3,7 +3,5 @@ @import 'modal/_index'; @import 'panel/_index'; @import 'popover/_index'; -@import 'search/_index'; @import 'tabs/_index'; -@import 'table/_index'; @import 'utility/_index'; diff --git a/awx/ui/client/lib/components/action/link.directive.js b/awx/ui/client/lib/components/action/link.directive.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/awx/ui/client/lib/components/action/link.partial.html b/awx/ui/client/lib/components/action/link.partial.html deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/awx/ui/client/lib/components/index.js b/awx/ui/client/lib/components/index.js index b75e6beca4..e9a79c8d4c 100644 --- a/awx/ui/client/lib/components/index.js +++ b/awx/ui/client/lib/components/index.js @@ -7,8 +7,6 @@ import inputGroup from './input/group.directive'; import inputLabel from './input/label.directive'; import inputLookup from './input/lookup.directive'; import inputMessage from './input/message.directive'; -import inputNumber from './input/number.directive'; -import inputSelect from './input/select.directive'; import inputSecret from './input/secret.directive'; import inputText from './input/text.directive'; import inputTextarea from './input/textarea.directive'; @@ -18,11 +16,8 @@ import panel from './panel/panel.directive'; import panelHeading from './panel/heading.directive'; import panelBody from './panel/body.directive'; import popover from './popover/popover.directive'; -import search from './search/search.directive'; -import searchKey from './search/key.directive'; import tab from './tabs/tab.directive'; import tabGroup from './tabs/group.directive'; -import table from './table/table.directive'; import BaseInputController from './input/base.controller'; @@ -37,9 +32,7 @@ angular .directive('atInputLabel', inputLabel) .directive('atInputLookup', inputLookup) .directive('atInputMessage', inputMessage) - .directive('atInputNumber', inputNumber) .directive('atInputSecret', inputSecret) - .directive('atInputSelect', inputSelect) .directive('atInputText', inputText) .directive('atInputTextarea', inputTextarea) .directive('atInputTextareaSecret', inputTextareaSecret) @@ -48,11 +41,8 @@ angular .directive('atPanelHeading', panelHeading) .directive('atPanelBody', panelBody) .directive('atPopover', popover) - .directive('atSearch', search) - .directive('atSearchKey', searchKey) .directive('atTab', tab) .directive('atTabGroup', tabGroup) - .directive('atTable', table) .service('BaseInputController', BaseInputController); diff --git a/awx/ui/client/lib/components/input/number.directive.js b/awx/ui/client/lib/components/input/number.directive.js deleted file mode 100644 index be803212de..0000000000 --- a/awx/ui/client/lib/components/input/number.directive.js +++ /dev/null @@ -1,54 +0,0 @@ -const DEFAULT_STEP = '1'; -const DEFAULT_MIN = '0'; -const DEFAULT_MAX = '1000000000'; -const DEFAULT_PLACEHOLDER = ''; - -function atInputNumberLink (scope, element, attrs, controllers) { - let formController = controllers[0]; - let inputController = controllers[1]; - - if (scope.tab === '1') { - element.find('input')[0].focus(); - } - - inputController.init(scope, element, formController); -} - -function AtInputNumberController (baseInputController) { - let vm = this || {}; - - vm.init = (scope, element, form) => { - baseInputController.call(vm, 'input', scope, element, form); - - scope.state._step = scope.state._step || DEFAULT_STEP; - scope.state._min = scope.state._min || DEFAULT_MIN; - scope.state._max = scope.state._max || DEFAULT_MAX; - scope.state._placeholder = scope.state._placeholder || DEFAULT_PLACEHOLDER; - - vm.check(); - }; -} - -AtInputNumberController.$inject = ['BaseInputController']; - -function atInputNumber (pathService) { - return { - restrict: 'E', - transclude: true, - replace: true, - require: ['^^atForm', 'atInputNumber'], - templateUrl: pathService.getPartialPath('components/input/number'), - controller: AtInputNumberController, - controllerAs: 'vm', - link: atInputNumberLink, - scope: { - state: '=', - col: '@', - tab: '@' - } - }; -} - -atInputNumber.$inject = ['PathService']; - -export default atInputNumber; diff --git a/awx/ui/client/lib/components/input/number.partial.html b/awx/ui/client/lib/components/input/number.partial.html deleted file mode 100644 index 57aa355bfa..0000000000 --- a/awx/ui/client/lib/components/input/number.partial.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
- - - - - -
-
diff --git a/awx/ui/client/lib/components/search/_index.less b/awx/ui/client/lib/components/search/_index.less deleted file mode 100644 index 3d43a64664..0000000000 --- a/awx/ui/client/lib/components/search/_index.less +++ /dev/null @@ -1,37 +0,0 @@ -.at-Search-group--left { - padding-right: @at-margin-item-column; -} - -.at-Search-group--right { - padding-left: 0; -} - -.at-Search-well { - margin: @at-margin-top-search-key 0 0 0; - padding: @at-padding-well; -} - -.at-Search-well { - margin: @at-margin-top-search-key 0 0 0; - padding: @at-padding-well; -} - -.at-Search-toggle { - width: 100%; - - &, &:focus, &:visited, &:active { - background: @at-color-default; - cursor: pointer; - } -} - -.at-Search-toggle--active { - &, &:hover, &:focus, &:visited, &:active { - border: @at-color-search-key-active; - background: @at-color-search-key-active; - color: @at-color-default; - cursor: pointer; - } -} - - diff --git a/awx/ui/client/lib/components/search/key.directive.js b/awx/ui/client/lib/components/search/key.directive.js deleted file mode 100644 index b3a81bfcc4..0000000000 --- a/awx/ui/client/lib/components/search/key.directive.js +++ /dev/null @@ -1,38 +0,0 @@ -function atSearchKeyLink (scope, element, attrs, controllers) { - let searchController = controllers[0]; - let property = `scope.${scope.ns}.search`; - - let done = scope.$watch(property, () => { - searchController.init(scope, element); - done(); - }); -} - -function AtSearchKeyController () { - let vm = this || {}; - - vm.init = (scope, element) => { - /* - *vm.placeholder = DEFAULT_PLACEHOLDER; - *vm.search = scope[scope.ns].search; - */ - }; -} - -function atSearchKey (pathService) { - return { - restrict: 'E', - transclude: true, - replace: true, - require: ['atSearchKey'], - templateUrl: pathService.getPartialPath('components/search/key'), - controller: AtSearchKeyController, - controllerAs: 'vm', - link: atSearchKeyLink, - scope: true - }; -} - -atSearchKey.$inject = ['PathService']; - -export default atSearchKey; diff --git a/awx/ui/client/lib/components/search/key.partial.html b/awx/ui/client/lib/components/search/key.partial.html deleted file mode 100644 index d43fdb880a..0000000000 --- a/awx/ui/client/lib/components/search/key.partial.html +++ /dev/null @@ -1,23 +0,0 @@ -
-
-
-

EXAMPLES:

- -
-
-

FIELDS:

-
-
-
-

RELATED FIELDS:

-
-
-
-

ADDITIONAL INFORMATION:

-

- For additional information on advanced search search syntax please see the - Ansible Tower documentation. -

-
-
-
diff --git a/awx/ui/client/lib/components/search/search.directive.js b/awx/ui/client/lib/components/search/search.directive.js deleted file mode 100644 index 7237d85819..0000000000 --- a/awx/ui/client/lib/components/search/search.directive.js +++ /dev/null @@ -1,50 +0,0 @@ -const DEFAULT_PLACEHOLDER = 'SEARCH'; - -function atSearchLink (scope, element, attrs, controllers) { - let inputController = controllers[0]; - let property = `scope.${scope.ns}.search`; - - let done = scope.$watch(property, () => { - inputController.init(scope, element); - scope.ready = true; - done(); - }); -} - -function AtSearchController () { - let vm = this || {}; - - let toggleButton; - let input; - - vm.init = (scope, element) => { - toggleButton = element.find('.at-Search-toggle')[0]; - input = element.find('.at-Input')[0]; - - vm.placeholder = DEFAULT_PLACEHOLDER; - vm.search = scope[scope.ns].search; - }; - - vm.toggle = () => { - input.focus(); - vm.isToggleActive = !vm.isToggleActive; - }; -} - -function atSearch (pathService) { - return { - restrict: 'E', - transclude: true, - replace: true, - require: ['atSearch'], - templateUrl: pathService.getPartialPath('components/search/search'), - controller: AtSearchController, - controllerAs: 'vm', - link: atSearchLink, - scope: true - }; -} - -atSearch.$inject = ['PathService']; - -export default atSearch; diff --git a/awx/ui/client/lib/components/search/search.partial.html b/awx/ui/client/lib/components/search/search.partial.html deleted file mode 100644 index 178b5626c7..0000000000 --- a/awx/ui/client/lib/components/search/search.partial.html +++ /dev/null @@ -1,27 +0,0 @@ -
-
-
-
-
- - - - -
-
-
-
- -
-
-
- -
-
diff --git a/awx/ui/client/lib/components/table/_index.less b/awx/ui/client/lib/components/table/_index.less deleted file mode 100644 index d06d1e0d50..0000000000 --- a/awx/ui/client/lib/components/table/_index.less +++ /dev/null @@ -1,3 +0,0 @@ -.at-Table { - margin-top: @at-margin-panel; -} diff --git a/awx/ui/client/lib/components/table/table.directive.js b/awx/ui/client/lib/components/table/table.directive.js deleted file mode 100644 index 5836ea1e9b..0000000000 --- a/awx/ui/client/lib/components/table/table.directive.js +++ /dev/null @@ -1,36 +0,0 @@ -function atTableLink (scope, element, attrs, controllers) { - let tableController = controllers[0]; - - tableController.init(scope, element); -} - -function AtTableController (baseInputController) { - let vm = this || {}; - - vm.init = (scope, element) => { - - }; -} - -AtTableController.$inject = ['BaseInputController']; - -function atTable (pathService) { - return { - restrict: 'E', - transclude: true, - replace: true, - require: ['atTable'], - templateUrl: pathService.getPartialPath('components/table/table'), - controller: AtTableController, - controllerAs: 'vm', - link: atTableLink, - scope: { - state: '=', - col: '@' - } - }; -} - -atTable.$inject = ['PathService']; - -export default atTable; diff --git a/awx/ui/client/lib/components/table/table.partial.html b/awx/ui/client/lib/components/table/table.partial.html deleted file mode 100644 index 0ddafa044e..0000000000 --- a/awx/ui/client/lib/components/table/table.partial.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameKind
Cell OneCell Two
Cell OneCell Two
Cell OneCell Two
Cell OneCell Two