diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-03-09 13:31:08 +0100 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-03-19 18:37:19 +0100 |
commit | 646a4ccde34a098ef693e75e45a2541618ed5434 (patch) | |
tree | 2540768265fc26229611ee42b57e2f0c1678c8f1 /install/ui/navigation.js | |
parent | c14a2d824557b06fd20bac77ddfc9e09001e2a92 (diff) | |
download | freeipa-646a4ccde34a098ef693e75e45a2541618ed5434.tar.gz freeipa-646a4ccde34a098ef693e75e45a2541618ed5434.tar.xz freeipa-646a4ccde34a098ef693e75e45a2541618ed5434.zip |
Content is no more overwritten by error message
When an error which caused calling of report_error occurt, the content of a facet got replaced by error message. There was no way how to force the facet to recreate its content and the facet became unusable.
This patch creates a containter for an error message. On error, report_error writes its content to error container, content container is hidden and error container is shown. Older comment in a code suggested to move the error message to facet's footer. A message in a footer could be missed by the user and on top of that a footer is sometimes used by various facet and we would have to solve the same problem again.
From experience the cause of an error is usually a missing pkey in a path. Therefore error information suggests user to navigate to top level. It causes to load default facets with default values so errors in navigation state shouldn't happen.
Facet content is displayed back on facet_show. If user tries to display same object as before facet's need_update() would return false, therefore need_update was modified to always return true if error is displayed.
Reproduction:
1) display any nested entity - ie DNS record
2) delete its parent pkey from path - &dnszone-pkey=example.com
3) reload the page with this path
https://fedorahosted.org/freeipa/ticket/2449
Diffstat (limited to 'install/ui/navigation.js')
-rw-r--r-- | install/ui/navigation.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/install/ui/navigation.js b/install/ui/navigation.js index a4ad28980..502b05490 100644 --- a/install/ui/navigation.js +++ b/install/ui/navigation.js @@ -263,6 +263,10 @@ IPA.navigation = function(spec) { return that.push_state(state); }; + that.show_top_level_page = function() { + jQuery.bbq.pushState({}, 2); + }; + that.get_tab_facet = function(tab_name) { var facet = null; |