diff --git a/awx/ui/client/legacy-styles/ansible-ui.less b/awx/ui/client/legacy-styles/ansible-ui.less index a511ffa33f..8bd22b2f5f 100644 --- a/awx/ui/client/legacy-styles/ansible-ui.less +++ b/awx/ui/client/legacy-styles/ansible-ui.less @@ -2239,3 +2239,22 @@ button[disabled], html input[disabled] { cursor: not-allowed; } + +.CodeMirror--disabled .CodeMirror.cm-s-default, +.CodeMirror--disabled .CodeMirror-line { + background-color: #f6f6f6; +} + +.CodeMirror--disabled .CodeMirror-gutter.CodeMirror-lint-markers, +.CodeMirror--disabled .CodeMirror-gutter.CodeMirror-linenumbers { + background-color: #ebebeb; + color: @b7grey; +} + +.CodeMirror--disabled .CodeMirror-lines { + cursor: default; +} + +.CodeMirror--disabled .CodeMirror-cursors { + display: none; +} diff --git a/awx/ui/client/src/scheduler/schedulerDatePicker.directive.js b/awx/ui/client/src/scheduler/schedulerDatePicker.directive.js index 3268474803..bcd4cc031d 100644 --- a/awx/ui/client/src/scheduler/schedulerDatePicker.directive.js +++ b/awx/ui/client/src/scheduler/schedulerDatePicker.directive.js @@ -17,7 +17,8 @@ export default date: '=', minDate: '=', autoUpdate: '=?', - inputClass: '&' + inputClass: '&', + disabled: '=?' }, templateUrl: templateUrl('system-tracking/date-picker/date-picker'), link: function(scope, element, attrs) { diff --git a/awx/ui/client/src/scheduler/schedulerDatePicker.partial.html b/awx/ui/client/src/scheduler/schedulerDatePicker.partial.html index a2e88ab2c5..728285096f 100644 --- a/awx/ui/client/src/scheduler/schedulerDatePicker.partial.html +++ b/awx/ui/client/src/scheduler/schedulerDatePicker.partial.html @@ -1,6 +1,7 @@
- +
@@ -40,7 +41,8 @@ Start Date
- +
* *
@@ -252,6 +263,7 @@ *
@@ -638,11 +658,19 @@ + +
diff --git a/awx/ui/client/src/shared/directives.js b/awx/ui/client/src/shared/directives.js index 35b9e8716b..1a82e39daf 100644 --- a/awx/ui/client/src/shared/directives.js +++ b/awx/ui/client/src/shared/directives.js @@ -981,6 +981,15 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'JobsHelper']) } } }; + + // hack to get ngDisabled to work + if (attrs.ngDisabled) { + scope.$watch(attrs.ngDisabled, function(val) { + opts.disabled = (val === true) ? true : false; + $(elm).spinner(opts); + }); + } + if (disabled) { opts.disabled = true; } diff --git a/awx/ui/client/src/system-tracking/date-picker/date-picker.partial.html b/awx/ui/client/src/system-tracking/date-picker/date-picker.partial.html index 09bc001065..74bd409a6f 100644 --- a/awx/ui/client/src/system-tracking/date-picker/date-picker.partial.html +++ b/awx/ui/client/src/system-tracking/date-picker/date-picker.partial.html @@ -1,10 +1,11 @@
- + + ng-class="inputClass()" + ng-disabled="disabled">

{{error}}