mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 16:51:55 -06:00
Better automated test support
1. add class to active facet instead of using direct style modification for hiding/showing 2. add name attribute to tables and dialog buttons and error dialog https://fedorahosted.org/freeipa/ticket/3744
This commit is contained in:
parent
7a105604e2
commit
a83e879e18
@ -471,6 +471,11 @@ body {
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.active-facet {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.facet-header {
|
||||
|
@ -484,6 +484,7 @@ IPA.attributes_widget = function(spec) {
|
||||
|
||||
that.$node = that.table = $('<table/>', {
|
||||
id: id,
|
||||
name: that.name,
|
||||
'class': 'search-table aci-attribute-table scrollable'
|
||||
}).
|
||||
append('<thead/>').
|
||||
@ -526,7 +527,7 @@ IPA.attributes_widget = function(spec) {
|
||||
|
||||
var td = $('<td/>').appendTo(tr);
|
||||
var name = that.get_input_name();
|
||||
var id = that.option_next_id + name;
|
||||
var id = that._option_next_id + name;
|
||||
td.append($('<input/>',{
|
||||
id: id,
|
||||
type: 'checkbox',
|
||||
|
@ -251,8 +251,9 @@ IPA.dialog = function(spec) {
|
||||
var parent = that.container.parent();
|
||||
var buttons = $('.ui-dialog-buttonpane .ui-dialog-buttonset button', parent);
|
||||
|
||||
buttons.each(function(index) {
|
||||
buttons.each(function(index, ui_button) {
|
||||
var button = that.buttons.values[index];
|
||||
$(ui_button).prop('name', button.name);
|
||||
button.element = $(this);
|
||||
});
|
||||
};
|
||||
|
@ -352,7 +352,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
that.domNode.detach();
|
||||
} else {
|
||||
that.domNode = $('<div/>', {
|
||||
'class': 'facet',
|
||||
'class': 'facet active-facet',
|
||||
name: that.name,
|
||||
'data-name': that.name,
|
||||
'data-entity': entity_name
|
||||
@ -386,8 +386,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
}).appendTo(domNode);
|
||||
|
||||
that.create_content(that.content);
|
||||
|
||||
|
||||
domNode.removeClass('active-facet');
|
||||
};
|
||||
|
||||
that.create_header = function(container) {
|
||||
@ -429,7 +428,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
that.clear();
|
||||
}
|
||||
|
||||
that.domNode.css('display', 'block');
|
||||
that.domNode.addClass('active-facet');
|
||||
that.show_content();
|
||||
that.header.select_tab();
|
||||
|
||||
@ -437,7 +436,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
that.refresh();
|
||||
}
|
||||
} else {
|
||||
that.domNode.css('display', 'block');
|
||||
that.domNode.addClass('active-facet');
|
||||
that.show_content();
|
||||
that.header.select_tab();
|
||||
}
|
||||
@ -459,7 +458,7 @@ exp.facet = IPA.facet = function(spec, no_init) {
|
||||
};
|
||||
|
||||
that.hide = function() {
|
||||
that.domNode.css('display', 'none');
|
||||
that.domNode.removeClass('active-facet');
|
||||
};
|
||||
|
||||
that.load = function(data) {
|
||||
|
@ -1232,6 +1232,7 @@ IPA.error_dialog = function(spec) {
|
||||
spec = spec || {};
|
||||
|
||||
spec.id = spec.id || 'error_dialog';
|
||||
spec.name = 'error_dialog';
|
||||
spec.title = spec.error_thrown.name;
|
||||
|
||||
var that = IPA.dialog(spec);
|
||||
|
@ -1561,7 +1561,8 @@ IPA.table_widget = function (spec) {
|
||||
container.addClass('table-widget');
|
||||
|
||||
that.table = $('<table/>', {
|
||||
'class': 'search-table'
|
||||
'class': 'search-table',
|
||||
name: that.name
|
||||
}).appendTo(container);
|
||||
|
||||
if (that['class']) that.table.addClass(that['class']);
|
||||
|
Loading…
Reference in New Issue
Block a user