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
This commit is contained in:
Petr Voborník
2012-01-16 14:17:46 +01:00
committed by Endi S. Dewata
parent 7a1399bee1
commit 71f9343480
5 changed files with 51 additions and 15 deletions

View File

@@ -47,15 +47,15 @@ IPA.search_facet = function(spec) {
that.facet_create_header(container);
var span = $('<div/>', {
var div = $('<div/>', {
'class': 'right-aligned-facet-controls'
}).appendTo(that.controls);
span.append(IPA.create_network_spinner());
div.append(IPA.create_network_spinner());
var filter_container = $('<div/>', {
'class': 'search-filter'
}).appendTo(span);
}).appendTo(div);
that.filter = $('<input/>', {
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,