From 71f934348095df57c3fc8f02c5e8eacc929c7354 Mon Sep 17 00:00:00 2001 From: Petr Voborník Date: Mon, 16 Jan 2012 14:17:46 +0100 Subject: Added refresh button for UI Web UI is caching records. Currently only possible ways how to display updated record which was changed elsewhere - ie. in CLI are: * refresh page in browser (takes really long on slow vpns) * search facet: change filter, find, change filter back, find * entity details: go to search, select other entry, go back to search, select original entry * association facet: same as entity details These are unconvenient methods. This patch adds Refresh button to search, details and association facet. This button executes facets refresh method. https://fedorahosted.org/freeipa/ticket/2051 --- install/ui/search.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'install/ui/search.js') diff --git a/install/ui/search.js b/install/ui/search.js index a7074e22..99990528 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -47,15 +47,15 @@ IPA.search_facet = function(spec) { that.facet_create_header(container); - var span = $('
', { + var div = $('
', { 'class': 'right-aligned-facet-controls' }).appendTo(that.controls); - span.append(IPA.create_network_spinner()); + div.append(IPA.create_network_spinner()); var filter_container = $('
', { 'class': 'search-filter' - }).appendTo(span); + }).appendTo(div); that.filter = $('', { type: 'text', @@ -78,6 +78,17 @@ IPA.search_facet = function(spec) { } }).appendTo(filter_container); + that.refresh_button = IPA.action_button({ + name: 'refresh', + href: 'refresh', + label: IPA.messages.buttons.refresh, + icon: 'reset-icon', + click: function() { + that.refresh(); + return false; + } + }).appendTo(that.controls); + that.remove_button = IPA.action_button({ name: 'remove', label: IPA.messages.buttons.remove, -- cgit