Page is cleared before it is visible

https://fedorahosted.org/freeipa/ticket/1459

Changes:
 * added clear method to widgets, section, search, details, association facets
 * clear and refresh method in facet are called only if key/filter was changed
 * added id generator for widgets
This commit is contained in:
Petr Vobornik
2011-10-24 14:53:29 +02:00
committed by Endi S. Dewata
parent 237a021848
commit 9afe4b98da
9 changed files with 173 additions and 28 deletions

View File

@@ -567,6 +567,11 @@ IPA.host_keytab_widget = function(spec) {
set_status(value ? 'present' : 'missing');
};
that.clear = function() {
that.present_span.css('display', 'none');
that.missing_span.css('display', 'none');
};
function set_status(status) {
that.present_span.css('display', status == 'present' ? 'inline' : 'none');
that.missing_span.css('display', status == 'missing' ? 'inline' : 'none');
@@ -720,6 +725,13 @@ IPA.host_password_widget = function(spec) {
set_status(value ? 'present' : 'missing');
};
that.clear = function() {
that.missing_span.css('display', 'none');
that.present_span.css('display', 'none');
var password_label = $('.button-label', that.set_password_button);
password_label.text('');
};
function set_status(status) {
that.status = status;