Created new help widget and applied to Inventory-> Groups. Help can now be a movable dialog with images and text. Help definitions (objects) can include many steps to tell a story or walk through a process.

This commit is contained in:
chouseknecht
2013-10-15 02:56:39 -04:00
parent c563f040ba
commit 4bcda34c3c
18 changed files with 257 additions and 106 deletions

View File

@@ -105,11 +105,13 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
label.addClass('prepend-asterisk');
}
});
// Remove leftover timer, if any
//if ((!options.modal) && this.scope.timer) {
// clearInterval(this.scope.timer);
//}
try {
$('#help-modal').empty().dialog('destroy');
}
catch(e) {
//ignore any errors should the dialog not be initialized
}
if (options.modal) {
this.scope.formModalActionDisabled = false;
@@ -1198,12 +1200,12 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += this.breadCrumbs(options, navigation);
// build the groups page
html += "<div ng-show=\"showGroupHelp\" class=\"alert alert-dismissable alert-info\">\n";
html += "<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>\n";
html += "<p><strong>Hint:</strong> Get started building your inventory by adding a group. After creating a group, " +
"use the <a href=\"/#/inventories/\{\{ inventory_id \}\}/hosts\"><em>Inventories->Hosts</em></a> page to " +
"add hosts to the group.</p>";
html += "</div>\n";
//html += "<div ng-show=\"showGroupHelp\" class=\"alert alert-dismissable alert-info\">\n";
//html += "<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button>\n";
//html += "<p><strong>Hint:</strong> Get started building your inventory by adding a group. After creating a group " +
// "go to the <a href=\"/#/inventories/\{\{ inventory_id \}\}/hosts\"><em>Hosts</em></a> page to " +
// "add hosts to the group.</p>";
//html += "</div>\n";
/*
html += "<div class=\"row\">\n";