AC-525 Fixed inventory and job navigation issues. Fixed nagging horizontal scroll in dialogs with accordions.

This commit is contained in:
chouseknecht 2013-09-26 22:02:40 -04:00
parent 567605cc59
commit 7bfa0c4b0c
9 changed files with 42 additions and 17 deletions

View File

@ -19,7 +19,7 @@ angular.module('InventoryFormDefinition', [])
navigationLinks: {
inventory: {
href: "/#/inventories/{{ inventory_id }}",
label: "Inventory Properties",
label: "Properties",
icon: "icon-edit",
active: true
},

View File

@ -10,17 +10,19 @@ angular.module('JobFormDefinition', [])
.value(
'JobForm', {
addTitle: 'Create Job', //Legend in add mode
editTitle: '{{ id }} - {{ name }}', //Legend in edit mode
addTitle: 'Create Job',
editTitle: '{{ id }} - {{ name }}',
name: 'jobs',
well: true,
collapse: true,
collapseMode: 'edit',
collapseTitle: 'Job Template',
twoColumns: true,
navigationLinks: {
details: {
href: "/#/jobs/{{ job_id }}",
label: "\{\{ job_id + '- ' + name \}\}",
listLabel: 'Job Details',
label: 'Status',
icon: 'icon-zoom-in',
active: true,
ngShow: "job_id !== null"

View File

@ -69,7 +69,7 @@ angular.module('InventoriesListDefinition', [])
icon: 'icon-edit',
'class': 'btn-default btn-xs',
options: [
{ ngClick: "editInventory(\{\{ inventory.id \}\})", label: 'Inventory Properties' },
{ ngClick: "editInventory(\{\{ inventory.id \}\})", label: 'Properties' },
{ ngClick: "editHosts(\{\{ inventory.id \}\})", label: 'Hosts' },
{ ngClick: "editGroups(\{\{ inventory.id \}\})", label: 'Groups' }
]

View File

@ -21,7 +21,7 @@ angular.module('JobEventsListDefinition', [])
navigationLinks: {
details: {
href: "/#/jobs/{{ job_id }}",
label: 'Job Details',
label: 'Status',
icon: 'icon-zoom-in',
ngShow: "job_id !== null"
},

View File

@ -19,7 +19,7 @@ angular.module('JobHostDefinition', [])
navigationLinks: {
details: {
href: "/#/jobs/{{ job_id }}",
label: 'Job Details',
label: 'Status',
icon: 'icon-zoom-in',
ngShow: "job_id !== null"
},

View File

@ -97,11 +97,11 @@ angular.module('JobsListDefinition', [])
icon: 'icon-zoom-in',
'class': 'btn-default btn-xs',
options: [
{ ngClick: "viewSummary(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Host Summary',
{ ngClick: "editJob(\{\{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Status' },
{ ngClick: "viewSummary(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Hosts',
ngHide: "job.status == 'new'" },
{ ngClick: "viewEvents(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Job Events',
ngHide: "job.status == 'new'" },
{ ngClick: "editJob(\{\{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Job Details' }
{ ngClick: "viewEvents(\{{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Events',
ngHide: "job.status == 'new'" }
]
},

View File

@ -69,6 +69,10 @@ body {
font-size: 16px;
}
.modal-dialog .ui-accordion .ui-accordion-content {
overflow: hidden;
}
.overlay {
display: none;
position: absolute;

View File

@ -846,6 +846,20 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += "<li ng-repeat=\"crumb in breadcrumbs\"><a href=\"{{ '#' + crumb.path }}\">{{ crumb.title | capitalize }}</a></li>\n";
if (navigation) {
var paths = $location.path().replace(/^\//,'').split('/');
if (paths.length == 2) {
html += "<li class=\"active\">";
if (options.mode == 'edit') {
html += this.form.editTitle;
}
else {
html += this.form.addTitle;
}
html += "</li>\n";
}
html += "<li class=\"active\"> </li>\n";
html += "</ul>\n";
html += "<div class=\"dropdown\">\n";
@ -857,14 +871,17 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
break;
}
}
html += "<ul class=\"dropdown-menu\" role=\"menu\">\n";
for (var itm in navigation) {
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
navigation[itm].href + "\" ";
html += (navigation[itm].active) ? "class=\"active\" " : "";
// html += (navigation[itm].active) ? "class=\"active\" " : "";
html += ">";
html += "<i class=\"icon-ok\" style=\"visibility: ";
html += (navigation[itm].active) ? "visible" : "hidden";
html += "\"></i> ";
html += (navigation[itm].listLabel) ? navigation[itm].listLabel : navigation[itm].label;
html += (navigation[itm].active) ? " <i class=\"icon-angle-left\"></i>" : "";
html += "</a></li>\n";
}
html += "</ul>\n";
@ -1123,7 +1140,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
var navigation = {
inventory: {
href: "/#/inventories/{{ inventory_id }}",
label: "Inventory Properties",
label: "Properties",
icon: "icon-edit"
},
hosts: {

View File

@ -123,10 +123,12 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
for (var itm in navigation) {
html += "<li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"" +
navigation[itm].href + "\" ";
html += (navigation[itm].active) ? "class=\"active\" " : "";
// html += (navigation[itm].active) ? "class=\"active\" " : "";
html += ">";
html += "<i class=\"icon-ok\" style=\"visibility: ";
html += (navigation[itm].active) ? "visible" : "hidden";
html += "\"></i> ";
html += navigation[itm].label;
html += (navigation[itm].active) ? " <i class=\"icon-angle-left\"></i>" : "";
html += "</a></li>\n";
}
html += "</ul>\n";