mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Fixed auto display of help on Groups page. Rather than displaying dialog window, the tooltip for the help button auto displays when count of groups == 0. As soon as a group is created the tooltip no longer autodisplays.
This commit is contained in:
@@ -274,11 +274,15 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
|
|||||||
scope.removeShowHelp();
|
scope.removeShowHelp();
|
||||||
}
|
}
|
||||||
scope.removeShowHelp = scope.$on('ShowHelp', function() {
|
scope.removeShowHelp = scope.$on('ShowHelp', function() {
|
||||||
HelpDialog({ defn: InventorySummaryHelp });
|
// Force display fo help tooltip when no groups exist
|
||||||
|
$('#inventory-summary-help').focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
scope.showHelp = function() {
|
scope.showHelp = function() {
|
||||||
scope.$emit('ShowHelp');
|
// Display help dialog
|
||||||
|
$('.btn').blur(); //remove focus from the help button and all buttons
|
||||||
|
//this stops the tooltip from continually displaying
|
||||||
|
HelpDialog({ defn: InventorySummaryHelp });
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.viewUpdateStatus = function(id) {
|
scope.viewUpdateStatus = function(id) {
|
||||||
|
|||||||
@@ -569,7 +569,10 @@ angular.module('InventoryHelper', [ 'RestServices', 'Utilities', 'OrganizationLi
|
|||||||
Rest.setUrl(url);
|
Rest.setUrl(url);
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success( function(data, status, headers, config) {
|
.success( function(data, status, headers, config) {
|
||||||
scope.$emit('ShowHelp');
|
if (data.count == 0) {
|
||||||
|
// no groups exist, show help
|
||||||
|
scope.$emit('ShowHelp');
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.error( function(data, status, headers, config) {
|
.error( function(data, status, headers, config) {
|
||||||
ProcessErrors(scope, data, status, form,
|
ProcessErrors(scope, data, status, form,
|
||||||
|
|||||||
@@ -113,9 +113,11 @@ angular.module('InventorySummaryDefinition', [])
|
|||||||
icon: "icon-question-sign",
|
icon: "icon-question-sign",
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
'class': 'btn-xs btn-info btn-help',
|
'class': 'btn-xs btn-info btn-help',
|
||||||
awToolTip: 'Click for help',
|
awToolTip: "<div style=\"text-align: left;\"><p>Need help getting started creating your inventory?</p>" +
|
||||||
|
"<p>Click here for help with this page</p></div>",
|
||||||
iconSize: 'large',
|
iconSize: 'large',
|
||||||
ngClick: "showHelp()"
|
ngClick: "showHelp()",
|
||||||
|
id: "inventory-summary-help"
|
||||||
},
|
},
|
||||||
refresh: {
|
refresh: {
|
||||||
awRefresh: true,
|
awRefresh: true,
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ td.actions {
|
|||||||
.refresh-grp {
|
.refresh-grp {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-left: 10px;
|
margin-left: 0;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
@@ -575,11 +575,10 @@ select.field-mini-height {
|
|||||||
/* Display list actions next to search widget */
|
/* Display list actions next to search widget */
|
||||||
.list-actions {
|
.list-actions {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
|
||||||
|
|
||||||
|
button {
|
||||||
.btn-help {
|
margin-left: 8px;
|
||||||
margin-left: 15px;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End Display list actions */
|
/* End Display list actions */
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos
|
|||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$(element).tooltip({ placement: placement, delay: delay, title: attrs.awToolTip, container: 'body' });
|
$(element).tooltip({ placement: placement, delay: delay, html: true, title: attrs.awToolTip, container: 'body' });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user