diff options
author | Adam Young <ayoung@redhat.com> | 2010-09-28 08:20:16 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-09-28 10:20:30 -0400 |
commit | b3a501b8dad71d57b09e3826dcabb1972f9ca36e (patch) | |
tree | 717b182649192a003bfc463b6127df62e04b77a8 /install/static/entity.js | |
parent | d966056bb0e24693fcd05be690f724e921492df3 (diff) | |
download | freeipa-b3a501b8dad71d57b09e3826dcabb1972f9ca36e.tar.gz freeipa-b3a501b8dad71d57b09e3826dcabb1972f9ca36e.tar.xz freeipa-b3a501b8dad71d57b09e3826dcabb1972f9ca36e.zip |
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
Diffstat (limited to 'install/static/entity.js')
-rw-r--r-- | install/static/entity.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/install/static/entity.js b/install/static/entity.js index 790275267..7fb19fc79 100644 --- a/install/static/entity.js +++ b/install/static/entity.js @@ -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); }; |