Fixed problem loading data in HBAC/sudo details page.

In a recent change the details page was changed to create and locate
field containers with 'details-field' CSS class. The HBAC and sudo
custom details pages have been modified to use the same CSS class.

Ticket #1508
This commit is contained in:
Endi S. Dewata 2011-07-21 09:07:23 -05:00
parent f210a08268
commit af339cd546
3 changed files with 51 additions and 21 deletions

View File

@ -578,7 +578,10 @@ IPA.hbacrule_details_general_section = function(spec) {
td = $('<td/>').appendTo(tr);
var field = that.get_field('cn');
var span = $('<span/>', { 'name': 'cn' }).appendTo(td);
var span = $('<span/>', {
name: 'cn',
'class': 'details-field'
}).appendTo(td);
$('<label/>', {
name: 'cn',
@ -603,7 +606,10 @@ IPA.hbacrule_details_general_section = function(spec) {
td.append(param_info.label+':');
field = that.get_field('accessruletype');
span = $('<span/>', { 'name': 'accessruletype' }).appendTo(td);
span = $('<span/>', {
name: 'accessruletype',
'class': 'details-field'
}).appendTo(td);
$('<input/>', {
'type': 'radio',
@ -645,7 +651,10 @@ IPA.hbacrule_details_general_section = function(spec) {
}).appendTo(tr);
field = that.get_field('description');
span = $('<span/>', { 'name': 'description' }).appendTo(td);
span = $('<span/>', {
name: 'description',
'class': 'details-field'
}).appendTo(td);
$('<textarea/>', {
'name': 'description',
@ -670,7 +679,10 @@ IPA.hbacrule_details_general_section = function(spec) {
}).appendTo(tr);
field = that.get_field('ipaenabledflag');
span = $('<span/>', { 'name': 'ipaenabledflag' }).appendTo(td);
span = $('<span/>', {
name: 'ipaenabledflag',
'class': 'details-field'
}).appendTo(td);
$('<input/>', {
'type': 'radio',
@ -757,7 +769,10 @@ IPA.hbacrule_accesstime_widget = function(spec) {
container.append('<br/>');
span = $('<span/>', { 'name': 'table' }).appendTo(container);
span = $('<span/>', {
name: 'table',
'class': 'details-field'
}).appendTo(container);
that.table.create(span);
@ -780,7 +795,7 @@ IPA.hbacrule_accesstime_widget = function(spec) {
that.widget_setup(container);
var span = $('span[name="table"]', that.container);
var span = $('.details-field[name="table"]', that.container);
that.table.setup(span);
var button = $('input[name=remove]', span);

View File

@ -45,7 +45,8 @@ IPA.rule_details_section = function(spec) {
var span = $('<span/>', {
name: that.field_name,
title: param_info.doc
title: param_info.doc,
'class': 'details-field'
}).appendTo(container);
if (that.options.length) {
@ -77,7 +78,8 @@ IPA.rule_details_section = function(spec) {
var table_span = $('<span/>', {
name: table.field_name,
title: param_info ? param_info.doc : table.field_name
title: param_info ? param_info.doc : table.field_name,
'class': 'details-field'
}).appendTo(span);
field = that.get_field(table.field_name);

View File

@ -787,7 +787,8 @@ IPA.sudo.rule_details_general_section = function(spec) {
var span = $('<span/>', {
name: 'cn',
title: param_info ? param_info.doc : 'cn'
title: param_info ? param_info.doc : 'cn',
'class': 'details-field'
}).appendTo(td);
$('<label/>', {
@ -821,7 +822,8 @@ IPA.sudo.rule_details_general_section = function(spec) {
span = $('<span/>', {
name: 'description',
title: param_info ? param_info.doc : 'description'
title: param_info ? param_info.doc : 'description',
'class': 'details-field'
}).appendTo(td);
$('<textarea/>', {
@ -851,7 +853,8 @@ IPA.sudo.rule_details_general_section = function(spec) {
span = $('<span/>', {
name: 'ipaenabledflag',
title: label
title: label,
'class': 'details-field'
}).appendTo(td);
$('<input/>', {
@ -933,7 +936,8 @@ IPA.sudo.rule_details_command_section = function(spec) {
var span = $('<span/>', {
name: 'cmdcategory',
title: param_info.doc
title: param_info.doc,
'class': 'details-field'
}).appendTo(container);
$('<h3/>', {
@ -974,7 +978,8 @@ IPA.sudo.rule_details_command_section = function(spec) {
var table_span = $('<span/>', {
name: 'memberallowcmd_sudocmd',
title: param_info ? param_info.doc : 'memberallowcmd_sudocmd'
title: param_info ? param_info.doc : 'memberallowcmd_sudocmd',
'class': 'details-field'
}).appendTo(span);
field = that.get_field('memberallowcmd_sudocmd');
@ -984,7 +989,8 @@ IPA.sudo.rule_details_command_section = function(spec) {
table_span = $('<span/>', {
name: 'memberallowcmd_sudocmdgroup',
title: param_info ? param_info.doc : 'memberallowcmd_sudocmdgroup'
title: param_info ? param_info.doc : 'memberallowcmd_sudocmdgroup',
'class': 'details-field'
}).appendTo(span);
field = that.get_field('memberallowcmd_sudocmdgroup');
@ -999,7 +1005,8 @@ IPA.sudo.rule_details_command_section = function(spec) {
table_span = $('<span/>', {
name: 'memberdenycmd_sudocmd',
title: param_info ? param_info.doc : 'memberdenycmd_sudocmd'
title: param_info ? param_info.doc : 'memberdenycmd_sudocmd',
'class': 'details-field'
}).appendTo(span);
field = that.get_field('memberdenycmd_sudocmd');
@ -1009,7 +1016,8 @@ IPA.sudo.rule_details_command_section = function(spec) {
table_span = $('<span/>', {
name: 'memberdenycmd_sudocmdgroup',
title: param_info ? param_info.doc : 'memberdenycmd_sudocmdgroup'
title: param_info ? param_info.doc : 'memberdenycmd_sudocmdgroup',
'class': 'details-field'
}).appendTo(span);
field = that.get_field('memberdenycmd_sudocmdgroup');
@ -1097,7 +1105,8 @@ IPA.sudo.rule_details_runas_section = function(spec) {
var span = $('<span/>', {
name: 'ipasudorunasusercategory',
title: param_info.doc
title: param_info.doc,
'class': 'details-field'
}).appendTo(container);
span.append(param_info.doc);
@ -1135,7 +1144,8 @@ IPA.sudo.rule_details_runas_section = function(spec) {
var table_span = $('<span/>', {
name: 'ipasudorunas_user',
title: param_info ? param_info.doc : 'ipasudorunas_user'
title: param_info ? param_info.doc : 'ipasudorunas_user',
'class': 'details-field'
}).appendTo(span);
field = that.get_field('ipasudorunas_user');
@ -1145,7 +1155,8 @@ IPA.sudo.rule_details_runas_section = function(spec) {
table_span = $('<span/>', {
name: 'ipasudorunas_group',
title: param_info ? param_info.doc : 'ipasudorunas_group'
title: param_info ? param_info.doc : 'ipasudorunas_group',
'class': 'details-field'
}).appendTo(span);
field = that.get_field('ipasudorunas_group');
@ -1156,7 +1167,8 @@ IPA.sudo.rule_details_runas_section = function(spec) {
span = $('<span/>', {
name: 'ipasudorunasgroupcategory',
title: param_info.doc
title: param_info.doc,
'class': 'details-field'
}).appendTo(container);
span.append(param_info.doc);
@ -1194,7 +1206,8 @@ IPA.sudo.rule_details_runas_section = function(spec) {
table_span = $('<span/>', {
name: 'ipasudorunasgroup_group',
title: param_info ? param_info.doc : 'ipasudorunasgroup_group'
title: param_info ? param_info.doc : 'ipasudorunasgroup_group',
'class': 'details-field'
}).appendTo(span);
field = that.get_field('ipasudorunasgroup_group');