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:
chouseknecht
2013-10-15 13:15:12 -04:00
parent edc0f2f774
commit dbdf94d945
5 changed files with 19 additions and 11 deletions

View File

@@ -274,11 +274,15 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', '
scope.removeShowHelp();
}
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.$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) {

View File

@@ -569,7 +569,10 @@ angular.module('InventoryHelper', [ 'RestServices', 'Utilities', 'OrganizationLi
Rest.setUrl(url);
Rest.get()
.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) {
ProcessErrors(scope, data, status, form,

View File

@@ -113,9 +113,11 @@ angular.module('InventorySummaryDefinition', [])
icon: "icon-question-sign",
mode: 'all',
'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',
ngClick: "showHelp()"
ngClick: "showHelp()",
id: "inventory-summary-help"
},
refresh: {
awRefresh: true,