mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
search filter focus afdter a search loads, focus moved to the search filter text box, tyhe most likely thing that the user will want to change on the page.
https://fedorahosted.org/freeipa/ticket/983
This commit is contained in:
parent
32e4914584
commit
f0577622a9
@ -571,7 +571,10 @@ IPA.button = function(spec) {
|
||||
'class': 'ui-state-default ui-corner-all'
|
||||
});
|
||||
|
||||
if (spec.click) button.click(spec.click);
|
||||
if (spec.click) {
|
||||
button.click(spec.click);
|
||||
}
|
||||
|
||||
if (spec['class']) button.addClass(spec['class']);
|
||||
|
||||
if (spec.icon) {
|
||||
|
@ -88,11 +88,20 @@ IPA.search_widget = function (spec) {
|
||||
|
||||
var search_filter = $('span[name=search-filter]', that.container);
|
||||
|
||||
$('input[type=text]',search_filter).keypress(
|
||||
function(e) {
|
||||
/* if the key pressed is the enter key */
|
||||
if (e.which == 13) {
|
||||
that.find();
|
||||
}
|
||||
});
|
||||
var button = $('input[name=find]', search_filter);
|
||||
that.find_button = IPA.button({
|
||||
'label': IPA.messages.buttons.find,
|
||||
'icon': 'ui-icon-search',
|
||||
'click': function() { that.find(); }
|
||||
'click': function() {
|
||||
that.find();
|
||||
}
|
||||
});
|
||||
button.replaceWith(that.find_button);
|
||||
|
||||
@ -247,6 +256,7 @@ IPA.search_widget = function (spec) {
|
||||
} else {
|
||||
summary.text(data.result.summary);
|
||||
}
|
||||
$('.search-filter input[type=text]', that.container).focus();
|
||||
}
|
||||
|
||||
function on_error(xhr, text_status, error_thrown) {
|
||||
|
Loading…
Reference in New Issue
Block a user