diff --git a/awx/ui/static/js/widgets/Stream.js b/awx/ui/static/js/widgets/Stream.js index 51f1a8444f..7a911bce5f 100644 --- a/awx/ui/static/js/widgets/Stream.js +++ b/awx/ui/static/js/widgets/Stream.js @@ -178,40 +178,42 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti var generator = GenerateForm; var form = ActivityDetailForm; var activity = Find({list: parent_scope.activities, key: 'id', val: activity_id }); - - // Setup changes field - activity['changes'] = JSON.stringify(activity['changes'], null, '\t'); - var n = activity['changes'].match(/\n/g); - var rows = (n) ? n.length : 1; - rows = (rows < 1) ? 3 : 10; - form.fields['changes'].rows = 10; - - // Load the form - var scope = generator.inject(form, { mode: 'edit', modal: true, related: false }); - scope['changes'] = activity['changes']; - scope['user'] = ( (activity.summary_fields.actor) ? activity.summary_fields.actor.username : 'system' ) + - ' on ' + FormatDate(new Date(activity['timestamp'])); - scope['operation'] = activity['description_nolink']; - - scope.formModalAction = function() { - $('#form-modal').modal("hide"); - } - - $('#form-modal').on('show.bs.modal', function (e) { - $('#form-modal-body').css({ - width:'auto', //probably not needed - height:'auto', //probably not needed - 'max-height':'100%' - }); - }); - scope.formModalActionLabel = 'OK'; - scope.formModalCancelShow = false; - scope.formModalInfo = false; - scope.formModalHeader = "Event " + activity.id; - - if (!scope.$$phase) { - scope.$digest(); + if (activity) { + // Setup changes field + activity['changes'] = JSON.stringify(activity['changes'], null, '\t'); + var n = activity['changes'].match(/\n/g); + var rows = (n) ? n.length : 1; + rows = (rows < 1) ? 3 : 10; + form.fields['changes'].rows = 10; + + // Load the form + var scope = generator.inject(form, { mode: 'edit', modal: true, related: false }); + scope['changes'] = activity['changes']; + scope['user'] = ( (activity.summary_fields.actor) ? activity.summary_fields.actor.username : 'system' ) + + ' on ' + FormatDate(new Date(activity['timestamp'])); + scope['operation'] = activity['description_nolink']; + + scope.formModalAction = function() { + $('#form-modal').modal("hide"); + } + + $('#form-modal').on('show.bs.modal', function (e) { + $('#form-modal-body').css({ + width:'auto', //probably not needed + height:'auto', //probably not needed + 'max-height':'100%' + }); + }); + + scope.formModalActionLabel = 'OK'; + scope.formModalCancelShow = false; + scope.formModalInfo = false; + scope.formModalHeader = "Event " + activity.id; + + if (!scope.$$phase) { + scope.$digest(); + } } } diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 414a1ebeea..a9d5760afb 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -1078,7 +1078,7 @@ input[type="checkbox"].checkbox-no-label { .droppable-hover { background-color: @info; color: @info-color; - padding: 5px; + padding: 6px; border: 1px solid @info-border; border-radius: 4px; } diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index 3f506fa9dd..4bfae109d5 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -534,7 +534,8 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService']) start: function(e, ui) { ui.helper.addClass('draggable-clone'); }, - zIndex: 100 + zIndex: 100, + cursorAt: { left: -1 } }); } @@ -607,7 +608,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService']) scope.$emit('CopyMoveHost', $(this).attr('data-tree-id'), ui.draggable.attr('data-host-id')); } }, - tolerance: 'touch' + tolerance: 'pointer' }); }