diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-05-24 17:02:05 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-07-16 13:15:47 +0200 |
commit | a83e879e18148c763fcb09df42e08e1cf90dee84 (patch) | |
tree | 4e0f782ba13f1f56e44b3df7c9b6a21cd9695a35 /install | |
parent | 7a105604e265222cf6f96b0ac060d4f1b2504b6c (diff) | |
download | freeipa-a83e879e18148c763fcb09df42e08e1cf90dee84.tar.gz freeipa-a83e879e18148c763fcb09df42e08e1cf90dee84.tar.xz freeipa-a83e879e18148c763fcb09df42e08e1cf90dee84.zip |
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
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/ipa.css | 5 | ||||
-rw-r--r-- | install/ui/src/freeipa/aci.js | 7 | ||||
-rw-r--r-- | install/ui/src/freeipa/dialog.js | 3 | ||||
-rw-r--r-- | install/ui/src/freeipa/facet.js | 11 | ||||
-rw-r--r-- | install/ui/src/freeipa/ipa.js | 1 | ||||
-rw-r--r-- | install/ui/src/freeipa/widget.js | 3 |
6 files changed, 19 insertions, 11 deletions
diff --git a/install/ui/ipa.css b/install/ui/ipa.css index 8ef0a5096..5095d73f4 100644 --- a/install/ui/ipa.css +++ b/install/ui/ipa.css @@ -471,6 +471,11 @@ body { left: 10px; right: 10px; bottom: 0; + display: none; +} + +.active-facet { + display: block; } .facet-header { diff --git a/install/ui/src/freeipa/aci.js b/install/ui/src/freeipa/aci.js index aa28d7218..3ca10dbfb 100644 --- a/install/ui/src/freeipa/aci.js +++ b/install/ui/src/freeipa/aci.js @@ -483,8 +483,9 @@ IPA.attributes_widget = function(spec) { }).appendTo(container); that.$node = that.table = $('<table/>', { - id:id, - 'class':'search-table aci-attribute-table scrollable' + id: id, + name: that.name, + 'class': 'search-table aci-attribute-table scrollable' }). append('<thead/>'). append('<tbody/>'). @@ -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', diff --git a/install/ui/src/freeipa/dialog.js b/install/ui/src/freeipa/dialog.js index 36a143d23..d1428fecd 100644 --- a/install/ui/src/freeipa/dialog.js +++ b/install/ui/src/freeipa/dialog.js @@ -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); }); }; diff --git a/install/ui/src/freeipa/facet.js b/install/ui/src/freeipa/facet.js index ad53b80f2..166203a93 100644 --- a/install/ui/src/freeipa/facet.js +++ b/install/ui/src/freeipa/facet.js @@ -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) { diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js index 24f450e7f..8d54b66e0 100644 --- a/install/ui/src/freeipa/ipa.js +++ b/install/ui/src/freeipa/ipa.js @@ -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); diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 62a71f0a5..06fcef563 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -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']); |