diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2011-10-24 14:53:29 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-11-02 15:37:49 +0000 |
commit | 9afe4b98da13bbf1ce2fd68a660ee1d77fd84f2f (patch) | |
tree | 76ddd647312cda21d55d8da0189e0b6321013d96 /install/ui/details.js | |
parent | 237a021848dd3a1e4716971ae907910e1cbfbc8e (diff) | |
download | freeipa-9afe4b98da13bbf1ce2fd68a660ee1d77fd84f2f.tar.gz freeipa-9afe4b98da13bbf1ce2fd68a660ee1d77fd84f2f.tar.xz freeipa-9afe4b98da13bbf1ce2fd68a660ee1d77fd84f2f.zip |
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
Diffstat (limited to 'install/ui/details.js')
-rw-r--r-- | install/ui/details.js | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/install/ui/details.js b/install/ui/details.js index 98f48d0f9..15056204f 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -199,6 +199,14 @@ IPA.details_section = function(spec) { } }; + that.clear = function() { + var fields = that.fields.values; + + for (var i=0; i< fields.length; i++) { + fields[i].clear(); + } + }; + init(); // methods that should be invoked by subclasses @@ -409,8 +417,6 @@ IPA.details_facet = function(spec) { that.facet_create_header(container); - that.pkey = IPA.nav.get_state(that.entity.name+'-pkey'); - that.create_controls(); that.expand_button = IPA.action_button({ @@ -523,7 +529,7 @@ IPA.details_facet = function(spec) { that.needs_update = function() { var pkey = IPA.nav.get_state(that.entity.name+'-pkey'); - return pkey != that.pkey; + return pkey !== that.pkey; }; that.section_dirty_changed = function(dirty) { @@ -720,6 +726,15 @@ IPA.details_facet = function(spec) { command.execute(); }; + that.clear = function() { + that.header.clear(); + var sections = that.sections.values; + + for (var i=0; i< sections.length; i++) { + sections[i].clear(); + } + }; + that.add_sections(spec.sections); that.details_facet_create_content = that.create_content; |