mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix the 'add' button
THe Add button was located using the DOm, and the scheme used to find it was fragile enough to be broken by the I18N approach. This is a little more robust, using a JQuery selector based on the class of the controls, and the entity name. Also remove Makefile, which should be autogenerated
This commit is contained in:
@@ -75,9 +75,13 @@ function ipa_entity_setup(jobj)
|
||||
function setup_search_facet() {
|
||||
var filter = $.bbq.getState(obj_name + '-filter', true);
|
||||
search_create(obj_name, ipa_entity_search_list[obj_name], jobj);
|
||||
var input = jobj.find('input[value=find]');
|
||||
input.after('<input type="submit" value="new" />');
|
||||
input.next().click(new_on_click);
|
||||
|
||||
$('<input />',{
|
||||
type:"submit",
|
||||
value: ipa_messages.button.add,
|
||||
click:new_on_click
|
||||
}).appendTo($( "div#" + obj_name + " > div.search-controls"));
|
||||
|
||||
if (typeof filter != 'undefined')
|
||||
search_load(obj_name, filter, null, null);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user